ankr_getNFTMetadata
Get metadata and attributes for a single NFT
POST/?ankr_getNFTMetadata
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).
Request
Responses
- 200
- 400
- 401
- 429
- 500
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.
Bad Request — malformed JSON-RPC envelope or invalid params. The gateway rejects before the JSON-RPC layer processes the call.
Unauthorized — missing or invalid API key in the server URL path. Verify that {API_KEY} is set to a valid project key.
Too Many Requests — the API key has exceeded its rate or quota limits. Back off and retry; consider upgrading the Premium tier for higher limits.
Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/.