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 Find a Collection by Name and Get Its Assets
How to Render the Image Associated with a Collection
How to Find Out the Type of NFTs in a Collection
How to Get a Collection by Unique ID
How to Get a Subcollection


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://svc.blockdaemon.com/nft/v1/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://svc.blockdaemon.com/nft/v1/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://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections?sort_by=name&order=desc' -H 'Authorization: Bearer YOUR_API_KEY'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

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://svc.blockdaemon.com/nft/v1/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://svc.blockdaemon.com/nft/v1/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://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections?token_type=ERC721&token_type=ERC1155' -H 'Authorization: Bearer YOUR_API_KEY'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

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

The response does not contain token types, but you can get them with another endpoint:


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.

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

  • protocol: ethereum
  • network: mainnet
https://svc.blockdaemon.com/nft/v1/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://svc.blockdaemon.com/nft/v1/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://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&contract_address=0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB' -H 'Authorization: Bearer YOUR_API_KEY'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

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://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections

Step 2. Add the following parameter:

  • collection name
    • parameter: collection_name
    • value: e.g. Bored Ape Yacht Club
https://svc.blockdaemon.com/nft/v1/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://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections?collection_name=Bored%20Ape%20Yacht%20Club' -H 'Authorization: Bearer YOUR_API_KEY'

Notes:

  • To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide
  • 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 Find a Collection by Name and Get Its Assets

This tutorial explains the steps involved in finding an Ethereum Mainnet collection by name and getting its assets.

Please note that you do not need to know the exact collection name. Just get collections with names matching a given search string, select the one you are interested in, and get its assets.

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

  • protocol: ethereum
  • network: mainnet
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections/search

Step 2. Add the following parameter:

  • collection name
    • parameter: name
    • value: e.g. bored ape
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections/search?name=bored ape

Step 3. Execute the query.

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

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections/search?name=bored%20ape' -H 'Authorization: Bearer YOUR_API_KEY'

Notes:

  • To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide
  • When using cURL, replace spaces in your search string with %20.

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

You will get all collections with names matching your search string:

  • Basic Bored Ape Club
  • Bored Ape Comic
  • Bored Ape Yacht Club
  • Bored Ape Mountain Club
  • Bored Awesome Apes
  • Bored Crypto Apes
  • Bored Eminape Yacht Club
  • The Bored Ape Punk Club
  • BoredApeDinoClub
  • etc.

Find the collection you are interested in, e.g. Bored Ape Yacht Club, and copy its contract address from the contracts section:

{
    "id": "4203aedd-7964-5fe1-b932-eb8c4fda7822",
    "name": "Bored Ape Yacht Club",
    "logo": "collection/4203aedd-7964-5fe1-b932-eb8c4fda7822/logo.png",
    "contracts": [
        "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"
    ],
    "verified": true
}

Step 5. Use the assets endpoint with the following details:

  • protocol: ethereum
  • network: mainnet
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets

Step 6. Add the following parameter:

  • contract address (copied in the previous step)
    • parameter: collection_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D

Step 7. Execute the query.

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

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D' -H 'Authorization: Bearer YOUR_API_KEY'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

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


How to Render the Image Associated with a Collection

This tutorial explains the steps involved in rendering the image associated with a given collection in the Ethereum Mainnet network.

Notes:

  • Image URLs are returned for the top popular collections. All images are cached by Blockdaemon for quick access.
  • Blockdaemon collects NFT information and data from various third-party sources (“NFT Content”). We do not create, own or control NFT Content and we do not routinely monitor NFT Content for violations of these Terms. You acknowledge that Blockdaemon has no responsibility or liability related to NFT Content and agree that you must evaluate, and decide for yourself if you wish to use any NFT Content.

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

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

Step 2. Add the following parameter:

  • contract address
    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D

Step 3. Execute the query.

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

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collections?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D' -H 'Authorization: Bearer YOUR_API_KEY'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

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

Copy the media path from the logo field:

{
    "id": "4203aedd-7964-5fe1-b932-eb8c4fda7822",
    "name": "Bored Ape Yacht Club",
    "logo": "collection/4203aedd-7964-5fe1-b932-eb8c4fda7822/logo.png",
    "contracts": [
        "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"
    ],
    "verified": true
}

Step 5. Finally, you can render the image.

Use the media endpoint with the media path (copied in the previous step):
collection/4203aedd-7964-5fe1-b932-eb8c4fda7822/logo.png

https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/media/collection/4203aedd-7964-5fe1-b932-eb8c4fda7822/logo.png
  • In your browser, just use the address bar.
  • In Postman, click on the URL in the response. A tab with a new query will open. Run it, and Postman will render the image.
  • In cURL, run the following code to download the image to your working directory:
curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/media/collection/4203aedd-7964-5fe1-b932-eb8c4fda7822/logo.png' --output YOUR_FILENAME.png -H 'Authorization: Bearer YOUR_API_KEY'

