Skip To Content

Blockdaemon Documentation

GET NFT Assets with Rarity

GET NFT Assets with Rarity
Ubiquity NFT URL
Path Parameters
Query Parameters
Example Queries
Example Response


GET NFT Assets with Rarity

https://{ubiquity_nft_url}/{protocol}/{network}/assets/rarity/{collection_id}

Returns a simplified lisf of NFT assets with rarity information by a given collection.

The response is paginated — use a query parameter to get the next page.

Developer documentation: GET NFT Assets with Rarity
Learn how to authorize your request: Authentication Guide

Notes:

  • 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.
  • To get a list of assets with information on wallets and burned tokes, use GET NFT Assets.
  • To get more information about a particular asset, use GET NFT Asset.

Ubiquity URL

To run a query, add your Ubiquity NFT URL. For most users this will be:

  • svc.blockdaemon.com/nft/v1

An example of this is shown below:

https://svc.blockdaemon.com/nft/v1/{protocol}/{network}/assets/rarity/{collection_id}

Note: If you created your Ubiquity API Key before September 2022, add the legacy Ubiquity NFT URL:

  • ubiquity.api.blockdaemon.com/nft/v1

An example of this is shown below:

https://ubiquity.api.blockdaemon.com/nft/v1/{protocol}/{network}/assets/rarity/{collection_id}

Path Parameters

You should specify a protocol and a network as path parameters, e.g.:

  • ethereum/mainnet

It is also required to specify a collection id as a path parameters, e.g.:

  • 4203aedd-7964-5fe1-b932-eb8c4fda7822

Note: Collection IDs are returned by GET All NFT Collections in the id field.


Query Parameters

To sort the results, use

  • parameter: sort_by
  • value: name (default) / mint_date / rarity_rank / token_id (default)

To set the sort order, use

  • parameter: order
  • value: asc / desc

To set the maximum number of assets returned on one page, use

  • parameter: page_size
  • value: 50 by default, up to 100

To get the next page, use

  • parameter: page_token
  • value: returned in the next_page_token field

Example Queries

The queries in this section provide useful examples for GET NFT Assets with Rarity.

For more details, visit: How to Get all NFTs in a Collection, Sorted by Rarity Rank

Get Assets by Collection ID

To get a list of Ethereum Mainnet assets with rarity by a given collection ID, use the following query:

https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets/rarity/4203aedd-7964-5fe1-b932-eb8c4fda7822

Get Assets Sorted by Rank

To get a list of Ethereum Mainnet assets by a given collection ID, sorted by rank, use the following query:

https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets/rarity/4203aedd-7964-5fe1-b932-eb8c4fda7822?sort_by=rank

Example Response

The following is a typical response from GET NFT Assets with Rarity:

{
    "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",
            "rarity": [
                {
                    "model": "open_rarity",
                    "score": 0.9954297307820068,
                    "rank": "5327"
                }
            ]
        },
        {...more assets...}
    ],
    "meta": {
        "paging": {
            "next_page_token": "eyJ0b2tlbl9pZCI6OTgyOCwidWlkIjoiNjMzOWIzMWYtNjg1Yi01ZDA1LWIyNmYtNDliNTc2M2E0ZDUzIn0="
        }
    }
}

We don't support Internet Explorer

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