Alchemy Logo

getNFTMetadata

GET
/v2/{apiKey}/getNFTMetadata

Gets the metadata associated with a given NFT.

Path Parameters

apiKeystringrequireddefaults to docs-demo

For higher throughput, create your own API key

Query Parameters

contractAddressstringrequireddefaults to 0xe785E82358879F061BC3dcAC6f0444462D4b5330

String - Contract address for the NFT contract (ERC721 and ERC1155 supported).

tokenIdstringrequireddefaults to 44

String - The ID of the token. Can be in hex or decimal format.

tokenTypestring

String - 'ERC721' or 'ERC1155'; specifies type of token to query for. API requests will perform faster if this is specified.

tokenUriTimeoutInMsinteger

No set timeout by default - When metadata is requested, this parameter is the timeout (in milliseconds) for the website hosting the metadata to respond. If you want to only access the cache and not live fetch any metadata for cache misses then set this value to 0.

refreshCachebooleandefaults to false

Defaults to false for faster response times. If true will refresh metadata for given token. If false will check the cache and use it or refresh if cache doesn't exist.

Responses

200

Was this page helpful?