Get Collection Info
This endpoint returns detailed information about a specific NFT collection.
Endpoint
- Mainnet
- Testnet
GET https://api.spacescan.io/collections/{collection_id}
GET https://api-testnet11.spacescan.io/collections/{collection_id}
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
collection_id | string | Yes | The unique identifier of the collection |
include_nft_count | boolean | No | Include total NFTs count |
include_trades | boolean | No | Include total trades count |
include_volume | boolean | No | Include total volume |
Use api.spacescan.io
for free tier access. See our API Plans for rate limits and features.
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/collections/{collection_id}" \
-H "x-api-key: YOUR_API_KEY"
Live API Test
- Mainnet
- Testnet
Request Example
- cURL
- Python
- JavaScript
- Mainnet
- Testnet
import requests
collection_id = "col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl"
url = f"https://api.spacescan.io/collections/{collection_id}"
response = requests.get(url)
data = response.json()
print(data)
import requests
collection_id = "col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl"
url = f"https://api-testnet11.spacescan.io/collections/{collection_id}"
response = requests.get(url)
data = response.json()
print(data)
- Mainnet
- Testnet
const collectionId = "col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl";
const url = https://api.spacescan.io/collections/${collectionId}
;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const collectionId = "col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl";
const url = https://api-testnet11.spacescan.io/collections/${collectionId}
;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response
Failed to load API response. Please try again later.
Response Schema
Field | Type | Description |
---|---|---|
status | string | The status of the API request |
data | object | Collection details |
Collection Object
Field | Type | Description |
---|---|---|
id | string | Collection ID |
name | string | Collection name |
description | string | Collection description |
preview_url | string | Collection icon URL |
banner_url | string | Collection banner URL |
creator | object | Creator details |
nft_count | number | Total NFTs (if requested) |
trade_count | number | Total trades (if requested) |
volume | number | Total volume (if requested) |
Error Responses
HTTP Status Code | Meaning |
---|---|
400 | Bad Request -- Invalid parameters |
429 | Too Many Requests -- Rate limit exceeded |
500 | Internal Server Error |
503 | Service Unavailable |