🥷
Namespace
  • [ Introduction ]
    • ENS
    • Namespace
  • Official Links
  • [ Dapps ]
    • Overview
    • Onchain Subs (App)
      • Search & Register
      • Wizard
        • Listing an ENS Name
        • Features List
      • ENS Widget
      • Farcaster Frames
        • Default Frame
        • Custom Frame
    • Offchain Subs (DevPortal)
      • Subname create/manage
      • Resolver set
      • API keys
  • How-to Guides and Demos
  • [ Dev Docs ]
    • SDK
      • Offchain Manager
        • Installation
        • Generate API key
        • Create or Update Subname
        • DeleteSubname
        • IsSubnameAvailable
        • GetFilteredSubnames
        • AddressRecords
          • ChainName
        • TextRecords
        • DataRecords
      • Indexer Manager
        • Installation
        • Methods
        • GetL2Subname
        • GetL2Subnames
      • Mint Manager
        • Installation
        • GetMintDetails
        • GetMintTransactionParameters
        • IsSubnameAvailable
        • How To Mint L1 & L2 subname via mint-manager
      • Namespace Client (deprecated)
        • Installation
        • GetListedName
        • GetMintDetails
        • GetMintTransactionParameters
        • IsSubnameAvailable
        • GenerateAuthToken
    • APIs
      • Offchain Manager
      • Mint Manager
    • Infrastructure
      • Namespace L2 Subnames
  • [ ecosystem ]
    • Use Cases
  • [ Jobs ]
    • 🧑‍💻 Full-Stack Dev
    • 🥷 Dev-Rel Lead
    • 💼 BD Lead
Powered by GitBook
On this page
  • Request Interface
  • Usage Example
  • Return Type
  1. [ Dev Docs ]
  2. SDK
  3. Offchain Manager

GetFilteredSubnames

The getFilteredSubnames method allows you to retrieve a list of subnames based on various filtering parameters such as label search, owner, pagination, and metadata.

Request Interface

To use this method, provide a QuerySubnamesRequest object containing your desired filters.

export interface QuerySubnamesRequest {
  parentName: string;
  labelSearch?: string;
  page?: number;
  size?: number;
  metadata?: Record<string, string>;
  owner?: string
}
  • parentName: The ENS name under which to search for subnames.

  • labelSearch: Optional substring to match against subname labels.

  • page: Optional page number for paginated results (default is 1).

  • size: Optional page size (number of items per page).

  • metadata: Optional metadata key-value filters.

  • owner: Optional Ethereum address to filter subnames by owner.

Usage Example

client.getFilteredSubnames({ parentName: "myensname.eth", labelSearch: "ns" });

Return Type

The method returns a paginated response containing a list of subnames.

export interface PagedResponse<SubnameResponse> {
  page: number
  size: number
  items: SubnameResponse[],
  totalItems: number
}

export interface SubnameResponse {
  id: string;
  fullName: string;
  parentName: string;
  label: string;
  texts: Record<string, string>;
  addresses: Record<string, string>;
  metadata: Record<string, string>;
  contenthash?: string;
  namehash: string;
}
  • page: Current page number.

  • size: Number of items per page.

  • items: Array of subnames matching the filters.

  • totalItems: Total number of matching subnames.

  • SubnameResponse: Detailed info for each subname.

PreviousIsSubnameAvailableNextAddressRecords

Last updated 11 hours ago