Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

The Graph Subgraphs API

The Subgraphs API from The Graph — 2 operation(s) for subgraphs.

The Graph Subgraphs API is one of 6 APIs that The Graph publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Subgraphs. The published artifact set on APIs.io includes an OpenAPI specification.

This API exposes 2 operations across 2 paths. It is described by OpenAPI 3.1.0, at version 1.0.

Requests are made against a single base URL, https://gateway.thegraph.com.

2 operations 2 paths 0 schemas 2 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
1.0
Base URL
https://gateway.thegraph.com/api/{apiKey}/subgraphs/id/{subgraphId}
Authentication
HTTP Bearer
Resource Areas
1

Authentication & Security 1

The Graph Subgraphs API declares 1 security scheme for authenticating requests. It accepts HTTP bearer tokens (bearerAuth). By default, every request must be authenticated, though some operations may also be called without credentials.

  • bearerAuth — The Graph API key passed as an Authorization Bearer token.

Paths & Operations 2

Across 2 paths, the API surfaces 2 operations — 2 POST. Each is listed below with its method, path, parameters, and response codes.

Subgraphs 2
POST
/api/{apiKey}/subgraphs/id/{subgraphId}
Execute a GraphQL query against a subgraph
querySubgraph 2 params body → 200
POST
/api/subgraphs/id/{subgraphId}
Execute a GraphQL query against a subgraph (header-auth variant)
querySubgraphHeaderAuth 1 param body → 200

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

the-graph-subgraphs-api-openapi.yml Raw ↑

Other APIs The Graph publishes across the network.

The Graph Subgraphs (GraphQL)
The Graph Token API
The Graph Substreams
Graph Node Admin JSON-RPC (self-hosted)
Firehose