What this API does
The Graph API allows developers to query indexed blockchain data efficiently using GraphQL. It supports Ethereum, Polygon, and Base, enabling access to real-time and historical data from popular DeFi platforms and NFT projects.
How it works
Developers send GraphQL queries to endpoints provided by The Graph API to retrieve indexed data. The API provides public subgraphs that organize complex blockchain data into a simplified structure, facilitating easy data retrieval.
Authentication
Access to The Graph API requires an API key for authentication, ensuring secure access to data. Developers can obtain their API key from the official site.
Example usage
query { uniswap { pairCount } }- Retrieves the number of pairs on Uniswap.query { aave { reserves { id } } }- Retrieves reserve IDs from Aave.query { nftProjects { totalSupply } }- Fetches the total supply of a specific NFT project.
Limits
The Graph API allows up to 1,000 free queries per month. Further details on rate limits are available in the official documentation.
Ideal use cases
- Building decentralized applications (dApps) that require real-time blockchain data.
- Creating analytics tools for DeFi protocols.
- Integrating NFT data into applications.
- Developing tools for blockchain research and insights.