Quick Start

For local testing, we highly recommend something like HTTPIE. It's much nicer to use than CURL, provides clean json body creation and automatically displays json responses in a clean format.

See: https://httpie.io/cli

The examples will reference using the httpie command via the 'http' command.

VIEWS in GET requests

First, a quick note about the 'view' property in many of the APIs. For efficiency, many API requests have a default 'view' that returns a focused amount of data more appropriate for certain requestors. This view is what will be returned if no view parameter is explicitly set. Typically this is the 'brief' view. Some queries return a special 'thumbnail' view that is meant to to be very simple - often used for interactive 'search by name' types of queries. Thumbnail is basically 'tiny' + avatar links.

Example views differences for an NFD (nfdomains.algo in this example):

{
    "caAlgo": [
        "RSV2YCHXA7MWGFTX3WYI7TVGAS5W5XH5M7ZQVXPPRQ7DNTNW36OW2TRR6I"
    ],
    "depositAccount": "RSV2YCHXA7MWGFTX3WYI7TVGAS5W5XH5M7ZQVXPPRQ7DNTNW36OW2TRR6I",
    "name": "nfdomains.algo",
    "owner": "NRLA7VZ2YV6WOS2LBS3UK25DB463XRSNG63BYNQI6CSGGROFWVQ2EKBQSI",
    "properties": {},
    "unverifiedCaAlgo": [
        "ABHE544MXL2CWMIZONAIUBNVELWYMKYKWBDNRLOEFQJN3LNF2ZWSMDEKBQ"
    ]
}

GET an NFD by NAME

To fetch an NFD by explicit name, make an HTTP GET call to the /nfd/{name} endpoint.

No parameters are required. Fetching a name will return the 'brief' view by default which is sufficient for most fetches a wallet would use for example.

Please don't use the 'poll' or 'nocache' query parameters, except for specific UI/UX transitions as part of a minting process. Ask in the dev channels for details.

Get examples

Get name using defaults (brief view)
http https://api.nf.domains/nfd/nfdomains.algo
{
    "appID": 763844423,
    "category": "common",
    "metaTags": [
        "9_letters"
    ],
    "name": "nfdomains.algo",
    "depositAccount": "RSV2YCHXA7MWGFTX3WYI7TVGAS5W5XH5M7ZQVXPPRQ7DNTNW36OW2TRR6I",
    "nfdAccount": "FQDCZYHSK6CHLESEN76AGMSZ4JMT2H5BKWSV6NN2YAKDF22NUAJAOZ4ZIY",
    "owner": "NRLA7VZ2YV6WOS2LBS3UK25DB463XRSNG63BYNQI6CSGGROFWVQ2EKBQSI",
    "properties": {
        "userDefined": {
            "avatar": "https://images.nf.domains/avatar/9f1940b9-2cf5-43cb-96e5-f3b36385fc90"
        }
    },
    "saleType": "buyItNow",
    "state": "owned",
    "unverifiedCaAlgo": [
        "RSV2YCHXA7MWGFTX3WYI7TVGAS5W5XH5M7ZQVXPPRQ7DNTNW36OW2TRR6I",
        "ABHE544MXL2CWMIZONAIUBNVELWYMKYKWBDNRLOEFQJN3LNF2ZWSMDEKBQ",
        "OMXLQTI5ZSMWTCIZA3O3YBW74BTCOI67SZTOEDHK3ZEDZ34Z3DEOQD4PW4"
    ]
}
Get name using "full" view
http 'https://api.nf.domains/nfd/nfdomains.algo?view=full'
{
    "appID": 763844423,
    "asaID": 763844429,
    "category": "common",
    "currentAsOfBlock": 21686682,
    "metaTags": [
        "9_letters"
    ],
    "name": "nfdomains.algo",
    "depositAccount": "RSV2YCHXA7MWGFTX3WYI7TVGAS5W5XH5M7ZQVXPPRQ7DNTNW36OW2TRR6I",
    "nfdAccount": "FQDCZYHSK6CHLESEN76AGMSZ4JMT2H5BKWSV6NN2YAKDF22NUAJAOZ4ZIY",
    "owner": "NRLA7VZ2YV6WOS2LBS3UK25DB463XRSNG63BYNQI6CSGGROFWVQ2EKBQSI",
    "properties": {
        "internal": {
            "asaid": "763844429",
            "category": "common",
            "commission1": "50",
            "commission1Agent": "RSV2YCHXA7MWGFTX3WYI7TVGAS5W5XH5M7ZQVXPPRQ7DNTNW36OW2TRR6I",
            "contractLocked": "0",
            "highestSoldAmt": "1000000",
            "name": "nfdomains.algo",
            "owner": "NRLA7VZ2YV6WOS2LBS3UK25DB463XRSNG63BYNQI6CSGGROFWVQ2EKBQSI",
            "saleType": "buyItNow",
            "seller": "NRLA7VZ2YV6WOS2LBS3UK25DB463XRSNG63BYNQI6CSGGROFWVQ2EKBQSI",
            "timeChanged": "1655530642",
            "timeCreated": "1654229863",
            "timePurchased": "1654233465",
            "ver": "1.08"
        },
        "userDefined": {
            "avatar": "https://images.nf.domains/avatar/9f1940b9-2cf5-43cb-96e5-f3b36385fc90",
            "banner": "https://images.nf.domains/banner/da11c55f-8b85-416d-9361-612082d26f03",
            "bio": "Discord: https://discord.gg/7XcuMTfeZP",
            "caalgo": "RSV2YCHXA7MWGFTX3WYI7TVGAS5W5XH5M7ZQVXPPRQ7DNTNW36OW2TRR6I,ABHE544MXL2CWMIZONAIUBNVELWYMKYKWBDNRLOEFQJN3LNF2ZWSMDEKBQ,OMXLQTI5ZSMWTCIZA3O3YBW74BTCOI67SZTOEDHK3ZEDZ34Z3DEOQD4PW4",
            "github": "https://github.com/TxnLab",
            "website": "https://app.nf.domains"
        },
        "verified": {
            "twitter": "@nfdomains"
        }
    },
    "saleType": "buyItNow",
    "seller": "NRLA7VZ2YV6WOS2LBS3UK25DB463XRSNG63BYNQI6CSGGROFWVQ2EKBQSI",
    "state": "owned",
    "timeChanged": "2022-06-18T05:37:22Z",
    "timeCreated": "2022-06-03T04:17:43Z",
    "timePurchased": "2022-06-03T05:17:45Z",
    "unverifiedCaAlgo": [
        "RSV2YCHXA7MWGFTX3WYI7TVGAS5W5XH5M7ZQVXPPRQ7DNTNW36OW2TRR6I",
        "ABHE544MXL2CWMIZONAIUBNVELWYMKYKWBDNRLOEFQJN3LNF2ZWSMDEKBQ",
        "OMXLQTI5ZSMWTCIZA3O3YBW74BTCOI67SZTOEDHK3ZEDZ34Z3DEOQD4PW4"
    ]
}

GET NFDs for an Algorand Account Address (reverse lookup)

To fetch NFDs that an an address points to, make an HTTP GET call to the /nfd/lookup?address=xxxxx[&address=yyyyy] endpoint.

Multiple addresses can be passed to the endpoint, with each address specified as an additional address=xxx query parameter.

If nothing is matched, a 404 (Not Found) is returned. This is a valid return status, and also helps performance due to CDN negative caching.

For more detailed information on this endpoint, please see some of the details described in Resolving an Algorand address to an NFD name / avatar

Last updated