The Graph
communityIndexing protocol for querying blockchain data via GraphQL subgraphs for DeFi, NFTs, and DAOs.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
POST
https://gateway.thegraph.com/api/{apiKey}/subgraphs/id/{subgraphId}Query a subgraph
Parameters
queryGraphQL query (stringrequiredvariablesquery variables (objectoptionalReturns
data with subgraph-specific fields (varies by subgraph)GET
https://api.thegraph.com/subgraphsSearch subgraphs
Parameters
querysearch keyword (stringoptionalnetworkmainnet|arbitrum-one|polygon (stringoptionalReturns
subgraphs[] with id, displayName, description, network, queryCount, indexedAtGET
https://api.thegraph.com/subgraphs/id/{subgraphId}Get subgraph metadata
Parameters
subgraphIdsubgraph ID (stringrequiredReturns
id, displayName, description, currentVersion, network, entityCount, queryCount