Skip to main content
POST
/
v1
/
datasets
/
search-by-contract
Search datasets by contract address
curl --request POST \
  --url https://api.dune.com/api/v1/datasets/search-by-contract \
  --header 'Content-Type: application/json' \
  --header 'X-Dune-Api-Key: <x-dune-api-key>' \
  --data '
{
  "contract_address": "<string>",
  "blockchains": [
    "<string>"
  ],
  "include_schema": true,
  "limit": 123,
  "offset": 123
}
'
{
  "pagination": {
    "has_more": true,
    "limit": 123,
    "next_offset": 123,
    "offset": 123
  },
  "results": [
    {
      "blockchains": [
        "<string>"
      ],
      "category": "<string>",
      "dataset_type": "<string>",
      "description": "<string>",
      "full_name": "<string>",
      "metadata": {
        "abi_type": "<string>",
        "contract_name": "<string>",
        "description": "<string>",
        "page_rank_score": 123,
        "project_name": "<string>",
        "spell_metadata": [
          123
        ],
        "spell_type": "<string>"
      },
      "owner_scope": "<string>",
      "schema": [
        123
      ],
      "visibility": "<string>"
    }
  ],
  "total": 123
}

Use Cases

  • Contract Analysis: Find all decoded datasets associated with a specific smart contract address.
  • Blockchain Filtering: Narrow results to decoded tables on specific blockchains using the blockchains parameter.
  • Build Contract Explorers: Power contract exploration tools that surface relevant decoded tables for any contract address.
  • Data Integration: Programmatically discover decoded event and function tables for a contract to build ETL pipelines.
  • Schema Discovery: Retrieve the schema of decoded tables for a contract by setting include_schema to true.

Headers

X-Dune-Api-Key
string
required

API Key for the service

Query Parameters

api_key
string

API Key, alternative to using the HTTP header X-Dune-Api-Key

Body

application/json

Search by contract address request

contract_address
string
required
blockchains
string[]
include_schema
boolean
limit
integer
offset
integer

Response

OK

pagination
object
results
object[]
total
integer