Get non-fungible token metadata
Retrieves metadata for a SIP-009 non-fungible token.
Path Parameters
principalNon-Fungible Token Contract Principal
SIP-009 compliant smart contract principal
Pattern
"^[0123456789ABCDEFGHJKMNPQRSTVWXYZ]{28,41}\\.[a-zA-Z]([a-zA-Z0-9]|[-_]){0,39}$"
token_idToken ID
Token ID to retrieve
Query Parameters
locale?Localization
Metadata localization to retrieve
Response Body
curl -X GET "https://api.hiro.so/metadata/v1/nft/SP497E7RX3233ATBS2AB9G4WTHB63X5PBSP5VGAQ.boomboxes-cycle-12/35?locale=string"
fetch("https://api.hiro.so/metadata/v1/nft/SP497E7RX3233ATBS2AB9G4WTHB63X5PBSP5VGAQ.boomboxes-cycle-12/35?locale=string")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.hiro.so/metadata/v1/nft/SP497E7RX3233ATBS2AB9G4WTHB63X5PBSP5VGAQ.boomboxes-cycle-12/35?locale=string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://api.hiro.so/metadata/v1/nft/SP497E7RX3233ATBS2AB9G4WTHB63X5PBSP5VGAQ.boomboxes-cycle-12/35?locale=string"
response = requests.request("GET", url)
print(response.text)
{
"token_uri": "ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json",
"metadata": {
"sip": 16,
"name": "Satoshi's Team #12200",
"description": "Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets",
"image": "ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png",
"cached_image": "https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png",
"cached_thumbnail_image": "https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png",
"attributes": [
{
"trait_type": "Background",
"display_type": "string",
"value": "value"
}
],
"properties": {
"collection": "Foo Collection",
"total_supply": "10000"
},
"localization": {
"uri": "http://token.com/metadata?hl={locale}",
"default": "en",
"locales": [
"en",
"jp"
]
}
}
}
{
"error": "Token not found"
}
{
"error": "Token metadata fetch in progress"
}