<!-- source: https://secondlayer.tools/docs/api-reference#list-subgraphs -->

## List the subgraphs this instance serves

`GET /v1/subgraphs`

Every subgraph deployed on this instance, with its tables, sync position, and approximate row count. Hosted: your account's subgraphs, then every public one. The anonymous list is cached for 30 seconds and carries an `ETag`; send `If-None-Match` for a 304.

### Returns

One `SubgraphDirectory` object.

### Responses

- `200` The subgraph directory
- `304` Anonymous request whose `If-None-Match` matches the current `ETag`; no body
- `401` This bind requires the instance token, and it was missing or wrong
- `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 \
  -H "Authorization: Bearer $SECONDLAYER_API_KEY"
```

```json
{
  "subgraphs": [
    {
      "name": "sbtc-token",
      "description": null,
      "status": "active",
      "version": "1.0.0",
      "created_at": "2026-09-01T12:00:00.000Z",
      "total_rows": 48138,
      "sources": [
        "SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token"
      ],
      "last_processed_block": 9048931,
      "blocks_behind": 0,
      "tables": [
        "transfers"
      ],
      "url": "/v1/subgraphs/sbtc-token"
    }
  ],
  "tip": {
    "block_height": 9048931
  },
  "envelope": {
    "rows": "GET /v1/subgraphs/:name/:table → { rows, next_cursor, tip }",
    "cursor": "_id keyset by default, or ?_sort=<column>&_order=asc|desc for a composite keyset; pass ?cursor=<next_cursor> to resume"
  }
}
```
