---
title: "Get metadata and attributes for a single NFT"
method: POST
path: "/?ankr_getNFTMetadata"
tags: ["NFT API"]
---

# Get metadata and attributes for a single NFT

`POST /?ankr_getNFTMetadata`

## Request

- Base URL: `https://rpc.ankr.com/multichain/569ca1f392f7d3d0bb1073a1173ecb649af1d9249231fe59fa95db19d5ae41fe`
- URL: `https://rpc.ankr.com/multichain/569ca1f392f7d3d0bb1073a1173ecb649af1d9249231fe59fa95db19d5ae41fe/?ankr_getNFTMetadata`
- Auth: none declared
- TypeScript: <https://skmtc.dev/ankr/apis/ankr-advanced-api/docs/%3Fankr_getNFTMetadata/post.ts> (a function with typed inputs; its response is checked against the schema)

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 body

- object
  - `id` integer, required: Client-supplied request ID echoed in the response.
  - `jsonrpc` '2.0', required
  - `method` 'ankr_getNFTMetadata', required
  - `params` object, required
    - `blockchain` 'arbitrum' | 'avalanche' | 'base' | 'bsc' | 'eth' | 'fantom' | 'flare' | 'gnosis' | 'linea' | 'optimism' | 'polygon' | 'scroll' | 'somnia_mainnet' | 'taiko' | 'telos' | 'xlayer' | 'avalanche_fuji' | 'base_sepolia' | 'eth_sepolia' | 'optimism_sepolia' | 'polygon_amoy', required: Target blockchain identifier.
    - `contractAddress` string, required: Contract address of the NFT. ENS names accepted on Ethereum.
    - `tokenId` string, required: On-chain token ID of the NFT.
    - `forceFetch` boolean: Read metadata directly from the contract (`true`) or from Ankr's indexed cache (`false`).

## Response `200`

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.

- object
  - `id` integer, required
  - `jsonrpc` '2.0', required
  - `result` object, required
    - `attributes` object, nullable, required: Per-token attributes.
      - `contractType` string: `ERC721`, `ERC1155`, `ENS`, or `POAP`.
      - `description` string
      - `imageUrl` string: URL to the NFT image (often IPFS).
      - `name` string
      - `tokenUrl` string: URL to the off-chain tokenURI.
      - `traits` object[]: Trait list declared in the token metadata.
        - `trait_type` string
        - `value` string
    - `metadata` object, nullable, required: Collection-level metadata.
      - `blockchain` 'arbitrum' | 'avalanche' | 'base' | 'bsc' | 'eth' | 'fantom' | 'flare' | 'gnosis' | 'linea' | 'optimism' | 'polygon' | 'scroll' | 'somnia_mainnet' | 'taiko' | 'telos' | 'xlayer' | 'avalanche_fuji' | 'base_sepolia' | 'eth_sepolia' | 'optimism_sepolia' | 'polygon_amoy'
      - `collectionName` string
      - `collectionSymbol` string
      - `contractAddress` string
      - `contractType` string: `ERC721`, `ERC1155`, `ENS`, or `POAP`.
      - `tokenId` string

## Other responses

- `400`: Bad Request — malformed JSON-RPC envelope or invalid `params`. The gateway rejects before the JSON-RPC layer processes the call.
- `401`: Unauthorized — missing or invalid API key in the server URL path. Verify that `{API_KEY}` is set to a valid project key.
- `429`: 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.
- `500`: Server error — unexpected condition. Retry with exponential backoff; if it persists, file a ticket at https://www.ankr.com/support/.

---

[API](https://skmtc.dev/ankr/apis/ankr-advanced-api.md) - [All operations](https://skmtc.dev/ankr/apis/ankr-advanced-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ankr/apis/ankr-advanced-api/revisions/77e494aeec1b?raw)
