NFD API
  • NFDomains API
  • Quick Start
  • Reference
    • On-Chain Reference
      • On-Chain Diagram V3+
        • On-Chain Diagram V2+
        • V1 On-Chain Diagram
      • Registry Application IDs
      • Contract methods
      • Name & Address Lookup
        • V1 Resolution example (go)
          • Example PyTeal name/ID validity check
      • NFDs owned by Address
      • Reading of NFD metadata
      • Properties
      • Contract Changelog
    • NFDomains REST API Reference
    • Integrators Guide
      • Using an NFD for sending assets to Algorand accounts
      • Using an NFD to sending to non-Algorand chains.
      • Resolving an Algorand address to an NFD name / avatar
      • Interactive NFD lookup
      • Discord / Telegram bots
      • Linking an Application to an NFD
      • Using Vaults (2.x+)
      • Expirations / MBR liquidation
    • API Changelog
    • Status Page
  • Community
Powered by GitBook
On this page
  1. Reference
  2. Integrators Guide

Interactive NFD lookup

PreviousResolving an Algorand address to an NFD name / avatarNextDiscord / Telegram bots

Last updated 1 year ago

'Looking up' an NFD interactively (debounce)

If you want to provide interactive search features for an NFD. You can use the NFD 'search' endpoint using the prefix query parameter.

The endpoint is the /nfd/v2/search endpoint. It takes many query parameters but only certain types should be specified at one time.

ie: prefix, but not owner or reservedFor.

Example

Get first 4 matching names by prefix (forced 'thumbnail' view)
http https://api.nf.domains/nfd/v2/search?prefix=patric&view=thumbnail&limit=4

{
    "nfds": [
        {
            "appID": 1184583458,
            "depositAccount": "MQ2QJHZSZ6A7ZXPFE2EPIWLYUMRRDO3DQBEO6NIQ2B5A5OJ4VMWOOI2AX4",
            "name": "patrick.voi.algo",
            "owner": "MQ2QJHZSZ6A7ZXPFE2EPIWLYUMRRDO3DQBEO6NIQ2B5A5OJ4VMWOOI2AX4",
            "parentAppID": 984682143,
            "properties": {},
            "state": "owned"
        },
        {
            "appID": 1016975892,
            "depositAccount": "SAC732VSDG3J7ZVDOIV7I5Y3REVCYB2EPMNU6PRLJY67L37YOARYSD2PDM",
            "name": "patricia.eth.algo",
            "owner": "SAC732VSDG3J7ZVDOIV7I5Y3REVCYB2EPMNU6PRLJY67L37YOARYSD2PDM",
            "parentAppID": 1016578024,
            "properties": {},
            "state": "owned"
        },
        {
            "appID": 1016975648,
            "depositAccount": "SAC732VSDG3J7ZVDOIV7I5Y3REVCYB2EPMNU6PRLJY67L37YOARYSD2PDM",
            "name": "patricia.btc.algo",
            "owner": "SAC732VSDG3J7ZVDOIV7I5Y3REVCYB2EPMNU6PRLJY67L37YOARYSD2PDM",
            "parentAppID": 1016575127,
            "properties": {},
            "state": "owned"
        },
        {
            "appID": 1016602998,
            "depositAccount": "MQ2QJHZSZ6A7ZXPFE2EPIWLYUMRRDO3DQBEO6NIQ2B5A5OJ4VMWOOI2AX4",
            "name": "patrick.btc.algo",
            "owner": "MQ2QJHZSZ6A7ZXPFE2EPIWLYUMRRDO3DQBEO6NIQ2B5A5OJ4VMWOOI2AX4",
            "parentAppID": 1016575127,
            "properties": {},
            "state": "owned"
        }
    ],
    "total": 10
}

The thumbnail view will return verified and userDefined avatars for names. This way, the UI can show avatars with choices as well, as seen here in this NFDomains search UI example:

Note the verified.avatarasaid property in this example (same exists for banner, bannerasaid when fetching with other views). For integrations that manage their own ASA caching, this may make it easier to reference already cached versions of the NFT image if the ASA id is used instead of IPFS CID references.

Search NFDs via various filters

get

Search NFDs via various filters

Query parameters
namestringOptional

name or partial match of NFD name to filter on

parentAppIDinteger · int64Optional

The parent NFD Application ID to find. Used for fetching segments of an NFD

Example: 1000000
ownerstringOptional

An Algorand Account address

