GET
/
getTokenDetails
JavaScript
import { setOnchainKitConfig } from '@coinbase/onchainkit';
import { getTokenDetails } from '@coinbase/onchainkit/api';

const response = await getTokenDetails({
  contractAddress: '0x...',
  tokenId: '1',
});
{
  "collectionName": "NFT Collection Name",
  "collectionDescription": "NFT Collection Description",
  "name": "NFT Name",
  "description": "NFT Description",
  "imageUrl": "https://example.com/image.png",
  "animationUrl": "",
  "ownerAddress": "0x...",
  "lastSoldPrice": {
    "amount": "0.0001",
    "currency": "ETH",
    "amountUSD": "0.242271"
  },
  "mimeType": "image/png",
  "contractType": "ERC721"
}
The getTokenDetails function returns data required to view an NFT Before using them, make sure to obtain a Client API Key from Coinbase Developer Platform.

Returns

Promise<GetTokenDetailsResponse>

Parameters

GetTokenDetailsParams

Types

Query Parameters

contractAddress
string
required

The NFT contract address

tokenId
string
required

The token ID of the NFT

Response

200 - application/json

Successful response

collectionName
string

NFT Collection Name

collectionDescription
string

NFT Collection Description

name
string

NFT Name

description
string

NFT Description

imageUrl
string<uri>

URL of the NFT image

animationUrl
string<uri>

URL of the NFT animation (if any)

ownerAddress
string

Current owner's wallet address

lastSoldPrice
object

Details of the last sale

mimeType
string

MIME type of the NFT asset

contractType
string

Token standard (e.g., ERC721)