Using ENSNode's API
Subgraph API
Section titled “Subgraph API”ENSNode exposes a Subgraph-Compatible GraphQL endpoint at /subgraph
.
For details on subgraph compatibility, see the Subgraph Compatibility documentation.
GraphiQL Playground
Section titled “GraphiQL Playground”To explore the schema and run queries, use the GraphiQL Playground below.
GraphQL Examples
Section titled “GraphQL Examples”Fetch data about the three most recently-created domains.
{ domains(orderBy: createdAt, orderDirection: desc, first: 3) { name expiryDate }}
{ "data": { "domains": [ { "name": "ensanguo.eth", "expiryDate": "1758170255" }, { "name": "fiffer.eth", "expiryDate": "2041994243" }, { "name": "rifaisicilia.eth", "expiryDate": "1758170039" } ] }}
Config API
Section titled “Config API”The Config API provides a complete view of an ENSNode instance’s public configuration, making it easy to understand and verify it’s configuration.
Endpoint: GET /api/config
This endpoint returns the public configuration object containing all the essential information about an ENSNode instance, including ENS namespace, indexed chains, enabled features, active plugins, and dependency versions.
Key Configuration Details
Section titled “Key Configuration Details”The response includes several important configuration categories:
- ENS: current ENS namespace
- Network Configuration: URLs for ENSAdmin interface, public ENSNode API, and ENSRainbow service
- Chains: Lists of indexed chains
- Feature Flags: Boolean settings for experimental features and optional functionality
- Plugins: Activated plugins
- ENSIndexer Version Information: Node.js version, Ponder framework version, ENSRainbow version and schema details, ENSDb version, ENSIndexer version, ENS Normalize version
Example response
Section titled “Example response”{ "indexedChainIds": [ 1, 8453, 59144, 10, 42161, 534352 ], "databaseSchemaName": "alphaSchema0.35.0", "isSubgraphCompatible": false, "labelSet": { "labelSetId": "subgraph", "labelSetVersion": 0 }, "namespace": "mainnet", "plugins": [ "subgraph", "basenames", "lineanames", "threedns", "protocol-acceleration", "referrals", "tokenscope" ], "versionInfo": { "nodejs": "22.18.0", "ponder": "0.11.43", "ensDb": "0.35.0", "ensIndexer": "0.35.0", "ensNormalize": "1.11.1", "ensRainbow": "0.34.0", "ensRainbowSchema": 3 }}
Indexing Status API
Section titled “Indexing Status API”Monitor an ENSNode’s indexing progress across multiple chains with the Indexing Status API. This endpoint provides a realtime indexing projection at the given moment. The projection includes a cross-chain indexing status snapshot that collects chain status snapshots for each indexed chain. At the moment, the cross-chain indexing status snapshot can be represented as an omnichain indexing status snapshot.
Endpoint: GET /api/indexing-status
Perfect for building monitoring dashboards, health checks, or determining whether your ENSNode has caught up with recent onchain activity.
Understanding the Response
Section titled “Understanding the Response”The status response provides both overall and chain-specific information.
Example response
Section titled “Example response”{ "responseCode": "ok", "realtimeProjection": { "projectedAt": 1760435068, "worstCaseDistance": 199550209, "snapshot": { "strategy": "omnichain", "slowestChainIndexingCursor": 1560884859, "snapshotTime": 1760435068, "omnichainSnapshot": { "omnichainStatus": "omnichain-backfill", "chains": { "1": { "chainStatus": "chain-backfill", "config": { "configType": "indefinite", "startBlock": { "timestamp": 1489165544, "number": 3327417 } }, "latestIndexedBlock": { "timestamp": 1560884859, "number": 7984099 }, "backfillEndBlock": { "timestamp": 1760432243, "number": 23574893 } }, "8453": { "chainStatus": "chain-queued", "config": { "configType": "indefinite", "startBlock": { "timestamp": 1721932307, "number": 17571480 } } } }, "omnichainIndexingCursor": 1560884859 } } }}
Realtime Indexing Distance
Section titled “Realtime Indexing Distance”When monitoring indexing or performing time-sensitive operations, you may wish to verify that an ENSNode instance has indexed sufficient blocks to be within an acceptable distance from the current “tip” of all indexed chains.
The Indexing Status API supports a realtimeProjection.worstCaseDistance
field
in response object that enables this verification.
How it works
Section titled “How it works”The realtimeProjection.worstCaseDistance
field holds a duration value in
seconds, representing the max distance between the now and
the latest indexed block of each chain and the “tip” of all indexed chains.
This allows your client to programmatically determine whether the ENSNode instance is sufficiently synchronized for your use case before proceeding with operations that depend on the latest onchain data.