Get NFT by contract and token ID
Returns detailed information about a specific NFT including collection data and metadata
Parameters
chainId
* number (Enum)queryBlockchain network identifier
contract
* string queryNFT contract address
id
* string queryUnique token identifier within the contract
provider
* string (Enum)queryData provider source for the NFT
Request Body
This request doesn’t have any request body.
JavaScript
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const axios = require('axios');
async function httpCall() {
const url = 'https://api.1inch.com/nft/v2/contract';
const config = {
headers: {
Authorization: `Bearer ${API_KEY}`,
},
params: {
contract: '0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D',
id: '1234',
provider: 'OPENSEA',
},
paramsSerializer: {
indexes: null,
},
};
const body = {};
try {
const response = await axios.get(url, body, config);
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Returns
200
400
401
500
Detailed NFT information including collection, creator, and traits
id
* string Unique identifier (format: chainId:contract:tokenId)
token_id
* string Unique token identifier within the contract
name
* string Name of the NFT
image_url
* object URL of the NFT image
chainId
* number Blockchain network identifier
provider
* string Data provider source (OPENSEA, RARIBLE, POAP)
description
* string Description of the NFT
permalink
* string Permanent URL to the NFT on the provider platform
collection
* any Collection information
allOf[0]
Collection object NFT collection information
image_url
* string URL of the collection image
name
* string Name of the collection
description
* string Description of the collection
creator
* any Creator information
allOf[0]
Creator object NFT creator information including wallet address and profile
profile_img_url
* string URL of the creator profile image
address
* string Wallet address of the creator
user
* any Creator user information
allOf[0]
User object User account information
username
* string Username of the account
traits
* array List of NFT traits/attributes
items
Traits object Key-value pair representing an NFT trait attribute
value
* string Value of the trait attribute
asset_contract
* any NFT contract information
allOf[0]
AssetContract object NFT contract information including address and token standard
address
* string Contract address on the blockchain
schema_name
* string Token standard (e.g., ERC721, ERC1155)
JSON
Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"id": "string",
"token_id": "string",
"name": "string",
"image_url": null,
"chainId": 0,
"provider": "string",
"description": "string",
"permalink": "string",
"collection": {
"image_url": "string",
"name": "string",
"description": "string"
},
"creator": {
"profile_img_url": "string",
"address": "string",
"user": {
"username": "string"
}
},
"traits": [
{
"value": "string"
}
],
"asset_contract": {
"address": "string",
"schema_name": "string"
}
}