POST getNFTBatch

Get data for multiple NFT contract address and token ID pairs.

How to use getNFTBatch method ?

Below, you'll find an in-depth guide that provides a comprehensive explanation of how to utilize the getNFTBatch method effectively using Blast.

Parameters

Below, you can find the query parameters accepted by the method.

ParameterTypeDescription

nftIds*

array<string>

List of NFT contract address and tokenId

contractAddress*

string

The NFT contract addresses

tokenId

number

The token ID

Returns

ParameterTypeDescription

count

number

Number of records returned in the current page

nfts

array<Objects>

array of NFT objects (see the getNFT method for more details)

Example Request and Result for getNFTBatch

In this section, you can find an illustrative example of a request made to retrieve the data for multiple NFT contract address and tokenId pairs using the getNFTBatch method.

The example in this section uses a non-existing project id.

Make sure you replace it with your Starknet endpoint when issuing the Builder API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Returns NFT Objects data by contract address and token ID pairs.

POST https://starknet-mainnet.blastapi.io/<project_id>/builder/getNFTBatch?

Query Parameters

NameTypeValue

contractAddress

String

0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1

tokenId

number

497746562623

{
  "count": 1,
  "nfts": [
    {
      "contractAddress": "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af",
      "contractName": "Starknet.id",
      "contractSymbol": "ID",
      "contractType": "erc721",
      "tokenId": "497746562623",
      "minterAddress": "0x01878c0c399e4fb3bb295f3e33b264ad3848cffda061499698455a44a549014f",
      "mintBlockNumber": 630059,
      "mintTimestamp": 1712294912,
      "mintTransactionHash": "0x02b0fcd519b063d35e36c4b4cf0ee7ac7919eefe57484f59ca0c0dcb499d45f4",
      "numberOfTokens": "1",
      "numberOfOwners": "1",
      "ownerAddress": "0x01878c0c399e4fb3bb295f3e33b264ad3848cffda061499698455a44a549014f",
      "tokenUri": "https://api.starknet.id/uri?id=497746562623",
      "tokenMetadata": "{\"name\":\"Starknet ID: 497746562623\",\"description\":\"This token represents an identity on StarkNet.\",\"image\":\"https://starknet.id/api/identicons/497746562623\",\"expiry\":null,\"attributes\":null}",
      "name": "Starknet ID: 497746562623",
      "description": "This token represents an identity on StarkNet.",
      "attributes": null,
      "externalLink": null,
      "imageUrl": "https://starknet.id/api/identicons/497746562623",
      "animationUrl": null,
      "cachedImage": null,
      "cachedThumbnail": null
    }
  ]
}
curl -X POST https://starknet-mainnet.blastapi.io/<project-id>/builder/getNFTBatch? \
-H 'Content-Type: application/json' \
-d '{"nftIds":[{"contractAddress":"0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af","tokenId":"497746562623"}]}' \

Last updated