Example: 4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZUPattern: ^[A-Z2-7]{57}[AEIMQUY4]$
reservedForstringOptional

An Algorand Account address

Example: 4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZUPattern: ^[A-Z2-7]{57}[AEIMQUY4]$
excludeUserReservedbooleanOptional

Should NFDs reserved for an account (transfers for example or unclaimed winning auctions) be excluded

prefixstring · min: 1 · max: 32Optional

The start of an NFD name, fetching multiple NFDs that have that prefix

substringstring · min: 3 · max: 32Optional

Part of an NFD name, fetching multiple NFDs that have that substring (minimum 3 characters)

vpropertystring · enumOptional

Verified property name to search on - specify value with vvalue

Example: telegramPossible values:
vvaluestringOptional

Value to find in the vproperty field specified with the vproperty parameter

Example: abc123
segmentLockedbooleanOptional

Whether to explicitly filter on segments being locked or unlocked. Typically only valuable when filtering on unlocked

Example: false
segmentRootbooleanOptional

Whether to explicitly filter on NFD roots or segments. True to only see roots, False to only see segments.

Example: false
minPriceinteger · int64Optional

Minimum price of NFD

maxPriceinteger · int64Optional

Maximum price of NFD

minPriceUsdinteger · int64Optional

Minimum price of NFD Segment in USD (cents)

maxPriceUsdinteger · int64Optional

Maximum price of NFD Segment in USD (cents)

changedAfterstring · date-timeOptional

Fetch NFDs that changed after the specified timestamp

Example: 1970-01-01T00:00:01Z
expiresBeforestring · date-timeOptional

Return only NFDs with an expiration time at or before the specified timestamp

Example: 1970-01-01T00:00:01Z
limitinteger · int64 · min: 1 · max: 200Optional

Limit the number of results returned - max 200

Default: 50
offsetinteger · int64Optional

Starting document in large list. Fetch 1-100 [limit 100], pass offset 100 to fetch 100-200

Default: 0
sortstring · enumOptional

What to sort on

Default: createdDescPossible values:
viewstring · enumOptional

View of data to return, tiny (name, owner, caAlgo, unverifiedCaAlgo only), brief (default), or full

Default: briefPossible values:
Header parameters
if-none-matchstringOptional

etag

Responses
200
OK response.
application/json
304
ETag not changed
400
invalidAddress: invalidAddress is returned for an Algorand address that doesn't appear to be valid
application/vnd.goa.error
404
notFound: Not Found response.
application/vnd.goa.error
429
rateLimited: Too Many Requests response.
application/json
get
GET /nfd/v2/search HTTP/1.1
Host: api.nf.domains
Accept: */*
{
  "match-check": "abc123",
  "nfds": [
    {
      "appID": 1000000,
      "asaID": 1,
      "avatarOutdated": false,
      "caAlgo": [
        "4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZU"
      ],
      "cache-control": "abc123",
      "category": "abc123",
      "currentAsOfBlock": 1,
      "depositAccount": "4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZU",
      "etag": "abc123",
      "expired": false,
      "match-check": "abc123",
      "metaTags": [
        "abc123"
      ],
      "name": "abc123",
      "nfdAccount": "4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZU",
      "owner": "4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZU",
      "parentAppID": 1000000,
      "properties": {
        "internal": {
          "abc123": "abc123"
        },
        "userDefined": {
          "ca:b": "abc123"
        },
        "verified": {
          "caAlgo": "abc123"
        }
      },
      "reservedFor": "4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZU",
      "saleType": "abc123",
      "sellAmount": 1,
      "seller": "4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZU",
      "sigNameAddress": "4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZU",
      "state": "abc123",
      "tags": [
        "abc123"
      ],
      "timeChanged": "1970-01-01T00:00:01Z",
      "timeCreated": "1970-01-01T00:00:01Z",
      "timeExpires": "1970-01-01T00:00:01Z",
      "timePurchased": "1970-01-01T00:00:01Z",
      "unverifiedCa": {
        "btc": [
          "12KKDt4Mj7N5UAkQMN7LtPZMayenXHa8KL"
        ]
      },
      "unverifiedCaAlgo": [
        "4F5OA5OQC5TBHMCUDJWGKMUZAQE7BGWCKSJJSJEMJO5PURIFT5RW3VHNZU"
      ]
    }
  ],
  "total": 1
}
  • 'Looking up' an NFD interactively (debounce)
  • GETSearch NFDs via various filters
  • Example