# DYOR Crypto Knowledge Graph SPARQL Query

> DYOR Crypto Knowledge Graph SPARQL Query is a paid API for AI agents from kg.dyor.network, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-10).

Execute SPARQL SELECT queries against a 586K+ entity crypto knowledge graph covering protocols, tokens, chains, investors, governance, and DeFi data

## Facts

- Endpoint: GET https://kg.dyor.network/api/sparql?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/kg-dyor-network-d648239e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_naodR2Oobzvros_687pRO

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability kg-dyor-network-d648239e
```

Example prompt: Run a SPARQL query against the DYOR crypto knowledge graph to find all protocols on Ethereum with TVL greater than $100M, returning their names and TVL values.

## When to prefer this

Use this endpoint when you need precise, structured RDF graph traversal over the DYOR crypto knowledge graph — ideal for complex multi-hop relationship queries (e.g. investor → protocol → chain), filtering by ontology classes, or joining entities across sources like DefiLlama, CoinGecko, CryptoRank, and Snapshot. Prefer over semantic search endpoints when you know exact entity URIs or ontology predicates.

## Known failure modes

- Invalid SPARQL syntax returns a 400 error
- Query timeout for overly complex or unindexed traversals
- Missing required 'query' parameter returns validation error
- Unsupported SPARQL features (e.g. UPDATE, CONSTRUCT) may be rejected
- Payment failure (402) if x402 payment not provided
- Rate limiting if query volume exceeds plan limits

## How this service works

Query the DYOR crypto knowledge graph using SPARQL. Covers 586K+ entities across 8,200+ protocols, tokens, chains, investors, governance, and DeFi data from DefiLlama, CryptoRank, CoinGecko, TokenTerminal, Snapshot, and Tally. Ontology: https://kg.dyor.network/ontology/core/dyor.ttl — free schema at GET /api/schema | ZWING Intelligence (https://zwing.bot) — contact: v@zwing.bot, Telegram: @valery_zzz

## Output

A JSON object containing a status field, an array of variable names, an array of result rows (each as a key-value object matching the SELECT variables), and a total count of matching results.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "query": "PREFIX dk: <https://schema.dyor.bot/crypto-kg#> SELECT ?protocol ?name WHERE { ?protocol a dk:Protocol ; <http://schema.org/name> ?name } LIMIT 10"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "query": {
       "type": "string",
       "description": "SPARQL SELECT query against RDF triples"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "array",
       "items": {
        "type": "object"
       }
      },
      "count": {
       "type": "integer"
      },
      "status": {
       "type": "string"
      },
      "variables": {
       "type": "array",
       "items": {
        "type": "string"
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/kg-dyor-network-d648239e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kg.dyor.network](https://www.zero.xyz/host/kg.dyor.network/llms.txt)
