Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforgeSDK

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.

ReadBatchablestable
Since v1.0.0View source

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

  • owner and excludeOwner cannot 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

OptionTypeDefaultDescription
limitnumberRows per page, 1–200. @default 50
cursorstringThe previous page's cursor.
includeTotalbooleanCount every row (totalCount); slower.
address (required)stringContract address.
chainIdnumberChain of the contract. @default the client's chain
ownerstringOnly labels this address holds.
excludeOwnerstringOnly labels this address does not hold.

Also takes the read options.

Returns

Resolves to Page<RegistryLabel>. One page of labels.

Errors

ErrorCodesWhen
InvalidInputErrorINVALID_ADDRESSan invalid address.
ConfigErrorINDEXER_NOT_CONFIGUREDthe client has no indexer.
IndexerErrorINDEXER_UNSUPPORTEDthe indexer does not serve the query or its namespace.
IndexerErrorINDEXER_UNAVAILABLE, INDEXER_RATE_LIMITED, INDEXER_BEHIND, INDEXER_REQUEST_REJECTED, INDEXER_RESPONSE_INVALIDthe 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

Listing a registry's labels
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?