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

Request body

idinteger required

Client-supplied request ID echoed in the response.

jsonrpc'2.0' required
method'ankr_getNFTMetadata' required

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.

idinteger required
jsonrpc'2.0' required

Changes

No recorded changes to this operation across all 1 revision of this API.