Look up Projects and NFTs
Projects and NFTs support retrieval with search API methods. You can use the search APIs to retrieve your Projects and NFTs in a flexible manner. Using search is a faster alternative to paginating through all resources. To create a search query, review the Search Query Language and reference the query fields for Projects and NFTs.
Query structure and terminology
A query clause consists of a field followed by an operator followed by a value:
Query Part | Value |
---|---|
clause | name:"Underdog NFT Project" |
field | name |
operator | : |
value | Underdog NFT Project |
You can combine multiple query clauses in a search by either separating them with a space, or using the AND or OR keywords. By default, the API combines clauses with AND logic. AND and OR operators are mutually exclusive.
Attributes
You can perform searches on attributes for both Projects and NFTs.
Use the following format to construct a clause for a metadata search: attributes.<field>:"<value>"
.
Search Syntax
The following table lists the synatx that you can use to construct a query.
Syntax | Usage | Description | Examples |
---|---|---|---|
: | field:value | Exact match operator (case sensitive) | name:"Project #1" |
AND | field:value1 AND field:value2 | The query returns only records that match both clauses (case sensitive) | name:Dog AND symbol:DOG |
OR | field:value1 OR field:value2 | The query returns records that match either of the clauses (case sensitive) | name:NFT OR symbol:NFT |
~ | field~value | Substring match operator (case insensitive) | name~season returns matches for any object with season in its name |
> ,< | field<value , field>value | Greater than / less than operators | attributes.points>10 brings up objects where the points are greater than 10 |
Query Fields for Project & NFTs
Field | Usage |
---|---|
name | name~Dog |
symbol | symbol:DOG |
description | description~"description of my project" |
externalUrl | externalUrl~google.com |
animationUrl | animationUrl~imgur |
attributes | attributes.points>10 |