Dune Analytics Datasets API

The Datasets API from Dune Analytics — 4 operation(s) for datasets.

Operations 4

GET /v1/datasets List datasets #
POST /v1/datasets/search Search datasets #
POST /v1/datasets/search-by-contract Search datasets by contract address #
GET /v1/datasets/{slug} Get a dataset by slug #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dune-analytics:dune-analytics-datasets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dune-analytics-datasets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact: {}
  description: Dune API
  title: Dune Datasets API
  version: '1.0'
servers:
- url: https://api.dune.com/api
tags:
- name: Datasets
paths:
  /v1/datasets:
    get:
      description: Retrieve a paginated list of datasets with optional filtering by owner and type
      parameters:
      - description: API Key for the service
        in: header
        name: X-Dune-Api-Key
        required: true
        schema:
          type: string
      - description: API Key, alternative to using the HTTP header X-Dune-Api-Key
        in: query
        name: api_key
        schema:
          type: string
      - description: Number of results to return (default 50, max 250)
        in: query
        name: limit
        schema:
          type: integer
      - description: Offset for pagination
        in: query
        name: offset
        schema:
          type: integer
      - description: Filter by owner handle
        in: query
        name: owner_handle
        schema:
          type: string
      - description: 'Filter by dataset types (comma-separated: transformation_view, transformation_table, uploaded_table, decoded_table, spell, dune_table)'
        in: query
        name: type
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.ListDatasetsResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error401'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error404'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error500'
          description: Internal Server Error
      summary: List datasets
      x-required-scope: Read
      tags:
      - Datasets
      operationId: getV1Datasets
      x-operation-id-source: derived
  /v1/datasets/search:
    post:
      description: Search for datasets across the Dune catalog, with filtering by categories, blockchains, schemas, and more
      parameters:
      - description: API Key for the service
        in: header
        name: X-Dune-Api-Key
        required: true
        schema:
          type: string
      - description: API Key, alternative to using the HTTP header X-Dune-Api-Key
        in: query
        name: api_key
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.SearchDatasetsRequest'
        description: Search datasets request
        required: true
        x-originalParamName: body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.SearchDatasetsResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error401'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error403'
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error500'
          description: Internal Server Error
      summary: Search datasets
      x-required-scope: Read
      tags:
      - Datasets
      operationId: postV1DatasetsSearch
      x-operation-id-source: derived
  /v1/datasets/search-by-contract:
    post:
      description: Find decoded datasets associated with a smart contract address
      parameters:
      - description: API Key for the service
        in: header
        name: X-Dune-Api-Key
        required: true
        schema:
          type: string
      - description: API Key, alternative to using the HTTP header X-Dune-Api-Key
        in: query
        name: api_key
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/models.SearchDatasetsByContractAddressRequest'
        description: Search by contract address request
        required: true
        x-originalParamName: body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.SearchDatasetsResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error401'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error403'
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error500'
          description: Internal Server Error
      summary: Search datasets by contract address
      x-required-scope: Read
      tags:
      - Datasets
      operationId: postV1DatasetsSearchByContract
      x-operation-id-source: derived
  /v1/datasets/{slug}:
    get:
      description: Retrieve dataset information including columns, metadata, and ownership details
      parameters:
      - description: API Key for the service
        in: header
        name: X-Dune-Api-Key
        required: true
        schema:
          type: string
      - description: API Key, alternative to using the HTTP header X-Dune-Api-Key
        in: query
        name: api_key
        schema:
          type: string
      - description: Dataset slug (e.g., 'dex.trades')
        in: path
        name: slug
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.DatasetResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error401'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error403'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error404'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error500'
          description: Internal Server Error
      summary: Get a dataset by slug
      x-required-scope: Read
      tags:
      - Datasets
      operationId: getV1DatasetsBySlug
      x-operation-id-source: derived
components:
  schemas:
    models.SearchDatasetsPagination:
      properties:
        has_more:
          type: boolean
        limit:
          type: integer
        next_offset:
          type: integer
        offset:
          type: integer
      type: object
    models.DatasetColumnMetadata:
      properties:
        description:
          type: string
        filtering_column:
          type: boolean
      type: object
    models.Error400:
      properties:
        error:
          example: Bad Request
          type: string
      type: object
    models.SearchDatasetsByContractAddressRequest:
      properties:
        blockchains:
          items:
            type: string
          type: array
        contract_address:
          type: string
        include_schema:
          type: boolean
        limit:
          type: integer
        offset:
          type: integer
      required:
      - contract_address
      type: object
    models.Error403:
      properties:
        error:
          example: Not allowed to execute query. Query is archived, unsaved or not enough permissions
          type: string
      type: object
    models.Error404:
      properties:
        error:
          example: Object not found
          type: string
      type: object
    models.SearchDatasetMetadata:
      properties:
        abi_type:
          type: string
        contract_name:
          type: string
        description:
          type: string
        page_rank_score:
          type: number
        project_name:
          type: string
        spell_metadata:
          items:
            type: integer
          type: array
        spell_type:
          type: string
      type: object
    models.DatasetColumn:
      properties:
        metadata:
          $ref: '#/components/schemas/models.DatasetColumnMetadata'
        name:
          type: string
        nullable:
          type: boolean
        type:
          type: string
      type: object
    models.DatasetOwner:
      properties:
        handle:
          type: string
        type:
          type: string
      type: object
    models.ListDatasetsResponse:
      properties:
        datasets:
          items:
            $ref: '#/components/schemas/models.DatasetResponse'
          type: array
        total:
          type: integer
      type: object
    models.SearchDatasetsRequest:
      properties:
        blockchains:
          items:
            type: string
          type: array
        categories:
          items:
            type: string
          type: array
        dataset_types:
          items:
            type: string
          type: array
        include_metadata:
          type: boolean
        include_private:
          type: boolean
        include_schema:
          type: boolean
        limit:
          type: integer
        offset:
          type: integer
        owner_scope:
          type: string
        query:
          type: string
        schemas:
          items:
            type: string
          type: array
      type: object
    models.SearchDatasetResult:
      properties:
        blockchains:
          items:
            type: string
          type: array
        category:
          type: string
        dataset_type:
          type: string
        description:
          type: string
        full_name:
          type: string
        metadata:
          $ref: '#/components/schemas/models.SearchDatasetMetadata'
        owner_scope:
          type: string
        schema:
          items:
            type: integer
          type: array
        visibility:
          type: string
      type: object
    models.Error401:
      properties:
        error:
          example: Invalid API Key
          type: string
      type: object
    models.SearchDatasetsResponse:
      properties:
        pagination:
          $ref: '#/components/schemas/models.SearchDatasetsPagination'
        results:
          items:
            $ref: '#/components/schemas/models.SearchDatasetResult'
          type: array
        total:
          type: integer
      type: object
    models.Error500:
      properties:
        error:
          example: Internal error
          type: string
      type: object
    models.DatasetResponse:
      properties:
        columns:
          items:
            $ref: '#/components/schemas/models.DatasetColumn'
          type: array
        created_at:
          type: string
        full_name:
          type: string
        is_private:
          type: boolean
        metadata: {}
        owner:
          $ref: '#/components/schemas/models.DatasetOwner'
        type:
          type: string
        updated_at:
          type: string
      type: object
x-service-info:
  categories:
  - data
  - compute
  docs:
    apiReference: https://docs.dune.com/api-reference/overview/introduction
    homepage: https://docs.dune.com
x-provenance:
  method: harvested
  publisher: Dune Analytics
  source: https://api.dune.com/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)