How to Filter Collections by Contract Address
Follow this tutorial to learn 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
- parameter:
-
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
- parameter:
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 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.
Updated about 2 months ago