Skip To Content

Blockdaemon Documentation

NFT Tutorials: Assets

Overview
How to Get NFTs Owned by a Wallet
How to Get All ERC-1155 NFTs Owned by a Wallet
How to Verify That a Wallet Owns an NFT
How to Get All NFTs for a Smart Contract
How to Get NFTs with Given Attributes in a Collection
How to Get All NFTs in a Collection, Sorted by Mint Date
How to Get All NFTs in a Collection, Sorted by Rarity Rank
How to Render the Image Associated with an NFT
How to Get the Attributes, Mint Date, and Type of an NFT
How to Get an NFT by Unique ID


Overview

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

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

All example queries are based on the following endpoints:.


How to Get NFTs Owned by a Wallet

This tutorial explains the steps involved in getting a list of Ethereum Mainnet NFTs owned by any given wallet.

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

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

Step 2. Add the following parameters:

  • wallet address
    • parameter: wallet_address
    • value: e.g. 0x5682035b6b1D04924C7661b09A974fF0695De6bE
  • wallet filter
    • parameter: show_wallets
    • value: e.g. true
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?wallet_address=0x5682035b6b1D04924C7661b09A974fF0695De6bE&show_wallets=true

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/assets?wallet_address=0x5682035b6b1D04924C7661b09A974fF0695De6bE&show_wallets=true' -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-1155 NFTs Owned by a Wallet

This tutorial explains the steps involved in getting a list of Ethereum Mainnet ERC-1155 NFTs owned by any given wallet.
Step 1. Use the assets endpoint with the following details:

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

Step 2. Add the following parameters:

  • wallet address
    • parameter: wallet_address
    • value: e.g. 0x5682035b6b1D04924C7661b09A974fF0695De6bE
  • token type
    • parameter: token_type
    • value: ERC1155
  • wallet filter
    • parameter: show_wallets
    • value: e.g. true
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?wallet_address=0x5682035b6b1D04924C7661b09A974fF0695De6bE&token_type=ERC1155&show_wallets=true

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/assets?wallet_address=0x5682035b6b1D04924C7661b09A974fF0695De6bE&token_type=ERC1155&show_wallets=true' -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 Verify That a Wallet Owns an NFT

This tutorial explains the steps involved in verifying that a given wallet in the Ethereum Mainnet network owns a given NFT.

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

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

Step 2. Add the following parameters:

  • contract address
    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
  • token ID
    • parameter: token_id
    • value: e.g. 9999
  • wallet address
    • parameter: wallet_address
    • value: e.g. 0x46Fd6B647Dc8C82aD8f6cf0CC6b22ACad3f6e39d
  • wallet filter
    • parameter: show_wallets
    • value: e.g. true
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999&wallet_address=0x46Fd6B647Dc8C82aD8f6cf0CC6b22ACad3f6e39d&show_wallets=true

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/assets?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999&wallet_address=0x46Fd6B647Dc8C82aD8f6cf0CC6b22ACad3f6e39d&show_wallets=true' -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. If the specified NFT is owned by the wallet, the query will return the NFT. Your results will look something like this example response.

If the ownership is not verified, the query will return an empty array:


{
    "data": [],
    "meta": null
}

How to Get All NFTs for a Smart Contract

This tutorial explains the steps involved in getting a list of all the NFTs of any given smart contract in the Ethereum Mainnet network.

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

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

Step 2. Add the following parameter:

  • contract address
    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?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/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 4. Your results will look something like this example response.


How to Get NFTs with Given Attributes in a Collection

This tutorial explains the steps involved in getting a list of NFTs from any given Ethereum Mainnet collection, filtered by given attributes.

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

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

Step 2. Add the following parameters:

  • collection name
    • parameter: collection_name
    • value: e.g. Bored Ape Yacht Club
  • attribute 1
    • parameter: attributes
    • value: a key:value pair, e.g. Background:Purple
  • attribute 2
    • parameter: attributes
    • value: a key:value pair, e.g. Earring:Gold Hoop

Note: The attributes filter is case insensitive.

https://svc.blockdaemon.com/nft/v1t/ethereum/mainnet/assets?collection_name=Bored Ape Yacht Club&attributes=Background:Purple&attributes=Earring:Gold Hoop

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/assets?collection_name=Bored%20Ape%20Yacht%20Club&attributes=Background:Purple&attributes=Earring:Gold%20Hoop' -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 and attributes contain whitespaces. When using cURL, replace them with %20.

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

This query finds all NFTs with purple background and a gold hoop earring. The response does not contain attributes, but you can get them with another endpoint:


