/nft/collection/{slug}/traitsnft-collectionTraitsReturns 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.
| Name | Location | Details |
|---|---|---|
BearerAuth | Authorization header · bearer | JWT issued by the Honeycluster auth service for the `indexer` audience. Present as `Authorization: Bearer <token>`. |
| Name | Type | Default | Description |
|---|---|---|---|
slugrequired | string | Collection slug in `issuer:taxon` form. Example: `rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B:42`. |
| Field | Type | Description |
|---|---|---|
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[]. | string | Attribute category (e.g. "Background"). |
traits[]. | object[] | Distinct values observed for this trait, ordered by descending count. |
traits[]. | string | Attribute value (e.g. "Blue"). |
traits[]. | integer | Number of NFTs in the collection that carry this trait value. |
{
"traits": [
{
"traitType": "string",
"values": [
{
"value": "string",
"count": 0
}
]
}
]
}| Field | Type | Description |
|---|---|---|
message | string | The error message |
code | string | The error code |
issues | object[] | An array of issues that were responsible for the error |
issues[]. | string |
{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}| Field | Type | Description |
|---|---|---|
message | string | The error message |
code | string | The error code |
issues | object[] | An array of issues that were responsible for the error |
issues[]. | string |
{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}| Field | Type | Description |
|---|---|---|
message | string | The error message |
code | string | The error code |
issues | object[] | An array of issues that were responsible for the error |
issues[]. | string |
{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}| Field | Type | Description |
|---|---|---|
message | string | The error message |
code | string | The error code |
issues | object[] | An array of issues that were responsible for the error |
issues[]. | string |
{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}| Field | Type | Description |
|---|---|---|
message | string | The error message |
code | string | The error code |
issues | object[] | An array of issues that were responsible for the error |
issues[]. | string |
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}