API Documentation
Authentication
Authenticate requests using an API key. Public endpoints (search, status, peers, epoch, rewards) do not require authentication.

API Key

Pass your API key via the X-API-Key HTTP header or the api_key query parameter.

# Header authentication
curl -H "X-API-Key: your-key" https://explorer.dsrch.net/api/search?q=bitcoin

# Query parameter
curl "https://explorer.dsrch.net/api/search?q=bitcoin&api_key=your-key"
Base URL
All API endpoints are relative to the node's base URL. For the public explorer:
https://explorer.dsrch.net

All responses are JSON with Content-Type: application/json. Token amounts are in micro-DSRCH (1 DSRCH = 1,000,000 udsrch).

Search
Full-text search across the decentralized index using DSRCH-Rank scoring algorithm.
GET /api/suggest Autocomplete & did-you-mean suggestions
Query Parameters
NameTypeRequiredDescription
qstringrequiredPrefix to autocomplete
Response 200
{
  "suggestions": [
    {"query": "bitcoin price", "count": 1200},
    {"query": "bitcoin mining", "count": 850}
  ],
  "didYouMean": ""
}
Try It
/api/suggest?q=bit
Node & Network
Monitor node status, peer connections, shard distribution, and search analytics.
GET /api/status Node version, documents, peers, chain ID
Response 200
{
  "version": "329.11.81",
  "protocolVersion": "197.00.26",
  "goVersion": "go1.26.1 linux/amd64",
  "chainId": "dsrch-mainnet-1",
  "nodeId": "12D3KooW...",
  "documents": 182,
  "peers": 2,
  "uptime": "5h32m"
}
Try It
/api/status
GET /api/peers Connected P2P mesh peers
Response 200
{
  "count": 2,
  "peers": [
    {"id": "12D3KooW...abc", "addr": "/ip4/161.35.159.16/tcp/9090"},
    {"id": "12D3KooW...def", "addr": "/ip4/134.209.125.63/tcp/9090"}
  ]
}
Try It
/api/peers
GET /api/shards Shard distribution & health
Response 200
{
  "shards": [
    {"id": 0, "documents": 182, "sizeBytes": 524288, "status": "active"}
  ],
  "totalShards": 1,
  "replicationFactor": 3
}
Try It
/api/shards
GET /api/analytics Query analytics & search stats
Response 200
{
  "totalQueries": 0,
  "avgLatency": "0s",
  "topQueries": [],
  "queriesPerMinute": 0
}
Try It
/api/analytics
POST /api/connect Connect to a peer node
Request Body
{"addr": "/ip4/143.110.156.45/tcp/9090/p2p/12D3KooW..."}
Response 200
{"ok": true, "peerId": "12D3KooW..."}
Blockchain
Epoch lifecycle, token rewards, staking, and testnet faucet.
GET /api/epoch Current epoch info & activity
Response 200
{
  "epoch": 5,
  "startTime": "2026-03-17T06:00:00Z",
  "duration": "1h0m0s",
  "activity": {
    "crawledUrls": 182,
    "queriesServed": 0,
    "avgLatency": "0s",
    "shardsStored": 1,
    "indexSize": 182
  }
}
Try It
/api/epoch
GET /api/rewards Token supply, rewards, mining stats
Response 200
{
  "nodes": 1,
  "circulatingSupply": 5350000000,
  "maxSupply": 1000000000000000,
  "totalMinted": 5350000000,
  "totalBurned": 0,
  "currentReward": 5000000000,
  "halvingEpoch": 175200,
  "season": 1
}

Note: Amounts are in udsrch (micro-DSRCH). Divide by 1,000,000 for DSRCH.

Try It
/api/rewards
POST /api/stake Stake DSRCH tokens on a validator
Request Body
{"amount": 1000000000, "validator": "dsrch1..."}

Amount in udsrch. 1000000000 udsrch = 1,000 DSRCH.

