nft_accountTokenIDs
Allows you to easily query all NFTs an account address holds in any contract address without having to scan the entire chain.
Using this API, you can get all the data of NFTs that an account owns in that collection by specifying the collection address and the account address. You can clearly know what NFTs a holder owns in that collection. Some use cases could call this API such as accurate airdrop.
Supported on Ethereum, BNB Chain, Optimism, and Arbitrum.

Parameters

Object - An object with the following fields (required):
  • contractAddress(hex string, required) - the contract address of the collection. BlockVision currently support both ERC721 and ERC1155.
  • accountAddress(hex string, required) - the account address you want to query.
  • blockNumber(integer number, optional) - specify the blockNumber for snapshot query (default latest). BlockVision can not only support users to query the current position, but also support users to query the historical information at any time.
  • pageSize(integer number, optional, default 20 max 50) - max number of results to return per call.
  • pageIndex(integer number, optional, default 1) - page index.

Returns

Object - An object with the following fields:
  • id(integer number) - json-rpc id.
  • jsonrpc(string) - json-rpc version.
  • result(object) - an object with the following fields:
    • nextPageIndex(integer number) - next page index.
    • data(array of objects, defined below) - response datas.
  • Object schema:
    • tokenId(string) - id of the NFT.
    • value(string) - token amount.
    • blockNumber(integer number) - the latest block number of this tokenID has been transferred.

Example

Request

curl https://api.blockvision.org/v1/<api key> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "nft_accountTokenIDs",
"params": {
"accountAddress": "0x5F35265a7681673dd078616C5eFc9bcFb3a4C9dE",
"contractAddress":"0x495f947276749Ce646f68AC8c248420045cb7b5e",
"blockNumber": 0,
"pageSize": 100,
"pageIndex": 1
}
}'

