published

The Graph API

The Graph API allows developers to efficiently query blockchain data using GraphQL, organizing data from Ethereum and Polygon networks into subgraphs for real-time access.

Developed by The Graph Foundation

99.90%Uptime
180msLatency
13kStars
API KeyAuth
NoCredit Card
GraphQLStyle
v1Version
API Endpoints

Reference for available routes, request structures, and live examples.

Query blockchain data using The Graph

Full Endpoint URL
https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2
Implementation Example
curl -X POST 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Request Payload
{
  "query": "{ pairs(first: 5) { id token0 { symbol } } }"
}
Expected Response
{
  "data": {
    "pairs": [
      {
        "id": "0x...",
        "token0": {
          "symbol": "ETH"
        }
      }
    ]
  }
}
Version:v1
Limit:100,000 requests/month (free tier)
Real-World Applications
  • DeFi dashboardsOptimized Capability
  • NFT marketplace data retrievalOptimized Capability
  • Blockchain explorersOptimized Capability
  • On‑chain analytics toolsOptimized Capability
  • Real‑time dApp data subscriptionsOptimized Capability
Advantages
  • Decentralized indexing for resilience
  • Fast, structured GraphQL querying
  • Multi‑network support (Ethereum, Polygon, etc.)
  • Open‑source SDKs and tooling
Limitations
  • Requires understanding of GraphQL schema
  • Rate limits may restrict bulk data extraction
  • Potential latency on lightly indexed subgraphs
  • Learning curve for subgraph deployment

FAQs

API Specifications

v1
Pricing Model
Tiered (free + paid per additional requests/indexing)
Credit Card
Not Required
Response Formats
JSON
Supported Languages
6 Languages
SDK Support
JavaScript, TypeScript, Go, Python
Time to Hello World

Under 15 minutes (sign up, deploy or pick subgraph, query)

Rate Limit

1000 requests per minute

Free Tier Usage

Up to 100,000 requests per month and 3 subgraphs indexed, no credit card required

Use Case: Best For

Developers building dashboards, explorers, analytics, and dApps with real‑time blockchain data needs

Not Recommended For

Large-scale historical bulk data extraction without paying for higher indexing tiers

#graphql#blockchain-indexing#ethereum-queries#the-graph

Explore Related APIs

Discover similar APIs to The Graph API

View All APIs
FREEMIUM

Etherscan API

The Etherscan API offers developers free access to comprehensive Ethereum blockchain data, suitable for applications such as crypto wallets and analytics tools.

BlockchainView Details
FREEMIUM

Covalent API

The Covalent API offers developers free access to aggregate blockchain data from over 100 networks, facilitating the building of multi-chain applications.

BlockchainView Details
OPEN SOURCE

Web3.js Ethereum API

Web3.js is a free and open-source library for JavaScript and TypeScript, facilitating interaction with Ethereum and EVM-compatible networks, ideal for blockchain applications.

BlockchainView Details