Get DID Information
This endpoint allows you to fetch detailed information about a specific DID (Decentralized Identifier).
Endpoint
- Mainnet
- Testnet
GET https://api.spacescan.io/did/info/{did}
GET https://api-testnet11.spacescan.io/did/info/{did}
Parameters
Parameter | Type | Description |
---|---|---|
did | string | The Decentralized Identifier (DID) |
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/did/info/{did}" \
-H "x-api-key: YOUR_API_KEY"
Live API Test
- Mainnet
- Testnet
Request Example
- cURL
- Python
- JavaScript
- Mainnet
- Testnet
import requests
did = "did:chia:19qf3g9876t0rkq7tfdkc28cxfy424yzanea29rkzylq89kped9hq3q7wd2"
url = f"https://api.spacescan.io/did/info/{did}"
response = requests.get(url)
data = response.json()
print(data)
import requests
did = "did:chia:19qf3g9876t0rkq7tfdkc28cxfy424yzanea29rkzylq89kped9hq3q7wd2"
url = f"https://api-testnet11.spacescan.io/did/info/{did}"
response = requests.get(url)
data = response.json()
print(data)
- Mainnet
- Testnet
const did = "did:chia:19qf3g9876t0rkq7tfdkc28cxfy424yzanea29rkzylq89kped9hq3q7wd2";
const url = https://api.spacescan.io/did/info/${did}
;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const did = "did:chia:19qf3g9876t0rkq7tfdkc28cxfy424yzanea29rkzylq89kped9hq3q7wd2";
const url = https://api-testnet11.spacescan.io/did/info/${did}
;
fetch(url)
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response
- Mainnet
- Testnet
Failed to load API response. Please try again later.
Failed to load API response. Please try again later.
Response Schema
Field | Type | Description |
---|---|---|
status | string | The status of the API request |
data | object | The main data object |
data.did | object | DID information |
data.did.did | string | The DID identifier |
data.did.did_hex | string | Hexadecimal representation of the DID |
data.name | string | Name associated with the DID |
data.name_nft_id | string | NFT ID associated with the name (if any) |
data.name_service | string | Name service information |
data.expiry | string | Expiration date (if applicable) |
data.profile_url | string | URL to the profile image |
data.banner_url | string | URL to the banner image |
data.flagged | boolean | Whether the DID has been flagged |
data.social | object | Social media information |
data.bio | string | Biography or description |
data.collections_count | string | Number of NFT collections |
data.created_nft_count | string | Number of NFTs created |
data.owned_nft_count | number | Number of NFTs owned |