indexer.getRegistryLabels
Lists the labels of an ENSv2 registry, optionally only those an address holds or does not hold. Options, errors and examples for indexer.getRegistryLabels.
Lists the labels of an ENSv2 registry, optionally only those an address holds or does not hold.
When to use
Use to browse a registry's names, e.g. the subnames recreated during migration.
Details
ownerandexcludeOwnercannot be combined.
Signature
function getRegistryLabels(
client: Like,
options: getRegistryLabels.Options,
): Promise<getRegistryLabels.ReturnType>Call it as ens.indexer.getRegistryLabels(options) on a client, or Actions.indexer.getRegistryLabels(client, options).
indexer.getRegistryLabels.request(options) builds a deferred read for Actions.batch. See Look up many at once.
Parameters
| Option | Type | Default | Description |
|---|---|---|---|
limit | number | Rows per page, 1–200. @default 50 | |
cursor | string | The previous page's cursor. | |
includeTotal | boolean | Count every row (totalCount); slower. | |
address (required) | string | Contract address. | |
chainId | number | Chain of the contract. @default the client's chain | |
owner | string | Only labels this address holds. | |
excludeOwner | string | Only labels this address does not hold. |
Also takes the read options.
Returns
Resolves to Page<RegistryLabel>. One page of labels.
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_ADDRESS | an invalid address. |
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 page = await ens.indexer.getRegistryLabels({ address: "0x02ca…" })Example response
Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.
await ens.indexer.getRegistryLabels({ address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", chainId: 1, limit: 3 }){
"asOf": {
"chainId": 1,
"blockNumber": "26443964n",
"blockHash": "0xe75c58ea2f28bd7c6cc53c28a5ab4fc02023f3563661f0a7236a36b779e3ac86",
"timestamp": "1795029143n"
},
"snapshots": {
"1": {
"chainId": 1,
"blockNumber": "26443964n",
"blockHash": "0xe75c58ea2f28bd7c6cc53c28a5ab4fc02023f3563661f0a7236a36b779e3ac86",
"timestamp": "1795029143n"
}
},
"asOfToken": null,
"completeness": "full",
"unsupportedReason": null,
"unsupportedFields": [],
"origin": null,
"indexer": "bigname",
"items": [],
"cursor": null,
"hasMore": false,
"totalCount": 0
}Was this page helpful?