For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Advanced API — NFT API

API reference for the Ankr Advanced API — enriched multichain JSON-RPC served from a single endpoint: https://rpc.ankr.com/multichain/YOUR_ANKR_API_KEY.

NFT API


ERC-721 / ERC-1155 / ENS / POAP enrichment endpoints — wallet NFT holdings, collection holders, transfer history, and per-token metadata.


ankr_getNFTHolders

POST ankr_getNFTHolders

Returns the list of wallet addresses that currently hold any token from the specified NFT collection. Useful for snapshotting an allowlist, computing distribution stats, or driving holder-gated drops.

Pass the contractAddress of the collection plus the blockchain it lives on. Page through large collections with pageSize (default 1000, max 10000) and the nextPageToken echoed in each response.

Part of the NFT API product (700 compute units per call, $0.00007 at base rate).

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (object; required):

    • blockchain (string; required): Target blockchain identifier. Allowed values: arbitrum, avalanche, base, bsc, eth, fantom, flare, gnosis, linea, optimism, polygon, scroll, story_mainnet, syscoin, taiko, telos, xai, xlayer, avalanche_fuji, base_sepolia, eth_holesky, eth_sepolia, optimism_testnet, polygon_amoy, story_aeneid_testnet.
    • contractAddress (string; required): Contract address of the NFT collection. ENS names accepted on Ethereum.
    • pageSize (integer; optional; default: 1000): Entries per page. Default 1000, maximum 10000.
    • pageToken (string; optional): Opaque page token from a prior response's nextPageToken.
Request example
curl -X POST https://rpc.ankr.com/multichain/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "ankr_getNFTHolders",
"params": {
"blockchain": "arbitrum",
"contractAddress": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
"pageSize": 10
}
}'
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"holders": [
"0x000000000000000000000000000000000000dead",
"0x000000000000d34c44564053af35e4fe271d0caa",
"0x00000000000a29a0800f6f557ddbbe8249397de7"
],
"nextPageToken": "rFN6s7bcVaihtGvazmFxvsyFkoDx39sPyMULxoGT6SuoFi3tHzeAqmkVbzCtDCAQhFt6TsngYzVdMaWj"
}
}

ankr_getNFTMetadata

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).

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (object; required):

    • blockchain (string; required): Target blockchain identifier. Allowed values: arbitrum, avalanche, base, bsc, eth, fantom, flare, gnosis, linea, optimism, polygon, scroll, story_mainnet, syscoin, taiko, telos, xai, xlayer, avalanche_fuji, base_sepolia, eth_holesky, eth_sepolia, optimism_testnet, polygon_amoy, story_aeneid_testnet.
    • 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; optional; default: false): Read metadata directly from the contract (true) or from Ankr's indexed cache (false).
Request example
curl -X POST https://rpc.ankr.com/multichain/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "ankr_getNFTMetadata",
"params": {
"blockchain": "avalanche",
"contractAddress": "0x8d01c8ee82e581e55c02117a676b5bbd4734fabb",
"tokenId": "23240"
}
}'
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"attributes": {
"contractType": "ERC721",
"description": "Rock #23240, can be used to play Rock Game",
"imageUrl": "https://ipfs.io/ipfs/QmPktcEDiRD9qNwc497mwQkJ3zYFQtHwFooPLkgDdRqU4R/23240.png",
"name": "Rock 23240",
"tokenUrl": "https://ipfs.io/ipfs/QmYen4cGUc3gF9UQnCycq2AADYLYzoM6mvVzoajAXTr7vH/rock23240.json",
"traits": [
{
"trait_type": "face",
"value": "Brown"
},
{
"trait_type": "eyes",
"value": "Big Shades"
}
]
},
"metadata": {
"blockchain": "avalanche",
"collectionName": "Rock",
"collectionSymbol": "ROCK",
"contractAddress": "0x8d01c8ee82e581e55c02117a676b5bbd4734fabb",
"contractType": "ERC721",
"tokenId": "23240"
}
}
}

ankr_getNFTsByOwner

POST ankr_getNFTsByOwner

Returns the NFTs owned by a wallet across one or more supported chains, with collection metadata, token IDs, image URLs, traits, and pagination cursors. Supports ERC-721, ERC-1155, ENS, and POAP.

Pass walletAddress (hex address, or ENS name on Ethereum). Scope to specific chains with the blockchain array, or omit it for all supported chains. Narrow results with the filter argument: each entry maps a contract address to an array of token IDs (empty array = all NFTs from that contract).

