No metadata found for some NFTs

I’ve been integrating the moralis API’s into a project but ran into a snag where it couldn’t return the metadata. I’m using the /nft/{address}/{id} endpoint like this

With this I get a correct response for every id until 671 which gives the response “No metadata found! Try again later”. Meanwhile there are NFT’s out there which have a much higher ID (like this one).

Is this a limitation of the API? Or is there something else I’m missing?

Try resyncing the metadata for it if you get that particular response or error - is the metadata field for 671 empty in the response? Web3API.token - Moralis

Otherwise fetch the token_uri and get the metadata manually.

When trying I get the response below, I’ll have a look into resyncing.

“message”: “No metadata found! Try again later”

did you try to resync the uri or only the metadata?

you can try to resync the uri first, then check if that uri works/is available.

I’ve attempted resyncing the metadata using the APIs below. I’ve also used the{address}/{id}/metadata/resync?chain=matic&flag=metadata&mode=async{address}/sync?chain=matic

Both return a success code so the requests whent through. After this the original requests still returns the same reply.

Which API is used to fetch the token URI?

you can go to this page:

and select uri, and will result this:

1 Like

I’ve used{address}/{id}/metadata/resync?chain=eth&flag=uri&mode=sync it gives the following message: { "status": "The metadata could not be updated! Try again later" }

ok, what is the token uri for that nft?

It looks like this:

    "name": "Encode Bronze Key",
    "description": "Encode Bronze Key\n\n** Disclaimer ** Before purchase please ensure you check what Comic Books this key has claimed, the tool to check this is available at",
    "image": "",
    "level": "BRONZE_LEVEL",
    "animation_url": ""

this looks lie metadata, what is the url that points to this metadata?

The URL is which I got from the API which returns the meta data for the token. The whole response is below:

    "token_address": "0xcdfea41c4a8e70fb4838426069483dc50cbf5041",
    "token_id": "1",
    "block_number_minted": "22632938",
    "owner_of": "0x012b623a1d2f05e2da7e9256c6d7b045b4d474c6",
    "block_number": "22632938",
    "amount": "1",
    "contract_type": "ERC721",
    "name": "EncodeKeys",
    "symbol": "ENCK",
    "token_uri": "",
    "metadata": "{\"name\":\"Encode Bronze Key\",\"description\":\"Encode Bronze Key\\n\\n** Disclaimer ** Before purchase please ensure you check what Comic Books this key has claimed, the tool to check this is available at\",\"image\":\"\",\"level\":\"BRONZE_LEVEL\",\"animation_url\":\"\"}",
    "synced_at": "2022-03-17T16:53:17.403Z",
    "is_valid": 1,
    "syncing": 2,
    "frozen": 0

and you try to resync the metadata for that specific token id 1 from 0xcdFea41c4A8e70Fb4838426069483dC50cbf5041 because it is not the correct one?

The API works fine for tokens with id 1 to 670. I’m having issues with tokens that have an id greater than 670. So I’ve tried re-syncing number 671 with{address}/{id}/metadata/resync?chain=matic&flag=uri&mode=sync
So that would give

Trying this will give the response { "status": "The metadata could not be updated! Try again later" }

The metadata / URI is form token 1 as the API to get the data isn’t working for 671, so I couldn’t get the data for that token.

how do you know that token with id 671 exists?

Hmm that’s strange. I was testing my code and wanted to see if it would work on every key level (bronze, silver & gold). So I tested it on this silver key which according to the opensea details has an ID of 3926, which gave the response I mentioned before. I started doing some tests and found that the API only worked on ID’s smaller than 671.

From this I’m guessing the ID mentioned on opensea and those used within the API aren’t the same?

I don’t know what is with that ID, how did you create that NFT?

I didn’t. I’m building on top of it but there seem to be several issues with it.
Looks like I’m either going to need to dig into the contract or contact the original devs :confused:

Have you got solution about this? i faced same issue

I faced this issue you have any solution about this?

In need more info about your specific case. You can create a new forum post for it.