Skip to main content

Search NFTs

Explore and search NFTs belonging to a collection or a user

Search in a collection

You would have to use the search query with the below parameters :

  • The nfts target,

  • The required collection address on nfts target,

  • An optional sorting parameter: sort,

  • Other optional parameters, such as a search on attributes

Graphql Example

Request

query Nfts($collectionAddress: Address!) {
search(
input: {
collection_address: $collectionAddress
target: nfts
attributes: [{trait_type: "MATCH", value: "Yes"}]
sort: price_asc
}
pagination: {page: 1, size: 2}
) {
nfts {
asset_id
name
thumbnail
token_id
likes
collection {
address
avatar
}
sale {
unitary_price_float
expiration_date
}
}
}
}

Example Parameters

{ "collectionAddress": "0x86e0858ec802393c660e4d0c83975c937aa0e35c" }
With CURL
curl -X POST -H 'content-type: application/json' \
-d '{"query":"query Nfts($pagination: Page, $input: SearchRequest!) {\n search(pagination: $pagination, input: $input) {\n hasMore\n nfts {\n name\n thumbnail\n token_id\n likes\n asset_id\n animation_url\n animation_mime\n balance\n rank\n collection {\n address\n avatar\n certified\n kind\n name\n display_theme\n }\n sale {\n sale_id\n unitary_price_float\n top_bid_float\n quantity\n kind\n seller\n expiration_date\n }\n offer {\n offer_id\n buyer\n unitary_price_float\n start_date\n expiration_date\n }\n }\n }\n}","variables":{"input":{"target":"nfts","keywords":"","sort":"price_asc","attributes":[{"trait_type":"MATCH","value":"Yes"}],"category_tags":[],"price_range":{},"collection_address":"0x86e0858ec802393c660e4d0c83975c937aa0e35c"},"pagination":{"page":1,"size":2}},"operationName":"Nfts"}' \
https://public-api.dev.kalao.io/query

Response

{
"data": {
"search": {
"nfts": [
{
"asset_id": "0x86e0858ec802393c660e4d0c83975c937aa0e35c_14",
"name": "Big Joe #51",
"thumbnail": "https://storage.googleapis.com/beta-kalao/nfts/0x86e0858ec802393c660e4d0c83975c937aa0e35c/0x86e0858ec802393c660e4d0c83975c937aa0e35c_14/thumbnail",
"token_id": "14",
"likes": 1,
"collection": {
"address": "0x86e0858ec802393c660e4d0c83975c937aa0e35c",
"avatar": "https://storage.googleapis.com/beta-kalao/collections/0x86e0858ec802393c660e4d0c83975c937aa0e35c/avatar"
},
"sale": null
},
{
"asset_id": "0x86e0858ec802393c660e4d0c83975c937aa0e35c_21",
"name": "Big Joe #71",
"thumbnail": "https://storage.googleapis.com/beta-kalao/nfts/0x86e0858ec802393c660e4d0c83975c937aa0e35c/0x86e0858ec802393c660e4d0c83975c937aa0e35c_21/thumbnail",
"token_id": "21",
"likes": 0,
"collection": {
"address": "0x86e0858ec802393c660e4d0c83975c937aa0e35c",
"avatar": "https://storage.googleapis.com/beta-kalao/collections/0x86e0858ec802393c660e4d0c83975c937aa0e35c/avatar"
},
"sale": null
}
]
}
}
}

NFTs belonging to a specific user

Please refer to the owned items section in fetch users information.