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.

GET/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>"
Parameters
ParameterDescription
cursor

query · 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).
chain

path · 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.
address

path · 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.

Response fields of The traits of an NFT collection
FieldTypeDescription
contractstringThe collection contract, lowercase.
traitsobject[]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[].traitTypestringThe trait type, as the collection's metadata names it.
traits[].valuestringThe trait value, as a string.
traits[].countintegerHow many of the collection's token ids carry this value.
traits[].percentagenumberThat count as a percentage (0 to 100) of the collection's token ids. Lower is rarer.
nextCursorstring | nullPass 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