Skip to main content

Get Collection NFTs

This endpoint returns NFTs in a collection with optional filtering and sorting capabilities.

Endpoint

POST https://api.spacescan.io/collections/{collection_id}/nfts

Parameters

ParameterTypeRequiredDefaultDescription
collection_idstringYes-The unique identifier of the collection
pagenumberNo1Page number for pagination
countnumberNo50Number of items per page
owner_didstringNo-Filter NFTs by owner DID

Request Body (Filters)

{
"traits": [
{"head": "Background", "subhead": "Blue"}
],
"rarity": {
"min": 1,
"max": 100,
"percentage": 10
},
"orderBy": "rarity",
"order": "desc"
}
Free API

Use api.spacescan.io for free tier access. See our API Plans for rate limits and features.

Pro API

Use pro-api.spacescan.io with your API key in the x-api-key header. See our API Plans for details.

curl -X POST "https://pro-api.spacescan.io/collections/{collection_id}/nfts" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"traits": [{"head": "Background", "subhead": "Blue"}]}'

Request Example

Response

Failed to load API response. Please try again later.

Response Schema

FieldTypeDescription
statusstringThe status of the API request
dataarrayList of NFTs
paginationobjectPagination information

NFT Object

FieldTypeDescription
idstringNFT ID
namestringNFT name
descriptionstringNFT description
preview_urlstringNFT preview URL
minted_atstringMinting timestamp
trade_countnumberNumber of trades
volumenumberTrading volume
attributesarrayNFT attributes/traits
ownerobjectOwner details

Error Responses

HTTP Status CodeMeaning
400Bad Request -- Invalid parameters
429Too Many Requests -- Rate limit exceeded
500Internal Server Error
503Service Unavailable