nftokens
Get trait breakdown for a collection
get
/nft/collection/{slug}/traits
operationId: nft-collectionTraits

Returns the trait / attribute-value breakdown for an NFT collection. Each entry is a traitType (e.g. "Background") with its observed values and per-value counts. Trait groups are ordered alphabetically by traitType; values within a group are ordered by descending count (most common first). Returns an empty array when the slug does not resolve to an indexed collection, or when no NFTs in the collection carry attributes.

Unlock protected endpoints

Enter your Bearer token once to enable every protected route in this API reference.

HTTP bearer

Saved for this browser tab only. The credential is never sent until you test an endpoint.

Authorizations
NameLocationDetails
BearerAuthAuthorization header · bearerJWT issued by the Honeycluster auth service for the `indexer` audience. Present as `Authorization: Bearer <token>`.
Path Parameters
NameTypeDefaultDescription
slug
required
string
Collection slug in `issuer:taxon` form. Example: `rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B:42`.
Responses
200
application/json
Successful response
FieldTypeDescription
traits
object[]
Trait groups for the collection, ordered alphabetically by `traitType`. Empty when the slug does not resolve to an indexed collection or no NFTs in it carry attributes.
traits[].traitType
string
Attribute category (e.g. "Background").
traits[].values
object[]
Distinct values observed for this trait, ordered by descending count.
traits[].values[].value
string
Attribute value (e.g. "Blue").
traits[].values[].count
integer
Number of NFTs in the collection that carry this trait value.
Example
Json
{
  "traits": [
    {
      "traitType": "string",
      "values": [
        {
          "value": "string",
          "count": 0
        }
      ]
    }
  ]
}
400
application/json
Invalid input data
FieldTypeDescription
message
string
The error message
code
string
The error code
issues
object[]
An array of issues that were responsible for the error
issues[].message
string
Example
Json
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}
401
application/json
Authorization not provided
FieldTypeDescription
message
string
The error message
code
string
The error code
issues
object[]
An array of issues that were responsible for the error
issues[].message
string
Example
Json
{
  "code": "UNAUTHORIZED",
  "message": "Authorization not provided",
  "issues": []
}
403
application/json
Insufficient access
FieldTypeDescription
message
string
The error message
code
string
The error code
issues
object[]
An array of issues that were responsible for the error
issues[].message
string
Example
Json
{
  "code": "FORBIDDEN",
  "message": "Insufficient access",
  "issues": []
}
404
application/json
Not found
FieldTypeDescription
message
string
The error message
code
string
The error code
issues
object[]
An array of issues that were responsible for the error
issues[].message
string
Example
Json
{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
500
application/json
Internal server error
FieldTypeDescription
message
string
The error message
code
string
The error code
issues
object[]
An array of issues that were responsible for the error
issues[].message
string
Example
Json
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}