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.
| Parameter | Type | Description |
|---|---|---|
contractAddress* | string | The NFT contract addresses |
tokenId* | string | The token ID of the NFT |
Returns
| Parameter | Type | Description |
|---|---|---|
| contractAddress | string | The contract address of the NFT |
| contractName | string | The name of the NFT contract |
| contractSymbol | string | The symbol of the NFT contract |
| contractType | string | The type of the NFT contract ('erc721' or 'erc1155') |
| tokenId | string | The token ID of the NFT |
| minterAddress | string | The address that minted the NF |
| mintBlockNumber | number | The height of the block at which the NFT was minted |
| mintTransactionHash | string | he hash of the transaction that minted the NFT |
| mintTimestamp | string | The timestamp when the NFT was minted |
| numberOfTokens | string | The total number of tokens for this token ID |
| numberOfOwners | number | The total number of current owners for this token ID |
| ownerAddress | string | The address which owns the NFT now (null for erc1155 tokens) |
| walletBalance | NTFBalance object | NFTBalance object |
| contractAddress | string | The contract address of the NFT |
| contractType | string | The type of the NFT contract |
| tokenId | string | The token ID of the NFT |
| walletAddress | string | The owner contract address |
| tokenBalance | string | The token ballance |
| tokenUri | string | The address where the metadata of the specified token is stored |
| tokenMetadata | string | The metadata associated with the token |
| name | string | The name of the NFT |
| description | string | A description providing further details about the NFT |
| attributes | array<string> | An array of objects describing specific attributes or traits of the NFT |
| traitType | string | The trait type |
| value | string | The value or characteristic associated with the trait |
| externalLink | string | The external link of the NFT contract |
| imageUrl | string | The image Url of the NFT contract |
| animationUrl | string | The animation Urk of the nft contract |
| cachedImage | CachedMedia object | An object containing cached image data, if available |
| mimetype | string | Indicates the format of the media file |
| sie | number | Indicates the size of the media file |
| url | string | Indicates the size of the media file |
| cachedThumbnail | CachedMedia object | An 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.
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
| Name | Type | Value |
|---|---|---|
| contractAddress | String | |
| tokenId | String | 3094973 |
- 200: OK
{
"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' \