NFT Metadata not returned for Sunflower contract, works with Alchemy

When using the NFT Get Metadata API, the token_uri data is incorrect and therefore metadata is null for the following:

Contract: 0x22d5f9b75c524fec1d6619787e582644cd4d7422
TokenID: 202
Chain: Polygon

curl --request GET
–url ‘
–header ‘accept: application/json’
–header ‘X-API-Key: 324234’

  "token_address": "0x22d5f9b75c524fec1d6619787e582644cd4d7422",
  "token_id": "202",
  "transfer_index": [
  "owner_of": "0xf756aaaa590534eb3bb30f3718980148c68cabcd",
  "block_number": "39280784",
  "block_number_minted": "25580341",
  "token_hash": "c158a55894dd7bbde568d83c630d167e",
  "amount": "1484540000000000000000",
  "contract_type": "ERC1155",
  "name": null,
  "symbol": null,
  "token_uri": "",
  "metadata": null,
  "last_token_uri_sync": "2022-11-04T09:55:50.796Z",
  "last_metadata_sync": "2022-11-04T09:56:06.878Z",
  "minter_address": "ERC1155 tokens don't have a single minter"

Instead of it being
"token_uri": ""

it should be

"token_uri": "",

Moralis is interpreting the token ID as a hex value instead of decimal. I tried changing the format to hex and supplying 0xCA in the API call, but that didn’t work either.

Please note that this issue is not seen when using Alchemy which correctly grabs the metadata:

Old topic for reference

how did you do this?


is a domain that you control?

Like so via the docs

curl --request GET
–url ‘
–header ‘accept: application/json’
–header ‘X-API-Key: 123456’

I changed the token ID to 0xCA, and format to hex and get the following message

  "message": "No metadata found! Try again later"
} - we do not control this domain

I sent this as a feature request to the team, we only handle the token uris that follow the erc1155 standard now (that one in hex and with 64 leading zeroes)

1 Like