LogoLogo
  • Welcome
  • News and updates
  • Subnet Status Update
  • Macromedia
  • Bittensor
    • DTAO
  • SUBNETS
    • Subnet 1 - Apex
      • Subnet 1: How to use APEX
      • Subnet 1: Incentive Mechanism
      • Subnet 1: Base Miner Setup
      • Subnet 1: Roadmap
    • Subnet 9 - Pre-training
      • Subnet 9: How to use Pre-training
      • Subnet 9: Incentive Mechanism
      • Subnet 9: Roadmap
    • Subnet 13 - Data Universe
      • Subnet 13: How to use Data Universe
      • Subnet 13: Incentive Mechanism
      • Subnet 13: Roadmap
      • Subnet 13 API
    • Subnet 25 - Mainframe
      • Subnet 25: How to use Mainframe
      • Subnet 25: Incentive Mechanism
      • Subnet 25: Roadmap
  • Subnet 37 - Finetuning
    • Subnet 37: How to use Fine-Tuning
    • Subnet 37: Miners
    • Subnet 37: Validators
    • Subnet 37: Incentive Mechanism
    • Subnet 37: Competitions
    • Subnet 37: Roadmap
  • CONSTELLATION - USER GUIDES
    • Apex
      • Navigating Apex
      • FAQs
    • Gravity
      • Scraping data
      • Managing and Collecting your data
      • FAQs
    • Nebula
      • Explore Nebula
      • Analyzing data
  • Developers
    • API Documentation
      • Accessing API Keys
      • SN1 - APEX
        • Endpoints
        • Example Usage
        • Agentic Tasks
        • Supported Models
      • SN13 - Data Universe
        • Endpoints
        • Example usage
        • Scraping Youtube Data
      • SN25 - Mainframe
        • API Keys
        • Folding API
          • Running Folding API Server
          • Endpoints
        • Organic API
          • Endpoints
    • Macrocosmos SDK
      • Installation
      • API Keys
      • APEX
      • Gravity
    • Tools
      • Macrocosmos MCP
      • Developer Projects
Powered by GitBook
On this page
  1. Developers
  2. API Documentation
  3. SN13 - Data Universe

Endpoints

PreviousSN13 - Data UniverseNextExample usage

Last updated 4 days ago

Base URL: https://sn13.api.macrocosmos.ai

We provide three primary API endpoints for SN13:

  • POST /api/v1/on_demand_data_request

  • GET /api/v1/list_repo_names

  • POST /api/v1/set_desirabilities


POST /api/v1/on_demand_data_request

This endpoint enables real-time social data retrieval across decentralized miners. It supports flexible querying with parameters such as keywords, usernames, timeframes, and data sources.

Supported data sources:

  • x – Twitter-style content

  • reddit – Subreddit-based or keyword-driven Reddit searches

You can retrieve posts from public accounts like Elon Musk , specifying a keyword (e.g. "space") and a timeframe. The API will return relevant posts matching your query.

To search Reddit, simply change the source to "reddit" and use subreddit-style keywords like "/bittensor".

POST /api/v1/set_desirabilities

This endpoint allows you to define scraping tasks that direct miners to focus on specific keywords or hashtags. These tasks help guide the network's attention and incentivize participation , miners receive increased rewards for successfully scraping content associated with your task.

GET /api/v1/list_repo_names

SN13 miners contribute to the open-source ecosystem by publishing models on Hugging Face. This endpoint returns a list of all repositories deployed by SN13 miners, enabling you to explore the tools and models built on the subnet.

Example usage:

Example usage:

List Hf Repo Names

get

Returns a list of repository names from the hf_validation.parquet file, excluding "no_dataset_provided".

Authorizations
Responses
200
Successful Response
application/json
get
GET /api/v1/list_repo_names HTTP/1.1
Host: 
X-API-Key: YOUR_API_KEY
Accept: */*
200

Successful Response

{
  "count": 1,
  "repo_names": [
    "text"
  ]
}

Set Desirabilities

post
Authorizations
Body
desirabilitiesobject[]Required

List of source items with label weights

Responses
200
Successful Response
application/json
Responseany
422
Validation Error
application/json
post
POST /api/v1/set_desirabilities HTTP/1.1
Host: 
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "desirabilities": [
    {}
  ]
}

No content

#on-demand-api-script
List Hugging Face Repositories
  • POSTStreaming API
  • POSTSet Desirabilities
  • GETList Hf Repo Names

Streaming API

post

Handle data queries targeting multiple miners with validation and incentives. Now supports enhanced X content with rich metadata.

Authorizations
Body

Request model for data queries

sourcestringRequired

Data source (x or reddit)

usernamesstring[] · max: 10Optional

List of usernames to fetch data from

keywordsstring[] · max: 5Optional

List of keywords to search for

start_dateany ofOptional

Start date (ISO format)

stringOptional
or
nullOptional
end_dateany ofOptional

End date (ISO format)

stringOptional
or
nullOptional
limitinteger · min: 1 · max: 1000Optional

Maximum number of items to return

Default: 100
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /api/v1/on_demand_data_request HTTP/1.1
Host: sn13.api.macrocosmos.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 108

{
  "source": "text",
  "usernames": [
    "text"
  ],
  "keywords": [
    "text"
  ],
  "start_date": "text",
  "end_date": "text",
  "limit": 100
}
{
  "status": "text",
  "data": [
    {}
  ],
  "meta": {}
}