Numbers Protocol
Search…
⌃K

Search Engine API

The Search Engine API allows developers to find an exact match or similar assets/NFTs of the input content. It returns the content information, marketplaces, as well as NFT history in the supported blockchains. More details about Search Engine APIs can be found in the GitHub Wiki.

Getting Started

Step 1: Get API Token

Get API token, please request the API token from a member of Numbers Protocol team or send a mail to [email protected]

Step 2: Get Similar Search Results

Sample API Call

curl --location --request POST 'https://node.numbersprotocol.io/api/1.1/wf/find_similar' \
--form 'file="https://ipfs-pin.numbersprotocol.io/ipfs/bafybeia7buylzu37ldtugql2eupy64fw3gzjqyoivgt3jyxe6d4yuggh24"' \
--form 'only_closest_match="false"' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer ${API_TOKEN}'

Sample Response

The top_results of the following sample response shows the closest Nids of the asset files.
"response": {
"closest_match": "bafybeibeypouu3e7czteomyziaf4paf32wgcos2pnq5qonhuo5nbcngbby",
"top_results": [
"bafybeibeypouu3e7czteomyziaf4paf32wgcos2pnq5qonhuo5nbcngbby",
"bafybeigfyhbpq5vesvmyp2i4a2nth5gy43rgouzszufmqb6sb3qycnyaua",
"bafkreifhb7exh4k7eoi5xvyerz7ah3lft2rc3uvtzmdkagkqbk446zofca",
"bafybeihvxhh7v23mxwendjtdf7guxzy45faw5hsijnhir7upbqbuhtw67y",
"bafybeibj6hl75a6mja7g6xjc5s5nmlbkpsje3l7tjnszhx453lpbvofoty",
"bafybeicwba56laqld5upv5loddkuq3iwbtxoh65m6wdtqyzp2hxchveypu",
"bafybeihrpejtyh2ynfqbzyuh65z7l57ztjrbtvtcyczrpm6lo5iw2wjc6i",
"bafybeid2yityahrxdreqzscixjixdjn5aasjkgsvhjk7b2yad44aonuh7i",
"bafybeiep52mo6pl3ujcdnnoc7zylebtldbff5scxuz2wkcrqyjmtyp7hdi",
"bafybeic27zxsevqrj7kc3q4tghty6a5xbcv3i3qysbvxo5qwzocmamawem"
]
}
You can access the file of any Nid in the response via IPFS public gateways or through Numbers gateway:
https://ipfs-pin.numbersprotocol.io/ipfs/${Nid}

Step 3: Get More Token Details

Get NFT tokens associated with the asset.

Sample API Call

curl --location --request POST 'https://node.numbersprotocol.io/api/1.1/wf/asset-search' \
--form 'file="https://ipfs-pin.numbersprotocol.io/ipfs/bafybeiepger65zllufxocswogj2h3bmnb2vbcekuzhbavbex2edvdzjwja"' \
--form 'only_closest_match="false"' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer ${API_TOKEN}'

Sample Response

The following sample response shows that there are two NFT tokens associated with the same asset, one minted on 13th January 2022 and another one minted on 24th January 2022. Since these two tokens are from the different contracts, it is highly possible that the latter one is not real.
"response": {
"nft_record": [
{
"_api_c2__id": "620106dbf9d84630238c1012",
"_api_c2_nft_products": [],
"_api_c2_image_cid": "bafybeiepger65zllufxocswogj2h3bmnb2vbcekuzhbavbex2edvdzjwja",
"_api_c2_animation_cid": null,
"_api_c2_asset_cids": [],
"_api_c2_image_url": "https://ikzttp.mypinata.cloud/ipfs/QmYDvPAXtiJg7s8JdRBSLWdgSphQdac8j1YuQNNxcGE1hg/982.png",
"_api_c2_created_at": "2022-01-13T02:00:38",
"_api_c2_chain_id": 1,
"_api_c2_contract": "0xed5af388653567af2f388e6224dc7c4b3241c544",
"_api_c2_nft_spec": "ERC721",
"_api_c2_token_id": "982",
"_api_c2_token_uri": "https://dweb.link/ipfs/QmQFkLSQysj94s5GvTHPyzTxrawwtjgiiYS2TBLgrvw8CW/982",
"_api_c2_creator": "0xab06f95ad1ac282f7072b4b849259eabc49eb5ba",
"_api_c2_current_owner": "0x5a8cfbdb26e7429e4920668412347e0da368c5ec",
"_api_c2_metadata_cid": null,
"_api_c2_metadata.name": "Azuki #982",
"_api_c2_metadata.description": null,
"_api_c2_metadata.image": "https://ikzttp.mypinata.cloud/ipfs/QmYDvPAXtiJg7s8JdRBSLWdgSphQdac8j1YuQNNxcGE1hg/982.png",
"_api_c2_primary_marketplace": "opensea",
"_api_c2_nftscan_id": "NS4D1BB1435DE9AA9E",
"body_raw_text": null
},
{
"_api_c2__id": "631a76e11ba1656d93d54686",
"_api_c2_nft_products": [],
"_api_c2_image_cid": "bafybeiepger65zllufxocswogj2h3bmnb2vbcekuzhbavbex2edvdzjwja",
"_api_c2_animation_cid": null,
"_api_c2_asset_cids": [],
"_api_c2_image_url": "https://ikzttp.mypinata.cloud/ipfs/QmYDvPAXtiJg7s8JdRBSLWdgSphQdac8j1YuQNNxcGE1hg/982.png",
"_api_c2_created_at": "2022-01-24T14:45:06",
"_api_c2_chain_id": 137,
"_api_c2_contract": "0x57aedae1123e4f896f5b143fd0a18d29424e1a80",
"_api_c2_nft_spec": "erc721",
"_api_c2_token_id": "982",
"_api_c2_token_uri": "https://dweb.link/ipfs/QmeBWSnYPEnUimvpPfNHuvgcK9wFH9Sa6cZ4KDfgkfJJis/982",
"_api_c2_creator": "0xeed52a4d35cf0cb9b9340b6d15522e75f1f8aa9e",
"_api_c2_current_owner": "0xeed52a4d35cf0cb9b9340b6d15522e75f1f8aa9e",
"_api_c2_metadata_cid": null,
"_api_c2_metadata.name": "Azuki #982",
"_api_c2_metadata.description": null,
"_api_c2_metadata.image": "https://ikzttp.mypinata.cloud/ipfs/QmYDvPAXtiJg7s8JdRBSLWdgSphQdac8j1YuQNNxcGE1hg/982.png",
"_api_c2_primary_marketplace": null,
"_api_c2_nftscan_id": "NSFB439169F3BA3AB2",
"body_raw_text": null
}
]
}

How to read the nft_records

Text
Description
image_cid
The Cid/Nid of the content file that is associated with the image field of the NFT token. This file is pinned by the Numbers Protocol.
animation_cid
The Cid/Nid of the content file that is associated with the animation field of the NFT token. This file is pinned by the Numbers Protocol
image_url
The original URL of the image field of the NFT token
created_at
The earliest of initial minting time of the NFT or the initial commit time of the digital media file in the Numbers Protocol
chain_id
The ID of the NFT blockchain
contract
The contract address of the NFT token
nft_spec
The spec of the NFT metadata
token_id
The ID of the NFT token
token_uri
The token URI of the NFT token
creator
The minter of the NFT token
current_owner
The current_owner of this NFT token

Support Status

If you would like to know the file format or blockchains that are supported by the Numbers Search Engine, please visit the following page: