List Collections
This endpoint returns a paginated list of NFT collections with optional stats.
Endpoint
- Mainnet
- Testnet
GET https://api.spacescan.io/collections
GET https://api-testnet11.spacescan.io/collections
Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
page | number | No | 1 | Page number for pagination |
count | number | No | 50 | Number of items per page |
include_nft_count | boolean | No | false | Include total NFTs count |
include_trades | boolean | No | false | Include total trades count |
include_volume | boolean | No | false | 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?page=1&count=50" \
-H "x-api-key: YOUR_API_KEY"
Live API Test
- Mainnet
- Testnet
Request Example
- cURL
- Python
- JavaScript
- Mainnet
- Testnet
- Mainnet
- Testnet
import requests
url = "https://api.spacescan.io/collections?page=1&count=50&include_nft_count=true"
response = requests.get(url)
data = response.json()
print(data)
import requests
url = "https://api-testnet11.spacescan.io/collections?page=1&count=50&include_nft_count=true"
response = requests.get(url)
data = response.json()
print(data)
- Mainnet
- Testnet
const url = https://api.spacescan.io/collections?page=1&count=50&include_nft_count=true
;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const url = https://api-testnet11.spacescan.io/collections?page=1&count=50&include_nft_count=true
;
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 | array | List of collections |
pagination | object | Pagination information |
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 |