Result

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": [
{
"blockNumber": 14246581,
"tokenID": "101186401200168495056038680608084824886777571337719105692283272963405054476289",
"value": "1"
},
{
"blockNumber": 14246579,
"tokenID": "101186401200168495056038680608084824886777571337719105692283274084906914807809",
"value": "1"
},
{
"blockNumber": 14246578,
"tokenID": "101186401200168495056038680608084824886777571337719105692283272662138868465665",
"value": "1"
},
{
"blockNumber": 14246578,
"tokenID": "101186401200168495056038680608084824886777571337719105692283273556041821847553",
"value": "1"
},
{
"blockNumber": 13359445,
"tokenID": "96909460163064550845444608935305903013667688084848214180379906025707156799489",
"value": "1"
},
{
"blockNumber": 13148714,
"tokenID": "95435191367528230118348852388102853153675043326016066080545104870274718760961",
"value": "1"
},
{
"blockNumber": 13148697,
"tokenID": "95435191367528230118348852388102853153675043326016066080545104842786928066561",
"value": "1"
},
{
"blockNumber": 13144064,
"tokenID": "30781629061828804624568145095817932626207877492647509829179454160783642984449",
"value": "1"
},
{
"blockNumber": 13135456,
"tokenID": "90956064311968606756553515108882620200475098985590964167324214551581059710977",
"value": "1"
},
{
"blockNumber": 13134488,
"tokenID": "12867613303922285006170115119619787422374490562931763710441657335579762753537",
"value": "1"
},
{
"blockNumber": 13134484,
"tokenID": "12867613303922285006170115119619787422374490562931763710441657733602972008449",
"value": "1"
},
{
"blockNumber": 13134461,
"tokenID": "12867613303922285006170115119619787422374490562931763710441656723151786082305",
"value": "1"
},
{
"blockNumber": 13134429,
"tokenID": "12867613303922285006170115119619787422374490562931763710441656832003437232129",
"value": "1"
},
{
"blockNumber": 13134398,
"tokenID": "98168371784320387514732815439041609751844866237332060982262479791135299469313",
"value": "1"
},
{
"blockNumber": 13130396,
"tokenID": "55695300558473532380234128748791027067769376062037970576475950599572985741313",
"value": "1"
},
{
"blockNumber": 13130176,
"tokenID": "47076220149731371639851819981708280767403449554744819794320438393245194518529",
"value": "1"
},
{
"blockNumber": 13130164,
"tokenID": "47076220149731371639851819981708280767403449554744819794320438450419799162881",
"value": "1"
},
{
"blockNumber": 13130143,
"tokenID": "113727478878844672289925993749439950864141987044979865568433202346022685114369",
"value": "1"
},
{
"blockNumber": 13130136,
"tokenID": "113727478878844672289925993749439950864141987044979865568433202247066638614529",
"value": "1"
},
{
"blockNumber": 13129575,
"tokenID": "72407656650037389328967993611047014223280056725029532514132816381630904008705",
"value": "1"
},
{
"blockNumber": 13129565,
"tokenID": "72407656650037389328967993611047014223280056725029532514132816380531392380929",
"value": "1"
},
{
"blockNumber": 13129470,
"tokenID": "72407656650037389328967993611047014223280056725029532514132816367337252847617",
"value": "1"
},
{
"blockNumber": 13128630,
"tokenID": "55695300558473532380234128748791027067769376062037970576475950544597404352513",
"value": "1"
},
{
"blockNumber": 13128626,
"tokenID": "55695300558473532380234128748791027067769376062037970576475950403859915997185",
"value": "1"
},
{
"blockNumber": 13127736,
"tokenID": "89586195117071375533595198834044806151848740896696016229803979278661120425985",
"value": "1"
},
{
"blockNumber": 13127731,
"tokenID": "89586195117071375533595198834044806151848740896696016229803979446886399475713",
"value": "1"
},
{
"blockNumber": 13127723,
"tokenID": "89586195117071375533595198834044806151848740896696016229803980112090934280193",
"value": "1"
},
{
"blockNumber": 13127620,
"tokenID": "67762071541354991303805234958077275625366203327618663782030104413517805256705",
"value": "1"
},
{
"blockNumber": 13123156,
"tokenID": "98168371784320387514732815439041609751844866237332060982262479108338578620417",
"value": "1"
},
{
"blockNumber": 13115446,
"tokenID": "46339860446262144358413203986331908516045385010326591359414559433532614115329",
"value": "1"
},
{
"blockNumber": 13115438,
"tokenID": "46339860446262144358413203986331908516045385010326591359414559488508195504129",
"value": "1"
},
{
"blockNumber": 13115435,
"tokenID": "46339860446262144358413203986331908516045385010326591359414559506100381548545",
"value": "1"
},
{
"blockNumber": 13114597,
"tokenID": "16804060486390103307260708090207628435868524767905100578377228505441611284481",
"value": "1"
},
{
"blockNumber": 13114573,
"tokenID": "91601697536522385241701977994466099055488631289623475590779679644489646866433",
"value": "1"
},
{
"blockNumber": 13114360,
"tokenID": "16804060486390103307260708090207628435868524767905100578377228483451378728971",
"value": "2"
},
{
"blockNumber": 13114351,
"tokenID": "16804060486390103307260708090207628435868524767905100578377228483451378728971",
"value": "1"
},
{
"blockNumber": 13111356,
"tokenID": "61894283010323417130265782237411141075882593016052188360674173132884200652801",
"value": "1"
},
{
"blockNumber": 13111219,
"tokenID": "46922239658159811737543541864886293005980350845066259877862004390864254664705",
"value": "1"
},
{
"blockNumber": 13111152,
"tokenID": "46922239658159811737543541864886293005980350845066259877862004383167673270273",
"value": "1"
},
{
"blockNumber": 13111093,
"tokenID": "46922239658159811737543541864886293005980350845066259877862004375471091875841",
"value": "1"
},
{
"blockNumber": 13110632,
"tokenID": "93307508693877289825699574289386808351247985744632042399056137182493404037121",
"value": "1"
},
{
"blockNumber": 13105151,
"tokenID": "106827419081639962859270890613147910501438113887331779503434402750968209866753",
"value": "1"
},
{
"blockNumber": 13105141,
"tokenID": "106827419081639962859270890613147910501438113887331779503434402659708744761345",
"value": "1"
},
{
"blockNumber": 13105138,
"tokenID": "106827419081639962859270890613147910501438113887331779503434402649813140111361",
"value": "1"
},
{
"blockNumber": 13105135,
"tokenID": "106827419081639962859270890613147910501438113887331779503434402653111674994689",
"value": "1"
},
{
"blockNumber": 13105129,
"tokenID": "106827419081639962859270890613147910501438113887331779503434402328755744800769",
"value": "1"
},
{
"blockNumber": 13103790,
"tokenID": "107606815611778582701356596778244230678549325555481331949082598161161671147521",
"value": "1"
},
{
"blockNumber": 13103785,
"tokenID": "107606815611778582701356596778244230678549325555481331949082598043513926975489",
"value": "1"
},
{
"blockNumber": 13103203,
"tokenID": "74766944091150161326839969227162073324832068239977452502720830210835673513985",
"value": "1"
},
{
"blockNumber": 13103138,
"tokenID": "74766944091150161326839969227162073324832068239977452502720830175651301425153",
"value": "1"
}
],
"nextPageIndex": 2
}
}
Copy link
Outline
Parameters
Returns
Example
Request
Result