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

# Subgraph Endpoints

> GraphQL endpoints for all Kleros V2 and V1 subgraphs

All Kleros subgraphs are deployed on The Graph. Use these endpoints to query Kleros data via GraphQL.

<Warning>
  Subgraph endpoints on the decentralized network require a **Graph API key**. Get one at [thegraph.com/studio](https://thegraph.com/studio). In template mappings you will see `{{{graphApiKey}}}` — this is injected at runtime by the Kleros SDK.
</Warning>

***

## V2 Subgraphs (Arbitrum)

### Core Subgraph (KlerosCore, courts, disputes, jurors, stakes)

| Environment | Network          | Studio Page                                                                            |
| ----------- | ---------------- | -------------------------------------------------------------------------------------- |
| Mainnet     | Arbitrum One     | [kleros-v2-coreneo](https://thegraph.com/studio/subgraph/kleros-v2-coreneo/)           |
| Testnet     | Arbitrum Sepolia | [kleros-v2-core-testnet](https://thegraph.com/studio/subgraph/kleros-v2-core-testnet/) |
| Devnet      | Arbitrum Sepolia | [kleros-v2-core-devnet](https://thegraph.com/studio/subgraph/kleros-v2-core-devnet/)   |

**Decentralized network query URL pattern:**

```
https://gateway.thegraph.com/api/{YOUR_API_KEY}/subgraphs/id/{SUBGRAPH_ID}
```

Get the `SUBGRAPH_ID` (deployment hash) from the Studio pages linked above — it is shown on the subgraph's Overview tab.

### Dispute Template Registry Subgraph

| Environment | Network          | Studio Page                                                                                          |
| ----------- | ---------------- | ---------------------------------------------------------------------------------------------------- |
| Mainnet     | Arbitrum One     | [kleros-v2-drt](https://thegraph.com/studio/subgraph/kleros-v2-drt/)                                 |
| Testnet     | Arbitrum Sepolia | [kleros-v2-drt-arbisep-testnet](https://thegraph.com/studio/subgraph/kleros-v2-drt-arbisep-testnet/) |

***

## V2 Product Subgraphs

### Escrow V2

| Environment | Network          | Subgraph ID                                    |
| ----------- | ---------------- | ---------------------------------------------- |
| Mainnet     | Arbitrum One     | `96vpnRJbRVkzF6usMNYMMoziSZEfSwGEDpXNi2h9WBSW` |
| Devnet      | Arbitrum Sepolia | `3aZxYcZpZL5BuVhuUupqVrCV8VeNyZEvjmPXibyPHDFQ` |

Full query URL (mainnet):

```
https://gateway.thegraph.com/api/{YOUR_API_KEY}/subgraphs/id/96vpnRJbRVkzF6usMNYMMoziSZEfSwGEDpXNi2h9WBSW
```

### Curate V2

Curate V2 subgraph is under active development. Check the [curate-v2 repository](https://github.com/kleros/curate-v2/tree/master/subgraph) for the latest deployment.

***

## V1 Subgraphs (Legacy)

These index V1 Kleros products still in active use.

### Curate V1

| Network          | Endpoint                                                                 |
| ---------------- | ------------------------------------------------------------------------ |
| Ethereum Mainnet | `https://thegraph.com/hosted-service/subgraph/kleros/curate`             |
| Gnosis Chain     | `https://thegraph.com/hosted-service/subgraph/kleros/legacy-curate-xdai` |

### Proof of Humanity V1

| Network          | Endpoint                                                                        |
| ---------------- | ------------------------------------------------------------------------------- |
| Ethereum Mainnet | `https://thegraph.com/hosted-service/subgraph/kleros/proof-of-humanity-mainnet` |

You can also query PoH V1 directly: call `isRegistered(address)` on `0xC5E9dDebb09Cd64DfaCab4011A0D5cEDaf7c9BDb` on Ethereum Mainnet.

### Other V1 Products

For Escrow V1, Linguo, Tokens, and other legacy apps, see the [Kleros subgraph list on GitHub](https://github.com/orgs/kleros/repositories?q=subgraph).

***

## Querying Subgraphs

All subgraphs expose a GraphQL API. Query them with any GraphQL client:

```typescript theme={null}
const SUBGRAPH_URL =
  `https://gateway.thegraph.com/api/${process.env.GRAPH_API_KEY}/subgraphs/id/96vpnRJbRVkzF6usMNYMMoziSZEfSwGEDpXNi2h9WBSW`;

const response = await fetch(SUBGRAPH_URL, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    query: `{
      courts(first: 10) {
        id
        policy { policy }
        minStake
        timesPerPeriod
      }
    }`
  })
});

const { data } = await response.json();
```

<Note>
  Addresses in subgraph responses are always **lowercase hex** (no EIP-55 checksum). Always lowercase addresses in your query variables, or the subgraph will return no results.
</Note>

***

<CardGroup cols={2}>
  <Card title="Query Examples" icon="magnifying-glass" href="/developers/subgraph/queries">
    Common GraphQL queries for disputes, courts, and jurors
  </Card>

  <Card title="Subgraph Overview" icon="database" href="/developers/subgraph/overview">
    Architecture and local development setup
  </Card>
</CardGroup>
