Skip to main content
Version: 2.0

Search NFTs

GEThttps://deep-index.moralis.io/api/v2/nft/search

Get NFTs that match a given metadata search query.

DEPRECATED ENDPOINT
This API will be deprecated on 4th September 2023. Please subscribe to the Changelog page for further announcements.
QUERY PARAMS
chainstring
The chain to query
formatstring
The format of the token ID
qstringrequired
The search string
filterstring
What fields the search should match on. To look into the entire metadata set the value to 'global'. To have a better response time you can look into a specific field like name
from_blocknumber

The minimum block number from which to start the search

  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used.
to_blocknumber

The maximum block number from which to end the search

  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used.
from_datestring

The date from which to start the search (any format that is accepted by momentjs)

  • Provide the param 'from_block' or 'from_date'
  • If 'from_date' and 'from_block' are provided, 'from_block' will be used.
to_datestring

Get search results up until this date (any format that is accepted by momentjs)

  • Provide the param 'to_block' or 'to_date'
  • If 'to_date' and 'to_block' are provided, 'to_block' will be used.
addressesarray
The addresses to get metadata for
cursorstring
The cursor returned in the previous response (used for getting the next page). Learn more on cursor pagination here.
limitnumber
The desired page size of the result.
disable_totalboolean
⚠️ Deprecating soon. If the result should skip returning the total count (Improves performance). This parameter defaults to true.
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.EvmApi.nft.searchNFTs({
"chain": "0x1",
"format": "decimal",
"filter": "name"
});

console.log(response.raw);
} catch (e) {
console.error(e);
}
Response Example
{
"total": "2000",
"page": "2",
"page_size": "100",
"result": {
"token_id": "889",
"token_address": "0x8ce66ff0865570d1ff0bb0098fa41b4dc61e02e6",
"token_uri": "https://ipfs.moralis.io:2053/ipfs/QmZZbo8u8zEWg7wtmZhJS2W718WL6FA95T4XdgmCcLp1SJ/889.json",
"metadata": "{\"name\":\"Bape #889\",\"description\":\"The #1 metavestor clan (NFT/DAO) by a team with multi billion dollar company experience.\",\"image\":\"https://bapesclan.mypinata.cloud/ipfs/QmTSUD5JA6qHaC5t25mcXySfz19AV9u4Mb6Na7ntQ6tEwf/889.jpg\",\"attributes\":[{\"trait_type\":\"Background\",\"value\":\"Black\"},{\"trait_type\":\"Body\",\"value\":\"Man\"},{\"trait_type\":\"Dress\",\"value\":\"Suit Tie Blue\"},{\"trait_type\":\"Face\",\"value\":\"Pipe\"},{\"trait_type\":\"Eye\",\"value\":\"Eye\"}]}",
"is_valid": "1",
"syncing": "2",
"frozen": "0",
"resyncing": "0",
"contract_type": "ERC721",
"token_hash": "fffa3102469ce77f569893d16d5884f9",
"batch_id": "fd995c8a-f8b2-40cb-a407-f43e552638b4",
"metadata_name": "Bape #889",
"metadata_description": "The #1 metavestor clan (NFT/DAO) by a team with multi billion dollar company experience.",
"metadata_attributes": "[{\"trait_type\":\"Background\",\"value\":\"Black\"},{\"trait_type\":\"Body\",\"value\":\"Man\"},{\"trait_type\":\"Dress\",\"value\":\"Suit Tie Blue\"},{\"trait_type\":\"Face\",\"value\":\"Pipe\"},{\"trait_type\":\"Eye\",\"value\":\"Eye\"}]",
"block_number_minted": "14265936",
"minter_address": "0xdcf086e3f7954b38180daae1405569da86588bfe",
"transaction_minted": "0x2c8d7ec7a8439b0f67b50e93be63242de52e9b5cdfc7dc0aee80c6a2f104c41a",
"last_token_uri_sync": "2021-02-24T00:47:26.647Z",
"last_metadata_sync": "2021-02-24T00:47:26.647Z",
"createdAt": "2022-02-24T00:47:26.647Z",
"updatedAt": "2022-04-09T23:56:44.807Z",
"possible_spam": "false",
"verified_collection": "false"
}
}