Pagination via pageSize (max 50, default 10) and pageToken. Part of the NFT API product (700 compute units per call, $0.00007 at base rate).

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (object; required):

    • walletAddress (string; required): Wallet to query. Hex address (0x…) or ENS name on Ethereum (e.g. vitalik.eth).
    • blockchain (array of string; optional): Optional. One or more chains to query. Omit for all supported chains. Allowed values: arbitrum, avalanche, base, bsc, eth, fantom, flare, gnosis, linea, optimism, polygon, scroll, story_mainnet, syscoin, taiko, telos, xai, xlayer, avalanche_fuji, base_sepolia, eth_holesky, eth_sepolia, optimism_testnet, polygon_amoy, story_aeneid_testnet.
    • filter (array of object; optional): Optional. Per-contract filter list.
    • pageSize (integer; optional; default: 10): Number of NFTs per page. Default 10, maximum 50.
    • pageToken (string; optional): Opaque page token from a prior response's nextPageToken.
Request example
curl -X POST https://rpc.ankr.com/multichain/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "ankr_getNFTsByOwner",
"params": {
"walletAddress": "vitalik.eth"
}
}'
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"owner": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"nextPageToken": "2hMDmwWDCKfaN8VPERnkckY4JWbRyDurn8LyreDRZbyprWUErKSC6AoGbKerumFnyG1SAkWHxs",
"assets": [
{
"blockchain": "eth",
"collectionName": "Cool Oliens",
"contractAddress": "0x03a1e037df88001bf867e3bcffa7e48bab0cf5a6",
"contractType": "ERC721",
"imageUrl": "https://ipfs.io/ipfs/QmTzuLQSn78keGt3n36b3tNNs7B3WMjo2SNJUF9rRshPjA/116.png",
"name": "Cool Oliens #117",
"symbol": "COOLIEN",
"tokenId": "116",
"tokenUrl": "https://ipfs.io/ipfs/QmdT4pLoe5w93rCnESnaEXBU7PaAiSSWuDDXurLhmzVvAz/116",
"traits": [
{
"trait_type": "NFT ID",
"value": "117"
},
{
"trait_type": "Rank",
"value": "199"
}
]
}
]
}
}

ankr_getNftTransfers

POST ankr_getNftTransfers

Returns the on-chain history of NFT transfers in which the specified wallet(s) appear as sender or recipient. Each entry carries the contract, token ID, collection name, image URL, block height, and timestamp.

Pass an address array (single or multiple wallets). Optionally scope by blockchain, block range (fromBlock / toBlock), or wall-clock range (fromTimestamp / toTimestamp). Paginate with pageSize (default 100, max 10000) and pageToken.

Part of the NFT API product (700 compute units per call, $0.00007 at base rate).

Parameters

  • id (integer; required): a request ID (example: 1).

  • jsonrpc (string; required): a JSON RPC spec used (example: 2.0).

  • method (string; required): a method used for the request.

  • params (object; required):

    • address (array of string; optional): Wallet address(es) to query. ENS accepted on Ethereum.
    • blockchain (array of string; optional): Chains to query. Omit or pass an empty array to query all supported chains. Allowed values: arbitrum, avalanche, base, bsc, eth, fantom, flare, gnosis, linea, optimism, polygon, scroll, story_mainnet, syscoin, taiko, telos, xai, xlayer, avalanche_fuji, base_sepolia, eth_holesky, eth_sepolia, optimism_testnet, polygon_amoy, story_aeneid_testnet.
    • fromBlock (integer; optional): Start block (integer or earliest, or hex).
    • toBlock (integer; optional): End block (integer or latest, or hex).
    • fromTimestamp (integer; optional): UNIX timestamp lower bound.
    • toTimestamp (integer; optional): UNIX timestamp upper bound.
    • descOrder (boolean; optional; default: false): Sort newest first when true.
    • pageSize (integer; optional; default: 100): Entries per page. Default 100, max 10000.
    • pageToken (string; optional): Opaque page token from a prior response's nextPageToken.
Request example
curl -X POST https://rpc.ankr.com/multichain/YOUR_ANKR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "ankr_getNftTransfers",
"params": {
"address": [
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
],
"blockchain": [
"bsc"
],
"fromTimestamp": 1655197483,
"toTimestamp": 1671974699,
"pageSize": 2
}
}'
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"transfers": [
{
"blockHeight": 19116577,
"blockchain": "bsc",
"collectionName": "",
"collectionSymbol": "",
"contractAddress": "0x36f8f51f65fe200311f709b797baf4e193dd0b0d",
"fromAddress": "0x186ea56f0a40c5593a697b3e804968b8c5920ff3",
"imageUrl": "",
"name": "",
"timestamp": 1656519782,
"toAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"tokenId": "12",
"transactionHash": "0x95ae64003124fe4c3e8702364136d25c3d0f2fdbbf953bd815785f06d5cb6025",
"type": "ERC1155",
"value": "1"
}
]
}
}