Skip to main content

getnft


description: Get data for the given NFT contract address and token ID.

getNFT

How to use getNFT method ?

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

Parameters

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

ParameterTypeDescription

contractAddress*

stringThe NFT contract addresses

tokenId*

stringThe token ID of the NFT

Returns

ParameterTypeDescription
contractAddressstringThe contract address of the NFT
contractNamestringThe name of the NFT contract
contractSymbolstringThe symbol of the NFT contract
contractTypestringThe type of the NFT contract ('erc721' or 'erc1155')
tokenIdstringThe token ID of the NFT
minterAddressstringThe address that minted the NF
mintBlockNumbernumberThe height of the block at which the NFT was minted
mintTransactionHashstringhe hash of the transaction that minted the NFT
mintTimestampstringThe timestamp when the NFT was minted
numberOfTokensstringThe total number of tokens for this token ID
numberOfOwnersnumberThe total number of current owners for this token ID
ownerAddressstringThe address which owns the NFT now (null for erc1155 tokens)
walletBalanceNTFBalance objectNFTBalance object
contractAddressstringThe contract address of the NFT
contractTypestringThe type of the NFT contract
tokenIdstringThe token ID of the NFT
walletAddressstringThe owner contract address
tokenBalancestringThe token ballance
tokenUristringThe address where the metadata of the specified token is stored
tokenMetadatastringThe metadata associated with the token
namestringThe name of the NFT
descriptionstringA description providing further details about the NFT
attributesarray<string>

An array of objects describing specific attributes or traits of the NFT

traitTypestringThe trait type
valuestringThe value or characteristic associated with the trait
externalLinkstringThe external link of the NFT contract
imageUrlstringThe image Url of the NFT contract
animationUrlstringThe animation Urk of the nft contract
cachedImageCachedMedia objectAn object containing cached image data, if available
mimetypestringIndicates the format of the media file
sienumberIndicates the size of the media file
urlstringIndicates the size of the media file
cachedThumbnailCachedMedia objectAn object containing cached thumbnail data, if available.

Example Request and Result for getNFT

In this section, you can find an illustrative example of a request made to retrieve the NFT data using the getNFT method.

info

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

GET https://starknet-mainnet.blastapi.io/<project_id>/builder/getNFT?

Query Parameters

NameTypeValue
contractAddressString

0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1

tokenIdString3094973
{
"contractAddress": "0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1",
"contractName": "Spok",
"contractSymbol": "SPOK",
"contractType": "erc721",
"tokenId": "3094973",
"minterAddress": "0x03efc2b63bf04a09b3dabc0cdbf4c51858a96349bb06008b7c866d85f4f5c394",
"mintBlockNumber": 622943,
"mintTimestamp": 1710865283,
"mintTransactionHash": "0x029496c985649a0bc3f2b04be8fa45520901bf12ad3ba8cabeb0afa5e247781b",
"numberOfTokens": "1",
"numberOfOwners": "1",
"ownerAddress": "0x03efc2b63bf04a09b3dabc0cdbf4c51858a96349bb06008b7c866d85f4f5c394",
"tokenUri": null,
"tokenMetadata": null,
"name": null,
"description": null,
"attributes": [],
"externalLink": null,
"imageUrl": null,
"animationUrl": null,
"cachedImage": null,
"cachedThumbnail": null
}
curl -X GET https://starknet-mainnet.blastapi.io/<project-id>/builder/getNFT?contractAddress=0x07606cac9053e9b8b573a4b0a0ce608880f64869e24b8a605210d7a85bb6e5f1&tokenId=3094973 \
-H 'Content-Type: application/json' \