How to Find a Collection by Name and Get Its Assets

Follow this tutorial to learn 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'

📘

Note!

  • To authorize your request, you need to get an 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:

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

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 an 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:

{
    "data": [
        {
            "id": "5e1f4454-34ff-5118-9987-96b481625128",
            "token_id": "9999",
            "image_url": "token/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/5e1f4454-34ff-5118-9987-96b481625128.png",
            "name": "#9999",
            "contract_address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D",
            "wallets": [],
            "burned": false
        },
        {...more assets...}
    ],
    "meta": {
        "paging": {
            "next_page_token": "eyJ0b2tlbl9pZCI6OTgyOCwidWlkIjoiNjMzOWIzMWYtNjg1Yi01ZDA1LWIyNmYtNDliNTc2M2E0ZDUzIn0="
        }
    }
}

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.