Dune Analytics Usage API

The Usage API from Dune Analytics — 1 operation(s) for usage.

Operations 1

POST /v1/usage Get Usage Data #

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-usage-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-usage-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact: {}
  description: Dune API
  title: Dune Usage API
  version: '1.0'
servers:
- url: https://api.dune.com/api
tags:
- name: Usage
paths:
  /v1/usage:
    post:
      description: 'Get usage data for the authenticated customer including private queries, dashboards,

        bytes used/allowed, and billing periods'
      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.GetUsageRequest'
        description: Request payload with optional start_date and end_date
        x-originalParamName: payload
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.GetUsageResponse'
          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: Get Usage Data
      x-required-scope: Read
      tags:
      - Usage
      operationId: postV1Usage
      x-operation-id-source: derived
components:
  schemas:
    models.GetUsageRequest:
      properties:
        end_date:
          description: Optional field in YYYY-MM-DD format
          type: string
        start_date:
          description: Optional field in YYYY-MM-DD format
          type: string
      type: object
    models.Error400:
      properties:
        error:
          example: Bad Request
          type: string
      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.BillingPeriod:
      properties:
        credits_included:
          description: Float value
          type: number
        credits_used:
          description: Float value
          type: number
        end_date:
          description: YYYY-MM-DD format
          type: string
        start_date:
          description: YYYY-MM-DD format
          type: string
      type: object
    models.Error401:
      properties:
        error:
          example: Invalid API Key
          type: string
      type: object
    models.GetUsageResponse:
      properties:
        billing_periods:
          items:
            $ref: '#/components/schemas/models.BillingPeriod'
          type: array
        bytes_allowed:
          type: integer
        bytes_used:
          type: integer
        private_dashboards:
          type: integer
        private_queries:
          type: integer
      type: object
    models.Error500:
      properties:
        error:
          example: Internal error
          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)