Endpoints

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


Streaming API

post

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

Authorizations
X-API-KeystringRequired
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
post
/api/v1/on_demand_data_request

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".

Example usage:

Set Desirabilities

post
Authorizations
X-API-KeystringRequired
Body
desirabilitiesobject[]Required

List of source items with label weights

Responses
200

Successful Response

application/json
Responseany
post
/api/v1/set_desirabilities

No content

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.

List Hf Repo Names

get

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

Authorizations
X-API-KeystringRequired
Responses
200

Successful Response

application/json
get
/api/v1/list_repo_names
200

Successful Response

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:

Last updated