How to Get All the NFTs in a Collection, Sorted by Mint Date

This tutorial explains the steps involved in getting a list of all the NFTs in any given Ethereum Mainnet collection, sorted by mint date from the earliest to the latest.

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

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

Step 2. Add the following parameters:

  • collection name
    • parameter: collection_name
    • value: e.g. Bored Ape Yacht Club
  • field to sort by
    • parameter: sort_by
    • value: mint_date
  • sort order
    • parameter: order
    • value: asc
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?collection_name=Bored Ape Yacht Club&sort_by=mint_date&order=asc

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/assets?collection_name=Bored%20Ape%20Yacht%20Club&sort_by=mint_date&order=asc' -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 and attributes contain whitespaces. When using cURL, replace them with %20.

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

The response does not contain mint dates, but you can get them with another endpoint:


How to Get All the NFTs in a Collection, Sorted by Rarity Rank

This tutorial explains the steps involved in getting a list of all the NFTs in any given Ethereum Mainnet collection, sorted by rarity rank from the highest to the lowest.

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 assets with rarity 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/assets/rarity/4203aedd-7964-5fe1-b932-eb8c4fda7822

Step 4. Add the following parameter:

  • sorting method
    • parameter: sort_by
    • value: rarity_rank
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets/rarity/4203aedd-7964-5fe1-b932-eb8c4fda7822?sort_by=rarity_rank

Step 5. 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/rarity/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 6. Your results will look something like this example response.


How to Render the Image Associated with an NFT

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

Notes:

  • Image URLs are returned for assets from 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 assets endpoint with the following details:

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

Step 2. Add the following parameters:

  • contract address
    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
  • token ID
    • parameter: token_id
    • value: e.g. 9999
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/assets?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999

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/assets?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999' -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 image_url field:

{
    "id": "5e1f4454-34ff-5118-9987-96b481625128",
    "token_id": "9999",
    "image_url": "token/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/5e1f4454-34ff-5118-9987-96b481625128.png",
    ...more properties...
}

Step 5. Finally, you can render the image.

Use the media endpoint with the media path (copied in the previous step):
token/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/5e1f4454-34ff-5118-9987-96b481625128.png

https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/media/token/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/5e1f4454-34ff-5118-9987-96b481625128.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/token/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/5e1f4454-34ff-5118-9987-96b481625128.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 Get the Attributes, Mint Date, and type of an NFT

This tutorial explains the steps involved in getting any Ethereum Mainnet NFT by contract address and token id and finding out its attributes, mint date, and type.

Here is an alternative way to access this information: How to Get an NFT by Unique ID

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

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

Step 2. Add the following parameters:

  • contract address
    • parameter: contract_address
    • value: e.g. 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
  • token ID
    • parameter: token_id
    • value: e.g. 9999
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/asset?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999

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/asset?contract_address=0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D&token_id=9999' -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 token type is returned by the token_type field, e.g.:

  • "token_type": "ERC721"

The mint date is returned in Unix time by the mint_date field:

  • "mint_date": "1619858117"

Attributes are located in the attributes section:

"attributes": [
   {
       "trait_type": "Hat",
       "value": "Army Hat"
   },
   {
       "trait_type": "Background",
       "value": "Purple"
   },
   {...more attributes...}
]

How to Get an NFT by Unique ID

This tutorial explains the steps involved in getting any Ethereum Mainnet NFT by its unique ID. The response contains the attributes, mint date, and type of a given NFT as well as other details associated with it.

Step 1. Use the assets endpoint to get a list of NFTs.

For example, you can follow these steps: How to Get All NFTs for a Smart Contract

Step 2. Copy an asset ID from the id field:

{
    "id": "5e1f4454-34ff-5118-9987-96b481625128",
    "token_id": "9999",
    ...more properties...
}

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

  • protocol: ethereum
  • network: mainnet
  • asset ID: 5e1f4454-34ff-5118-9987-96b481625128 (copied in the previous step)
https://svc.blockdaemon.com/nft/v1/ethereum/mainnet/asset/5e1f4454-34ff-5118-9987-96b481625128

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/asset/5e1f4454-34ff-5118-9987-96b481625128' -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 token type is returned by the token_type field, e.g.:

  • "token_type": "ERC721"

The mint date is returned in Unix time by the mint_date field:

  • "mint_date": "1619858117"

Attributes are located in the attributes section:

"attributes": [
   {
       "trait_type": "Hat",
       "value": "Army Hat"
   },
   {
       "trait_type": "Background",
       "value": "Purple"
   },
   {...more attributes...}
]

We don't support Internet Explorer

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