Filter Search Results by Type

Search results can now be filtered to show only assets, only collections, or both.

By Center 3 min read

We have added a new optional parameter to the /search endpoint to filter results to show only assets, only collections or both.

Valid arguments for type are asset, collection, and all.

Check out a few examples below, or view the full documentation.

Demo: Search for both assets and collections

If type is omitted, the default search is for both assets and collections.

$ curl <https://api.center.dev/v1/ethereum-mainnet/search\\?query\\=meebits>

{
  "results": [
    {
      "id": "ethereum-mainnet/0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7",
      "name": "Meebits",
      "previewImageUrl": "<https://cdn.center.app/1/0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7/5872/3e5d37cf78628851ba679bb9bca9170142e543b3130f74db5d89e076237fbcac.jpeg>",
      "relevance": 138.40265,
      "url": "<https://center.app/collections/0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7>"
    },
    ...
  ]
}

$ curl <https://api.center.dev/v1/ethereum-mainnet/search\\?query\\=meebits\\&type\\=all>

{
  "results": [
    {
      "id": "ethereum-mainnet/0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7",
      "name": "Meebits",
      "previewImageUrl": "<https://cdn.center.app/1/0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7/5872/3e5d37cf78628851ba679bb9bca9170142e543b3130f74db5d89e076237fbcac.jpeg>",
      "relevance": 138.40265,
      "url": "<https://center.app/collections/0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7>"
    },
    ...
  ]
}

Demo: Search for collections only

$ curl <https://api.center.dev/v1/polygon-mainnet/search\\?query\\=planetix\\&type\\=collection>
{
  "results": [
    {
      "id": "polygon-mainnet/0xB2435253C71FcA27bE41206EB2793E44e1Df6b6D",
      "name": "PlanetIX",
      "previewImageUrl": "<https://cdn.center.app/137/0xB2435253C71FcA27bE41206EB2793E44e1Df6b6D/3153537/774cbdf6ee2885a3e89b9f7064e6910a07d387c3db2a225344acbb2a82429cad.png>",
      "relevance": 11.72467,
      "url": "<https://center.app/polygon-mainnet/collections/0xB2435253C71FcA27bE41206EB2793E44e1Df6b6D>"
    },
    ...
  ]
}

Demo: Search for assets only

$ curl <https://api.center.dev/v1/ethereum-mainnet/search\\?query\\=meebits\\&type\\=asset>
{
  "results": [
    {
      "id": "ethereum-mainnet/0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7/0",
      "name": "Meebits",
      "previewImageUrl": "",
      "relevance": 10.40766,
      "url": "<https://center.app/collections/0x7Bd29408f11D2bFC23c34f18275bBf23bB716Bc7/0>"
    },
    ...
  ]
}

Other requests or ideas? Please submit a feature request or reach out to our support team.

Get started

If you haven’t started building yet, what are you waiting for?

About Center

https://storage.googleapis.com/center-inc-blog-media/public/media/2022-07-09-one.png

Center is a multi-chain, high-performance NFT API designed with speed and developer productivity in mind. Our seasoned team has working experience at Coinbase, WhatsApp, Facebook, Google, Square and Paradigm. We’ve led teams and built products where scalability, performance, and security are paramount — and we bring that mindset to everything we build.

To date, Center has indexed over 150TB of NFTs across 14 chains. We offer a a 99.999% uptime SLA and support users ranging from individual hackers to large enterprises.

Our APIs also power center.app, an NFT search engine that we are building. We encourage you to check it out!

What is an NFT API?

https://storage.googleapis.com/center-inc-blog-media/public/media/2022-07-09-api.jpg

Building NFT-related applications from scratch is complicated. It might require indexing multiple chains, ingesting vast quantities of data, and meticulously building low-level infrastructure to ensure all of the data is processed correctly. This could take engineers months to get right before they even start building an application.

Our APIs allow builders to abstract away this complexity and focus on building useful products for end users right away— we take care of the infrastructure and low-level technical details. With just a few lines of code, builders can use our APIs for a range of use cases including NFT rendering, search and data retrieval.

Our Investors

https://storage.googleapis.com/center-inc-blog-media/public/media/2022-07-09-one.png

Our Team

https://storage.googleapis.com/center-inc-blog-media/public/media/2022-07-09-two.png