NFTs API
The traits of an NFT collection
Every trait value across one NFT collection, with how many items carry it and its share of the collection — the rarity table — most common first, with a cursor for the next page.
/api/external/nft-analysis/nft-collection-traits/{chain}/{address}What it returns
Every trait value across one collection's NFTs, 100 per page, each with how many items carry it and that share of the collection, most common first across every trait type. Keep passing nextCursor back as cursor until it is null.
Chains
- BNB Chain BNB
- Ethereum ETH
- Base BASE
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/nft-analysis/nft-collection-traits/BNB/<address>"
| Parameter | Description |
|---|---|
cursorquery · string · optional | An opaque cursor from a previous response's nextCursor, for the next page. It only pages the chain and collection it was issued for; an empty one, or one over 2048 characters, is a 400 (enforced after the API-key gate). |
chainpath · string · required | ETH, BNB or BASE. SOL, STABLE, RHC and ARC return 400: no wired source lists a collection's traits there. CELO, ARB, OP and SCROLL return 400 here. |
addresspath · string · required | The NFT collection's contract address. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
contract | string | The collection contract, lowercase. |
traits | object[] | This page's trait values, most common first across every trait type. An empty first page means no trait is known for the address. |
traits[].traitType | string | The trait type, as the collection's metadata names it. |
traits[].value | string | The trait value, as a string. |
traits[].count | integer | How many of the collection's token ids carry this value. |
traits[].percentage | number | That count as a percentage (0 to 100) of the collection's token ids. Lower is rarer. |
nextCursor | string | null | Pass back as cursor for the next page. null on the last page. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key