Skip to main content

Get DID NFTs

This endpoint allows you to fetch NFTs associated with a specific DID (Decentralized Identifier), including both created and owned NFTs.

Endpoint

GET https://api.spacescan.io/did/nfts/{did}

Parameters

ParameterTypeRequiredDefaultDescription
didstringYes-The Decentralized Identifier (DID)
typestringNoownedType of NFTs to fetch: all, created, owned
simplebooleanNofalseWhen true, returns only basic NFT info to reduce response size and improve performance
pagenumberNo1Page number for pagination
countnumberNo100Number of NFTs per page (max: 100)
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 GET "https://pro-api.spacescan.io/did/nfts/{did}" \
-H "x-api-key: YOUR_API_KEY"

Live API Test

Request Examples

Response

Failed to load API response. Please try again later.

Response Schema

FieldTypeDescription
statusstringThe status of the API request
dataobjectThe main data object
data.owned_nft_countnumberTotal number of NFTs owned by the DID
data.created_nft_countnumberTotal number of NFTs created by the DID
data.pagenumberCurrent page number
data.sizenumberNumber of NFTs per page
data.owned_nftsarrayArray of owned NFTs (when type is 'owned' or 'all')
data.created_nftsarrayArray of created NFTs (when type is 'created' or 'all')

NFT Object Schema (Full Mode)

FieldTypeDescription
idstringThe NFT ID
namestringThe NFT name
preview_urlstringURL to the NFT preview image
created_heightstringBlock height when NFT was created
created_timestringTimestamp when NFT was created
flaggedbooleanWhether the NFT has been flagged
descriptionstringNFT description
collectionobjectCollection information
collection.idstringCollection ID
collection.namestringCollection name
last_salestringLast sale price in mojos
creatorobjectCreator information
creator.addressstringCreator's address
creator.address_hexstringCreator's address in hex format
creator.didstringCreator's DID
creator.did_hexstringCreator's DID in hex format
ownerobjectOwner information
owner.addressstringOwner's address
owner.address_hexstringOwner's address in hex format
sensitive_contentbooleanWhether the NFT contains sensitive content
attributesarrayNFT attributes
raritynumberNFT rarity score
top_bidnumberCurrent top bid price
buy_nownumberBuy now price

NFT Object Schema (Simple Mode)

FieldTypeDescription
idstringThe NFT ID
namestringThe NFT name
preview_urlstringURL to the NFT preview image
collectionobjectCollection information
collection.idstringCollection ID
collection.namestringCollection name

Type Parameter Options

  • owned (default): Returns only NFTs currently owned by the DID
  • created: Returns only NFTs created by the DID
  • all: Returns both owned and created NFTs

Simple Mode Benefits

When simple=true is used:

  • Reduced Response Size: Only essential fields are included
  • Faster Performance: Less data processing and transfer
  • Lower Bandwidth: Ideal for mobile applications or when only basic info is needed
  • Better Caching: Smaller responses can be cached more efficiently

Example Responses

{
"status": "success",
"data": {
"owned_nft_count": 25,
"created_nft_count": 10,
"page": 1,
"size": 50,
"owned_nfts": [
{
"id": "nft1abc123def456",
"name": "Cool NFT #1",
"preview_url": "https://assets.spacescan.io/nft/image1.jpg",
"created_height": "1234567",
"created_time": "2023-01-15T10:30:00Z",
"flagged": false,
"description": "A really cool NFT",
"collection": {
"id": "col123",
"name": "Cool Collection"
},
"last_sale": "1000000",
"creator": {
"address": "xch1abc...",
"address_hex": "abc123...",
"did": "did:chia:123...",
"did_hex": "123..."
},
"owner": {
"address": "xch1def...",
"address_hex": "def456..."
},
"sensitive_content": false,
"attributes": [],
"rarity": 85,
"top_bid": 500000,
"buy_now": 2000000
}
],
"created_nfts": []
}
}