NFT API
Get metadata and attributes for a single NFT
Returns full metadata for a single NFT (ERC-721, ERC-1155, ENS, or POAP) — collection info, contract type, traits, image URL, and tokenURI.
Pass the contractAddress of the collection, the tokenId, and the blockchain the NFT lives on. Set forceFetch: true to bypass Ankr's metadata cache and read directly from the contract (slower; useful when the cached metadata is stale).
Part of the NFT API product (700 compute units per call, $0.00007 at base rate).
post/?ankr_getNFTMetadata
Request
- Base URLhttps://rpc.ankr.com/multichain/569ca1f392f7d3d0bb1073a1173ecb649af1d9249231fe59fa95db19d5ae41fe
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"id": 1,
"jsonrpc": "2.0",
"method": "ankr_getNFTMetadata",
"params": {
"blockchain": "avalanche",
"contractAddress": "0x8d01c8ee82e581e55c02117a676b5bbd4734fabb",
"tokenId": "23240"
}
}Response
Success. JSON-RPC result contains metadata (chain, contract type, IDs) and attributes (description, image, traits). JSON-RPC errors are returned with HTTP 200; check for an error key in the response body.
Changes
No recorded changes to this operation across all 1 revision of this API.