> ## Documentation Index
> Fetch the complete documentation index at: https://na-834f3010.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# The Graph

> Discover subgraphs, run GraphQL, read Token API and Market data.

<img src="https://mintcdn.com/na-834f3010/zqkgru7uBeifcSo_/images/brand/graph-logomark-dark.png?fit=max&auto=format&n=zqkgru7uBeifcSo_&q=85&s=517309aa84b92b76ec84b876ce5cfd9f" alt="The Graph" className="block h-10 dark:hidden" width="500" height="500" data-path="images/brand/graph-logomark-dark.png" />

<img src="https://mintcdn.com/na-834f3010/zqkgru7uBeifcSo_/images/brand/graph-logomark-light.png?fit=max&auto=format&n=zqkgru7uBeifcSo_&q=85&s=88b2f98b48daebfd03398adcc1fce6fa" alt="The Graph" className="hidden h-10 dark:block" width="500" height="500" data-path="images/brand/graph-logomark-light.png" />

Use `THEGRAPH_API_KEY` for gateway GraphQL and Token API. Use `SUBSTREAMS_API_KEY` only for the Substreams data plane. Market reads need a stored Portal bearer.

Discovery never introspects schema unless you run **Get schema**. Query outputs include `query_url` and `query_url_x402`. **Never auto-pay** Graph x402 from a step.

| Group      | Actions                                                    |
| ---------- | ---------------------------------------------------------- |
| Discovery  | Search, recommend, detail, schema, find by contract        |
| Query      | Query subgraph, indexing status, lending snapshot          |
| Token API  | Balances, transfers, holders, DEX swaps, NFT activity      |
| Substreams | Search packages, get package, default endpoint             |
| Market     | Subscription, usage, bill, connections, hosted deployments |
