Interactive NFD lookup

'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.

Last updated