indexer.getNamespace
Reads what the indexer serves for a namespace: its networks and which features are complete. Options, result, errors and examples for indexer.getNamespace.
Reads what the indexer serves for a namespace: its networks and which features are complete.
When to use
Use to decide which features to show, e.g. hide verified records where they are unsupported.
Signature
function getNamespace(
client: Like,
options?: getNamespace.Options,
): Promise<getNamespace.ReturnType>Call it as ens.indexer.getNamespace(options) on a client, or Actions.indexer.getNamespace(client, options).
indexer.getNamespace.request(options) builds a deferred read for Actions.batch. See Look up many at once.
Parameters
| Option | Type | Default | Description |
|---|---|---|---|
namespace | Namespace | "ens" |
Also takes the read options.
Returns
Resolves to Result<NamespaceInfo> | null. The namespace's coverage, or null when the indexer does not know it.
Errors
| Error | Codes | When |
|---|---|---|
NotFoundError | INDEXER_NOT_FOUND | with strict: true when the indexer does not know the namespace. |
ConfigError | INDEXER_NOT_CONFIGURED | the client has no indexer. |
IndexerError | INDEXER_UNSUPPORTED | the indexer does not serve the query or its namespace. |
IndexerError | INDEXER_UNAVAILABLE, INDEXER_RATE_LIMITED, INDEXER_BEHIND, INDEXER_REQUEST_REJECTED, INDEXER_RESPONSE_INVALID | the indexer is unavailable, rate limiting, behind, rejects the request or answers unexpectedly. |
It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).
See How errors work.
Examples
const ens_ = await ens.indexer.getNamespace()Example response
Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.
await ens.indexer.getNamespace({ namespace: "ens" }){
"namespace": "ens",
"capabilities": {
"name_history": "full",
"name_profile": "full",
"subnames": "full",
"verified_primary_name": "full",
"verified_records": "full"
},
"networks": [
{
"network": "ethereum",
"chainId": 1,
"protocol": "ensV2",
"sinceBlock": "26183742n"
}
],
"asOf": null,
"snapshots": {},
"asOfToken": null,
"completeness": "full",
"unsupportedReason": null,
"unsupportedFields": [],
"origin": null,
"indexer": "bigname"
}Was this page helpful?