Response 200
{"ok": true, "txHash": "A1B2C3...", "staked": 1000000000}
POST /api/unstake Unstake tokens (21-day unbonding)
Request Body
{"amount": 500000000}
Response 200
{"ok": true, "unbondingEnd": "2026-04-07T12:00:00Z"}
POST /api/faucet Request testnet tokens (100 DSRCH)
Request Body
Content-Type: application/x-www-form-urlencoded

address=dsrch1abc123...
Response 200
{"ok": true, "amount": 100000000, "address": "dsrch1abc123..."}
Governance
On-chain governance via DAO proposals — create proposals, vote, and tally results.
GET /api/gov/proposals List all governance proposals
Response 200
{
  "proposals": [
    {
      "id": 1,
      "title": "Increase block reward to 10 DSRCH",
      "description": "Proposal to increase...",
      "type": "parameter_change",
      "status": "active",
      "proposer": "dsrch1abc...",
      "votesYes": 500000000,
      "votesNo": 100000000,
      "votesAbstain": 50000000,
      "endEpoch": 100
    }
  ]
}
Try It
/api/gov/proposals
POST /api/gov/propose Submit a new proposal
Request Body
{
  "title": "Increase minimum stake to 100 DSRCH",
  "description": "This proposal aims to...",
  "type": "parameter_change",
  "deposit": 1000000000
}
Response 200
{"ok": true, "proposalId": 2}
POST /api/gov/vote Cast a vote on a proposal
Request Body
{"proposalId": 1, "vote": "yes"}

Vote options: yes, no, abstain

Response 200
{"ok": true, "vote": "yes", "weight": 5000000000}
GET /api/gov/tally Get vote tally for a proposal
Query Parameters
NameTypeRequiredDescription
idintegerrequiredProposal ID
Response 200
{"proposalId": 1, "yes": 500000000, "no": 100000000, "abstain": 50000000, "quorumReached": true}
Crawling
Add URLs to the crawl frontier and monitor crawl progress.
POST /api/crawl/add Add URL to crawl frontier
Request Body
{"url": "https://example.com"}
Response 200
{"ok": true, "url": "https://example.com", "queued": true}
GET /api/crawl/status Crawl queue status & progress
Response 200
{"frontier": 0, "crawled": 182, "failed": 3, "active": false, "domainsVisited": 12}
Try It
/api/crawl/status
API Keys
Manage API keys for authenticated access. Keys can be rate-limited and revoked.
GET /api/keys List all registered API keys
Response 200
{"keys": [{"key": "dsk_abc123...", "name": "My App", "rateLimit": 100, "createdAt": "2026-03-17T10:00:00Z"}]}
POST /api/keys/create Generate a new API key
Request Body
{"name": "My dApp", "rateLimit": 100}
Response 200
{"key": "dsk_live_abc123def456", "name": "My dApp", "createdAt": "2026-03-17T10:00:00Z"}
POST /api/keys/revoke Revoke an existing API key
Request Body
{"key": "dsk_live_abc123def456"}
Response 200
{"revoked": true}
Webmaster Tools
Submit URLs for priority indexing, verify domain ownership, and monitor crawl statistics.
POST /api/webmaster/submit Submit URL for priority indexing
Request Body
{"url": "https://mysite.com/new-page"}
Response 200
{"url": "https://mysite.com/new-page", "domain": "mysite.com", "status": "queued", "addedAt": "2026-03-17T10:00:00Z"}
POST /api/webmaster/verify Verify domain ownership
Request Body
{"domain": "mysite.com"}
Response 200
{"domain": "mysite.com", "verified": false, "verificationToken": "dsrch-verify=abc123"}

Add the verificationToken as a TXT DNS record to complete verification.

GET /api/webmaster/stats Domain indexing statistics
Query Parameters
NameTypeRequiredDescription
domainstringrequiredDomain name to check
Response 200
{"domain": "mysite.com", "pending": 5, "crawled": 42, "failed": 1, "total": 48}
GET /api/webmaster/domains List registered domains
Response 200
{"domains": [{"domain": "mysite.com", "verified": true, "pages": 42}]}