Skip to main content

Fetch an NFT

How to get an NFTs informations

By AssetID

You would have to use the nft query with the nft assetID parameter.

You can request information on the base details, the sale part, the metadatas, the owner and much more.

Graphql Example

Request

query Nft {
nft(assetId: "0x3caf681231bd99df1d2247f41f8e5f02e750fc5e_28") {
base {
address
kind
owner
owners_avatars
asset_id
total_owners
editions
token_id
}
sale {
sale_id
seller
unitary_price
unitary_price_float
top_bid_float
quantity
start_date
expiration_date
kind
status
floor_diff
}
metadatas {
name
description
thumbnail_url
thumbnail_mime
animation_url
background_color
external_url
youtube_url
extra
}
assets {
raw_image_url
raw_image_mime
raw_animation_url
raw_animation_mime
hd_image_url
hd_animation_url
hd_animation_mime
}
attributes {
trait_type
value
proba
}
owner {
avatar
name
address
amount_traded
}
creator {
avatar
name
address
amount_traded
}
interactions {
likes
favorites
}
best_offer
}
}
With CURL
curl -H 'content-type: application/json' \
-d '{"query":"query Nft {\n nft(assetId: \"0x3caf681231bd99df1d2247f41f8e5f02e750fc5e_28\") {\n base {\n address\n kind\n owner\n owners_avatars\n asset_id\n total_owners\n editions\n token_id\n }\n sale {\n sale_id\n seller\n unitary_price\n unitary_price_float\n top_bid_float\n quantity\n start_date\n expiration_date\n kind\n status\n floor_diff\n }\n metadatas {\n name\n description\n thumbnail_url\n thumbnail_mime\n animation_url\n background_color\n external_url\n youtube_url\n extra\n }\n assets {\n raw_image_url\n raw_image_mime\n raw_animation_url\n raw_animation_mime\n hd_image_url\n hd_animation_url\n hd_animation_mime\n }\n attributes {\n trait_type\n value\n proba\n }\n collection {\n address\n name\n symbol\n kind\n certified\n }\n owner {\n avatar\n name\n address\n amount_traded\n }\n creator {\n avatar\n name\n address\n amount_traded\n }\n interactions {\n likes\n favorites\n }\n best_offer\n }\n}","variables":null,"operationName":"Nft"}' \
'https://public-api.dev.kalao.io/query'

Response

You will get data.nft result of type NFTDetails.

{
"data": {
"nft": {
"base": {
"address": "0x3caf681231bd99df1d2247f41f8e5f02e750fc5e",
"kind": "erc721",
"owner": "0x2f39c4d4693a1fdfd95e0e7a98231c9861ccb86c",
"owners_avatars": [
"https://storage.kalao.io/assets-v2/default-avatar.png"
],
"asset_id": "0x3caf681231bd99df1d2247f41f8e5f02e750fc5e_28",
"total_owners": "1",
"editions": "1",
"token_id": "28"
},
"sale": null,
"metadatas": {
"name": "RYU#1807",
"description": "RYU NFT Gen1 is a collection of breeding and staking dragons that earns $RYU",
"thumbnail_url": "https://storage.googleapis.com/beta-kalao/nfts/0x3caf681231bd99df1d2247f41f8e5f02e750fc5e/0x3caf681231bd99df1d2247f41f8e5f02e750fc5e_28/thumbnail",
"thumbnail_mime": "image/png",
"animation_url": "",
"background_color": "",
"external_url": "",
"youtube_url": "",
"extra": ""
},
"assets": {
"raw_image_url": "https://ipfs.io/ipfs/QmR7DvPE1BHV3jydTYpFopdoBVoyURG9p9JBWWEtg71a2H",
"raw_image_mime": "image/png",
"raw_animation_url": "",
"raw_animation_mime": "",
"hd_image_url": "https://storage.googleapis.com/beta-kalao/nfts/0x3caf681231bd99df1d2247f41f8e5f02e750fc5e/0x3caf681231bd99df1d2247f41f8e5f02e750fc5e_28/details",
"hd_animation_url": "",
"hd_animation_mime": ""
},
"attributes": [
{
"trait_type": "Background",
"value": "Digiscape",
"proba": 15.79
},
{
"trait_type": "Body",
"value": "Burnt",
"proba": 5.26
},
{
"trait_type": "Head",
"value": "Madd cyborg",
"proba": 10.53
},
{
"trait_type": "Mouth",
"value": "Rose",
"proba": 10.53
}
],
"collection": {
"address": "0x3caf681231bd99df1d2247f41f8e5f02e750fc5e",
"name": "Ryu NFTs test",
"symbol": "RYUTEST",
"kind": "erc721",
"certified": true
},
"owner": {
"avatar": "https://storage.kalao.io/assets-v2/default-avatar.png",
"name": "",
"address": "0x2f39c4d4693a1fdfd95e0e7a98231c9861ccb86c",
"amount_traded": ""
},
"creator": {
"avatar": "https://storage.kalao.io/assets-v2/default-avatar.png",
"name": "anonymous",
"address": "0x20dbf6ad54bdae76e42aee8960b7e2e56a053eff",
"amount_traded": ""
},
"interactions": {
"likes": 0,
"favorites": 0
},
"best_offer": 0.20000000298023224
}
}
}