How to Get All Collections Sorted by Name

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

{
    "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": ""
        }
    }
}

šŸ‘‹ Need Help?

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