Get NFT metadata
This API endpoint allows you to retrieve metadata for a specific NFT based on the contractId
and nftTokenId
. It also supports optional parameters for token ID formatting.
Endpoint Details
Headers
Content-Type
application/json
x-api-key
API_KEY
Query Parameters
contractId
string
Contract ID to get metadata for
nftTokenId
string
the smart contract that the NFT belongs to (See the note above)
tokenIdFormat
string, optional
NFT token id format. Possible values decimal
or hex
. Defaults to decimal
if it is not specified.
As a prerequisite, you must have one or more NFT contracts that can be managed by your account (see getAccountContracts.
Examples
curl -X GET 'https://sandbox.api.labs.zelus.io/v1/nft/metadata?contractId=yourContractId&nftTokenId=yourTokenId' \
-H "x-api-key: YOUR_API_KEY"
Notes
Make sure to either provide a
contractId
when making the request.Token ID is always required and its format can be controlled using the
tokenIdFormat
parameter.If using the
hex
format for the token ID, ensure it's a valid hexadecimal value.If a
contractId
is used, the base metadata URL retrieved from it combined with the token ID will be used to fetch the metadata.
Last updated
Was this helpful?