Skip To Content

Blockdaemon Documentation

NFT Tutorials: Collections

Overview
How to Get All Collections Sorted by Name
How to Get All ERC-721 and ERC-1155 Collections
How to Filter Collections by Contract Address
How to Get a Collection by Name
How to Get a Collection by ID


Overview

Our NFT endpoints support advanced querying options, allowing you to retrieve the exact data you need with a single request.

This page contains short, step-by-step tutorials explaining how to get information on NFT collections in the Ethereum Mainnet network.

The example queries below are based on the following endpoints:


How to Get All Collections Sorted by Name

This tutorial explains the steps involved in getting a list of all the collections in the Ethereum Mainnet network and sorting it by name in the reverse alphabetical order (Z–A).

Step 1. Use the collections endpoint with the following details:

  • protocol: ethereum
  • network: mainnet
https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections

Step 2.Add the following parameters:

  • field to sort by
    • parameter: sort_by
    • value: name
  • sort order
    • parameter: order
    • value: desc
https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections?sort_by=name&order=desc

Step 3. Execute the query.

For example, in cURL you should run the following code:

curl -X GET 'https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections?sort_by=name&order=desc' -H 'Authorization: Bearer YOUR_TOKEN'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token.

Step 4. Your results will look something like this example response.


How to Get All ERC-721 and ERC-1155 Collections

This tutorial explains the steps involved in getting Ethereum Mainnet collections of ERC-721 and ERC-1155 tokens.

Step 1. Use the collections endpoint with the following details:

  • protocol: ethereum
  • network: mainnet
https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections

Step 2. Add the following parameters:

  • token type 1
    • parameter: token_type
    • value: ERC721
  • token type 2
    • parameter: token_type
    • value: ERC1155
https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections?token_type=ERC721&token_type=ERC1155

Note: The following token types are also available: ERC20, CRYPTOPUNKS

Step 3. Execute the query.

For example, in cURL you should run the following code:

curl -X GET 'https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections?token_type=ERC721&token_type=ERC1155' -H 'Authorization: Bearer YOUR_TOKEN'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token.

Step 4. Your results will look something like this example response.


How to Filter Collections by Contract Address

This tutorial explains the steps involved in getting a list of Ethereum Mainnet collections filtered by contract address.

Please note that typically one collection is associated with one contract address. However, sometimes a collection can include multiple contracts, or a contract can be a part of multiple collections.

Step 1. Use the collections endpoint with the following details:

  • protocol: ethereum
  • network: mainnet
https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections

Step 2. Add the following parameters:

  • contract address 1
    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
  • contract address 2
    • parameter: contract_address
    • value: e.g. 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB
https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&contract_address=0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB

Step 3. Execute the query.

For example, in cURL you should run the following code:

curl -X GET 'https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&contract_address=0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB' -H 'Authorization: Bearer YOUR_TOKEN'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token.

Step 4. Your results will look something like this example response.


How to Get a Collection by Name

This tutorial explains the steps involved in getting any Ethereum Mainnet collection by its name.

Step 1. Use the collections endpoint with the following details:

  • protocol: ethereum
  • network: mainnet
https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections

Step 2. Add the following parameter:

  • collection name
    • parameter: collection_name
    • value: e.g. Bored Ape Yacht Club
https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections?collection_name=Bored Ape Yacht Club

Step 3. Execute the query.

For example, in cURL you should run the following code:

curl -X GET 'https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collections?collection_name=Bored%20Ape%20Yacht%20Club' -H 'Authorization: Bearer YOUR_TOKEN'

Notes:

  • To authorize your request, you need to get a Ubiquity API key and use it as a bearer token.
  • Sometimes collection names contain whitespaces. When using cURL, replace them with %20.

Step 4. Your results will look something like this example response.


How to Get a Collection by ID

This tutorial explains the steps involved in getting any Ethereum Mainnet collection by its ID.

Step 1. Use the collection endpoint with the following details:

  • protocol: ethereum
  • network: mainnet
  • collection ID: 86c152df-55e6-562d-a868-51cc72771efb
https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collection/338203fe-1361-4ee1-a26b-17ac5308b385

Step 2. Execute the query.

For example, in cURL you should run the following code:

curl -X GET 'https://ubiquity.api.blockdaemon.com/v1/nft/ethereum/mainnet/collection/86c152df-55e6-562d-a868-51cc72771efb' -H 'Authorization: Bearer YOUR_TOKEN'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token.

Step 3. Your results will look something like this example response.

We don't support Internet Explorer

Please use Chrome, Safari, Firefox, or Edge to view this site.