Note: In all cases authentication is required. You need to get a Ubiquity API key and use it as a bearer token or a query parameter when accessing the image. Learn more: Authentication Guide


How to Find Out the Type of NFTs in a Collection

This tutorial explains the steps involved in getting any Ethereum Mainnet collection by contract address and finding out the type of NFTs in it.

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

  • protocol: ethereum
  • network: mainnet
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collection

Step 3. Add the following parameter:

  • contract address
    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collection?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D

Step 3. Execute the query.

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

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collection?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D' -H 'Authorization: Bearer YOUR_API_KEY'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

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

The NFT type is specified in the contracts.type field, e.g.:

  • "type": "ERC721"

How to Get a Collection by Unique ID

This tutorial explains the steps involved in getting any Ethereum Mainnet collection by its unique ID. The response contains the type of NFTs in the collection as well as other details associated with it.

Step 1. Use the collections or collections search endpoint to get an NFT collection or a list of collections.

For example, you can follow these steps: How to Get a Collection by Name

Step 2. Copy a collection ID from the id field:

{
    "id": "4203aedd-7964-5fe1-b932-eb8c4fda7822",
    "name": "Bored Ape Yacht Club",
    ...more properties...
}

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

  • protocol: ethereum
  • network: mainnet
  • collection ID: 4203aedd-7964-5fe1-b932-eb8c4fda7822 (copied in the previous step)
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collection/4203aedd-7964-5fe1-b932-eb8c4fda7822

Step 4. Execute the query.

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

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collection/4203aedd-7964-5fe1-b932-eb8c4fda7822' -H 'Authorization: Bearer YOUR_API_KEY'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

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

The NFT type is specified in the contracts.type field, e.g.:

  • "type": "ERC721"

How to Get a Subcollection

Some collections, e.g. Art Blocks, contain subcollections. This tutorial explains the steps involved in getting a subcollection of a given parent collection in Ethereum Mainnet.

Step 1. Use the collections or collections search endpoint to find a parent collection.

For example, you can follow these steps: How to Get a Collection by Name

Step 2. Copy a collection ID from the id field:

{
    "id": "d4d662da-d02a-5ae1-9e79-783c5abe020f",
    "name": "Art Blocks",
    ...more properties...
}

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

  • protocol: ethereum
  • network: mainnet
  • collection ID: d4d662da-d02a-5ae1-9e79-783c5abe020f (copied in the previous step)
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collection/d4d662da-d02a-5ae1-9e79-783c5abe020f

Step 4. Execute the query.

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

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collection/d4d662da-d02a-5ae1-9e79-783c5abe020f' -H 'Authorization: Bearer YOUR_API_KEY'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

Step 5. Copy a subcollection id from the sub_collection section:

{
    "collection": {
        "id": "d4d662da-d02a-5ae1-9e79-783c5abe020f",
        "name": "Art Blocks",
        "description": "Art Blocks is leading a new generation of art. Hosting projects from today’s most innovative digital artists, our platform combines creative coding with blockchain technology to establish a new paradigm for the creation and ownership of art.",
        "logo": "collection/d4d662da-d02a-5ae1-9e79-783c5abe020f/logo.png",
        "banner": "",
        "verified": true,
        "contracts": [],
        "meta": {},
        "sub_collection": [
            {
                "id": "937538b7-9d37-526c-aa41-0a6af53e1b73",
                "name": "Art Blocks Curated"
            },
            { ...more subcollections... }
        ]
    }
}

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

  • protocol: ethereum
  • network: mainnet
  • collection ID: 937538b7-9d37-526c-aa41-0a6af53e1b73 (copied in the previous step)
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collection/937538b7-9d37-526c-aa41-0a6af53e1b73

Step 7. Execute the query.

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

curl -X GET 'https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/collection/937538b7-9d37-526c-aa41-0a6af53e1b73' -H 'Authorization: Bearer YOUR_API_KEY'

Note: To authorize your request, you need to get a Ubiquity API key and use it as a bearer token or a query parameter. Learn more: Authentication Guide

Step 8. Get the response.

Some subcollections contain their own subcollections, which can be retrieved with the same endpoint. See the sub_collection section in the example below. Also, please note that the parent_id field contains the ID of the parent collection.

{
    "collection": {
        "id": "937538b7-9d37-526c-aa41-0a6af53e1b73",
        "name": "Art Blocks Curated",
        "description": "The Curated Collection includes projects that have been selected by Art Blocks’ Curation Board for their world-class innovation, technical rigor, and aesthetic beauty.",
        "logo": "",
        "banner": "",
        "verified": false,
        "contracts": [],
        "meta": null,
        "parent_id": "d4d662da-d02a-5ae1-9e79-783c5abe020f",
        "sub_collection": [
            {
                "id": "e2ff882b-4218-5011-86d5-e0251ec99049",
                "name": "Sudfah by Melissa Wiederrecht"
            },
            { ...more subcollections... }
        ]
    }
}

We don't support Internet Explorer

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