<!-- source: https://secondlayer.tools/docs/api-reference#get-subgraph -->

## Get one subgraph's tables, columns, and sync tip

`GET /v1/subgraphs/{name}`

Metadata for one subgraph: each table's read endpoint and declared columns, how far indexing has reached, and links to its generated docs. `columns` lists only the definition's columns; the system columns `_id`, `_block_height`, `_tx_id` and `_created_at` exist on every table too.

### Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `name` | string, required | Subgraph name, as deployed (the `name` in its definition). |

### Returns

One `Subgraph` object.

### Responses

- `200` Subgraph metadata
- `401` This bind requires the instance token, and it was missing or wrong
- `404` No readable subgraph by that name (`SUBGRAPH_NOT_FOUND`). Hosted: another account's private subgraph reads as missing
- `429` Hosted only: rate limited; retry after `Retry-After` seconds. Self-hosted reads are not rate limited

### Example

```bash
curl https://api.secondlayer.tools/v1/subgraphs/{name} \
  -H "Authorization: Bearer $SECONDLAYER_API_KEY"
```

```json
{
  "name": "sbtc-token",
  "description": null,
  "version": "1.0.0",
  "status": "active",
  "created_at": "2026-09-01T12:00:00.000Z",
  "sources": [
    "SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token"
  ],
  "start_block": 0,
  "tables": {
    "transfers": {
      "endpoint": "/v1/subgraphs/sbtc-token/transfers",
      "columns": [
        "sender",
        "recipient",
        "amount",
        "asset_identifier"
      ],
      "column_types": {
        "sender": "principal",
        "recipient": "principal",
        "amount": "uint",
        "asset_identifier": "text"
      }
    }
  },
  "tip": {
    "block_height": 9048931,
    "subgraph_height": 9048931,
    "blocks_behind": 0
  },
  "docs": {
    "openapi": "/v1/subgraphs/sbtc-token/openapi.json",
    "schema": "/v1/subgraphs/sbtc-token/schema.json",
    "markdown": "/v1/subgraphs/sbtc-token/docs.md"
  }
}
```
