@@ -8,32 +8,32 @@ import ApiCallExample from '@site/src/components/ApiCallExample';
8
8
9
9
# Get NFT Information
10
10
11
- This endpoint allows you to fetch detailed information about a specific NFT using its NFT ID .
11
+ This endpoint allows you to fetch detailed information about a specific NFT.
12
12
13
13
### Endpoint
14
14
15
15
<Tabs >
16
16
<TabItem value =" mainnet " label =" Mainnet " >
17
17
18
- ```
19
- GET https://api.spacescan.io/nft/info /{nft_id}
18
+ ``` bash
19
+ GET https://api.spacescan.io/nfts /{nft_id}
20
20
```
21
21
22
22
</TabItem >
23
23
<TabItem value =" testnet " label =" Testnet " >
24
24
25
- ```
26
- GET https://api-testnet11.spacescan.io/nft/info /{nft_id}
25
+ ``` bash
26
+ GET https://api-testnet11.spacescan.io/nfts /{nft_id}
27
27
```
28
28
29
29
</TabItem >
30
30
</Tabs >
31
31
32
32
### Parameters
33
33
34
- | Parameter | Type | Description |
35
- | -----------| -------- | ------------------------------------ -------------|
36
- | nft_id | string | The unique NFT ID |
34
+ | Parameter | Type | Required | Default | Description |
35
+ | -----------| ------| ----------| ---------| -------------|
36
+ | nft_id | string | Yes | - | The unique identifier of the NFT |
37
37
38
38
:::info Free API
39
39
Use ` api.spacescan.io ` for free tier access. See our [ API Plans] ( https://spacescan.io/apis#plans ) for rate limits and features.
@@ -43,7 +43,7 @@ Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacesc
43
43
Use ` pro-api.spacescan.io ` with your API key in the ` x-api-key ` header. See our [ API Plans] ( https://spacescan.io/apis#plans ) for details.
44
44
45
45
``` bash
46
- curl -X GET " https://pro-api.spacescan.io/nft/info /{nft_id}" \
46
+ curl -X GET " https://pro-api.spacescan.io/nfts /{nft_id}" \
47
47
-H " x-api-key: YOUR_API_KEY"
48
48
```
49
49
:::
@@ -52,123 +52,122 @@ curl -X GET "https://pro-api.spacescan.io/nft/info/{nft_id}" \
52
52
53
53
<Tabs >
54
54
<TabItem value =" mainnet " label =" Mainnet " >
55
- <a href="https://api.spacescan.io/nft/info/nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u" target="_blank" rel="noopener noreferrer" className="api-test-button">
56
- 🚀 Test API in Browser
57
- </a>
58
- </TabItem >
59
- <TabItem value =" testnet " label =" Testnet " >
60
- <a href="https://api-testnet11.spacescan.io/nft/info/nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u" target="_blank" rel="noopener noreferrer" className="api-test-button">
55
+ <a href="https://api.spacescan.io/nfts/nft10lutrplp2mqrp0wg27sjmjeezzluk9a7jgmjpdv6n5qalkpy8kxqrkqag7" target="_blank" rel="noopener noreferrer" className="api-test-button">
61
56
🚀 Test API in Browser
62
57
</a>
63
58
</TabItem >
64
59
</Tabs >
65
60
66
- ### Request Example
61
+ ### Request Examples
67
62
68
63
<Tabs >
69
64
<TabItem value =" curl " label =" cURL " >
70
- <Tabs>
71
- <TabItem value="mainnet" label="Mainnet">
72
- <CodeBlock language="bash">
73
- curl -X GET "https://api.spacescan.io/nft/info/nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u"
74
- </CodeBlock>
75
- </TabItem>
76
- <TabItem value="testnet" label="Testnet">
77
- <CodeBlock language="bash">
78
- curl -X GET "https://api-testnet11.spacescan.io/nft/info/nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u"
79
- </CodeBlock>
80
- </TabItem>
81
- </Tabs>
65
+
66
+ ``` bash
67
+ curl -X GET " https://api.spacescan.io/nfts/nft10lutrplp2mqrp0wg27sjmjeezzluk9a7jgmjpdv6n5qalkpy8kxqrkqag7"
68
+ ```
69
+
82
70
</TabItem >
83
71
<TabItem value =" python " label =" Python " >
84
- <Tabs>
85
- <TabItem value="mainnet" label="Mainnet">
86
- <CodeBlock language="python">
87
- import requests
88
-
89
- nft_id = "nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u"
90
- url = f"https://api.spacescan.io/nft/info/{nft_id}"
91
-
92
- response = requests.get(url)
93
- data = response.json()
94
- print(data)
95
- </CodeBlock>
96
- </TabItem>
97
- <TabItem value="testnet" label="Testnet">
98
- <CodeBlock language="python">
99
- import requests
100
-
101
- nft_id = "nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u"
102
- url = f"https://api-testnet11.spacescan.io/nft/info/{nft_id}"
103
-
104
- response = requests.get(url)
105
- data = response.json()
106
- print(data)
107
- </CodeBlock>
108
- </TabItem>
109
- </Tabs>
72
+
73
+ ``` python
74
+ import requests
75
+
76
+ nft_id = " nft10lutrplp2mqrp0wg27sjmjeezzluk9a7jgmjpdv6n5qalkpy8kxqrkqag7"
77
+ url = f " https://api.spacescan.io/nfts/ { nft_id} "
78
+
79
+ response = requests.get(url)
80
+ data = response.json()
81
+ print (data)
82
+ ```
83
+
110
84
</TabItem >
111
85
<TabItem value =" javascript " label =" JavaScript " >
112
- <Tabs>
113
- <TabItem value="mainnet" label="Mainnet">
114
- <CodeBlock language="javascript">
115
- const nftId = "nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u";
116
- const url = `https://api.spacescan.io/nft/info/${nftId}`;
117
-
118
- fetch(url)
119
- .then(response => response.json())
120
- .then(data => console.log(data))
121
- .catch(error => console.error('Error:', error));
122
- </CodeBlock>
123
- </TabItem>
124
- <TabItem value="testnet" label="Testnet">
125
- <CodeBlock language="javascript">
126
- const nftId = "nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u";
127
- const url = `https://api-testnet11.spacescan.io/nft/info/${nftId}`;
128
-
129
- fetch(url)
130
- .then(response => response.json())
131
- .then(data => console.log(data))
132
- .catch(error => console.error('Error:', error));
133
- </CodeBlock>
134
- </TabItem>
135
- </Tabs>
136
- </TabItem >
137
- </Tabs >
138
86
139
- ### Response
87
+ ``` javascript
88
+ const nftId = " nft10lutrplp2mqrp0wg27sjmjeezzluk9a7jgmjpdv6n5qalkpy8kxqrkqag7" ;
89
+ const url = ` https://api.spacescan.io/nfts/${ nftId} ` ;
90
+
91
+ fetch (url)
92
+ .then (response => response .json ())
93
+ .then (data => console .log (data))
94
+ .catch (error => console .error (' Error:' , error));
95
+ ```
140
96
141
- <Tabs >
142
- <TabItem value =" mainnet " label =" Mainnet " >
143
- <ApiCallExample endpoint="https://api.spacescan.io/nft/info/nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u" />
144
- </TabItem >
145
- <TabItem value =" testnet " label =" Testnet " >
146
- <ApiCallExample endpoint="https://api-testnet11.spacescan.io/nft/info/nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u" />
147
97
</TabItem >
148
98
</Tabs >
149
99
150
100
### Response Schema
151
101
152
- | Field | Type | Description |
153
- | --------------------| ---------| -------------------------------------------------------|
154
- | status | string | The status of the API request |
155
- | nft | object | Detailed information about the NFT |
156
- | nft.nft_id | string | The unique identifier of the NFT |
157
- | nft.name | string | The name of the NFT |
158
- | nft.description | string | Description of the NFT |
159
- | nft.collection_id | string | ID of the collection this NFT belongs to |
160
- | nft.metadata_uri | string | URI to the NFT's metadata |
161
- | nft.metadata | object | Metadata of the NFT |
162
- | nft.owner | string | Current owner's address |
163
- | nft.minted_height | number | Block height when the NFT was minted |
164
- | nft.minted_timestamp | number | Timestamp when the NFT was minted |
102
+ | Field | Type | Description |
103
+ | -------| ------| -------------|
104
+ | id | string | The unique identifier of the NFT |
105
+ | name | string | The name of the NFT |
106
+ | preview_url | string | URL to the NFT's preview image |
107
+ | created_height | string | Block height when the NFT was created |
108
+ | created_time | string | Timestamp of NFT creation |
109
+ | collection | object | Collection information |
110
+ | collection.id | string | Collection identifier |
111
+ | collection.name | string | Collection name |
112
+ | collection.description | string | Collection description |
113
+ | collection.preview_url | string | Collection preview image URL |
114
+ | price | string | Current listing price |
115
+ | creator | object | Creator information including DID and address |
116
+ | owner | object | Current owner information including DID and address |
117
+ | description | string | NFT description |
118
+ | data_url | array | Array of URLs to NFT data |
119
+ | metadata_urls | array | Array of URLs to NFT metadata |
120
+ | license_urls | array | Array of URLs to license information |
121
+ | rarity | number | Rarity score |
122
+ | top_bid | string | Highest bid amount |
123
+ | last_sale | string | Last sale price |
124
+ | current_price | string | Current listing price |
125
+ | attributes | array | Array of NFT attributes/traits |
126
+
127
+ ### Example Response
128
+
129
+ ``` json
130
+ {
131
+ "id" : " nft10lutrplp2mqrp0wg27sjmjeezzluk9a7jgmjpdv6n5qalkpy8kxqrkqag7" ,
132
+ "name" : " Chia Friends #6707" ,
133
+ "preview_url" : " https://assets.spacescan.io/nft/95cdc50c1315791cacc318c8d45ebff64863f355ad833bc2144cabb7b47db271.webp" ,
134
+ "created_height" : " 2208201" ,
135
+ "created_time" : " 2022-07-04T05:01:44.000Z" ,
136
+ "collection" : {
137
+ "id" : " col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl" ,
138
+ "name" : " Chia Friends" ,
139
+ "description" : " 10,000 eco-bit NFTs on Chia, from Chia." ,
140
+ "preview_url" : " https://assets.spacescan.io/col/a7f7513f445bf620d230d06442ea938cb0703a48ebbd0e16f8113c6472383f04.webp"
141
+ },
142
+ "price" : " 6.9000000000000" ,
143
+ "creator" : {
144
+ "did" : {
145
+ "id" : " did:chia:19qf3g9876t0rkq7tfdkc28cxfy424yzanea29rkzylq89kped9hq3q7wd2" ,
146
+ "name" : " Chia Network"
147
+ },
148
+ "address" : {
149
+ "address" : " xch1mvdvhnl9mmmqdl9e4nvvr6ak329vmv293k0t3hfy2p983t3lj4wqdgqu7j"
150
+ }
151
+ },
152
+ "attributes" : [
153
+ {
154
+ "value" : " Yak" ,
155
+ "trait_type" : " Background"
156
+ },
157
+ {
158
+ "value" : " Parakeet (Green)" ,
159
+ "trait_type" : " Body"
160
+ }
161
+ ]
162
+ }
163
+ ```
165
164
166
165
### Error Responses
167
166
168
- | HTTP Status Code | Meaning |
169
- | ------------------ | ---------------------------------------------------------------------------------- ---------|
170
- | 400 | Bad Request -- Your request is invalid. |
171
- | 404 | Not Found -- The specified NFT could not be found. |
172
- | 429 | Too Many Requests -- You're requesting too many times! Slow down! |
173
- | 500 | Internal Server Error -- We had a problem with our server. Try again later. |
174
- | 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
167
+ | HTTP Status Code | Meaning |
168
+ | -----------------| ---------|
169
+ | 400 | Bad Request -- Your request is invalid |
170
+ | 404 | Not Found -- The specified NFT could not be found |
171
+ | 429 | Too Many Requests -- You're requesting too many times |
172
+ | 500 | Internal Server Error -- We had a problem with our server |
173
+ | 503 | Service Unavailable -- We're temporarily offline for maintenance |
0 commit comments