Alchemy — NFT Metadata By Token ID
alchemy_get_nft_v3_getnftmetadatagetNFTMetadata - Retrieves the metadata associated with a specific NFT. This endpoint is supported on Ethereum and many L2s, including Polygon, Arbitrum, Optimism, Base, World Chain and more. See the full list of supported networks here. Uses the shared Alchemy Free quota; not unlimited. Documentation prepared only, not runtime-verified. Uses the caller's OpenAny gateway credentials. Charges and authorization are determined by the gateway.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokenId | Yes | String - The ID of the token. Can be in hex or decimal format. | |
| tokenType | No | String - 'ERC721' or 'ERC1155'; specifies type of token to query for. API requests will perform faster if this is specified. | |
| refreshCache | No | 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. | |
| contractAddress | Yes | String - Contract address for the NFT contract (ERC721 and ERC1155 supported). | |
| tokenUriTimeoutInMs | No | 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. |