Dune Analytics Uploads API

The Uploads API from Dune Analytics — 5 operation(s) for uploads.

Operations 6

GET /v1/uploads List all tables owned by the account #
POST /v1/uploads Create an empty uploaded table with a defined schema #
POST /v1/uploads/csv Upload CSV file as a table #
DELETE /v1/uploads/{namespace}/{table_name} Delete an uploaded table #
POST /v1/uploads/{namespace}/{table_name}/clear Clear all data from an uploaded table #
POST /v1/uploads/{namespace}/{table_name}/insert Insert data into an uploaded table #

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-uploads-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-uploads-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact: {}
  description: Dune API
  title: Dune Uploads API
  version: '1.0'
servers:
- url: https://api.dune.com/api
tags:
- name: Uploads
paths:
  /v1/uploads:
    get:
      description: Returns a paginated list of all tables owned by the authenticated account.
      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 tables to return on a page. Default: 50, max: 10000'
        in: query
        name: limit
        schema:
          format: int32
          type: integer
      - description: Offset used for pagination. Negative values are treated as 0
        in: query
        name: offset
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.TableListResponse'
          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
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error500'
          description: Internal Server Error
      summary: List all tables owned by the account
      x-required-scope: Read
      tags:
      - Uploads
      operationId: getV1Uploads
      x-operation-id-source: derived
    post:
      description: 'Creates an empty uploaded table that can be inserted into with the /insert endpoint.

        Each successful table creation consumes 10 credits.'
      parameters:
      - description: API Key for the service
        in: header
        name: X-Dune-Api-Key
        required: true
        schema:
          type: string
      - description: Alternative to using the X-Dune-Api-Key header
        in: query
        name: api_key
        schema:
          type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/models.TableCreateRequest'
        description: payload
        x-originalParamName: payload
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.TableCreateResponse'
          description: OK
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.TableCreateResponse'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error400'
          description: Bad Request
        '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: Create an empty uploaded table with a defined schema
      x-required-scope: Read/Write
      tags:
      - Uploads
      operationId: postV1Uploads
      x-operation-id-source: derived
  /v1/uploads/csv:
    post:
      description: 'Upload a CSV file to create a table with automatic schema inference.

        The size limit per upload is 500MB. Storage limits: 100MB (free), 1GB (analyst), 15GB (plus).'
      parameters:
      - description: API Key for the service
        in: header
        name: X-Dune-Api-Key
        required: true
        schema:
          type: string
      - description: Alternative to using the X-Dune-Api-Key header
        in: query
        name: api_key
        schema:
          type: string
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/models.CSVUploadRequest'
        description: payload
        required: true
        x-originalParamName: payload
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.CSVUploadResponse'
          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
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.Error500'
          description: Internal Server Error
      summary: Upload CSV file as a table
      x-required-scope: Read/Write
      tags:
      - Uploads
      operationId: postV1UploadsCsv
      x-operation-id-source: derived
  /v1/uploads/{namespace}/{table_name}:
    delete:
      description: Permanently deletes the specified uploaded table and all its data.
      parameters:
      - description: API Key for the service
        in: header
        name: X-Dune-Api-Key
        required: true
        schema:
          type: string
      - description: Alternative to using the X-Dune-Api-Key header
        in: query
        name: api_key
        schema:
          type: string
      - description: The namespace of the table to delete
        in: path
        name: namespace
        required: true
        schema:
          type: string
      - description: The table name of the table to delete
        in: path
        name: table_name
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.TableDeleteResponse'
          description: OK
        '404':
          content:
            application/json:
              schema: {}
          description: Not Found
        '500':
          content:
            application/json:
              schema: {}
          description: Internal Server Error
      summary: Delete an uploaded table
      x-required-scope: Read/Write
      tags:
      - Uploads
      operationId: deleteV1UploadsByNamespaceByTableName
      x-operation-id-source: derived
  /v1/uploads/{namespace}/{table_name}/clear:
    post:
      description: Removes all data from the specified uploaded table while preserving the table structure and schema.
      parameters:
      - description: API Key for the service
        in: header
        name: X-Dune-Api-Key
        required: true
        schema:
          type: string
      - description: Alternative to using the X-Dune-Api-Key header
        in: query
        name: api_key
        schema:
          type: string
      - description: The namespace of the table to clear
        in: path
        name: namespace
        required: true
        schema:
          type: string
      - description: The table name of the table to clear
        in: path
        name: table_name
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.TableClearResponse'
          description: OK
        '404':
          content:
            application/json:
              schema: {}
          description: Not Found
        '500':
          content:
            application/json:
              schema: {}
          description: Internal Server Error
      summary: Clear all data from an uploaded table
      x-required-scope: Read/Write
      tags:
      - Uploads
      operationId: postV1UploadsByNamespaceByTableNameClear
      x-operation-id-source: derived
  /v1/uploads/{namespace}/{table_name}/insert:
    post:
      description: 'Inserts data into an existing table. Accepts CSV (text/csv) or

        NDJSON (application/x-ndjson) content types.'
      parameters:
      - description: API Key for the service
        in: header
        name: X-Dune-Api-Key
        required: true
        schema:
          type: string
      - description: Alternative to using the X-Dune-Api-Key header
        in: query
        name: api_key
        schema:
          type: string
      - description: The namespace of the table
        in: path
        name: namespace
        required: true
        schema:
          type: string
      - description: The table name
        in: path
        name: table_name
        required: true
        schema:
          type: string
      - description: 'Content type: text/csv or application/x-ndjson'
        in: header
        name: Content-Type
        required: true
        schema:
          type: string
      requestBody:
        content:
          '*/*':
            schema:
              type: string
        description: The data to insert (CSV or NDJSON format)
        required: true
        x-originalParamName: data
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/models.TableInsertResponse'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
        '404':
          content:
            application/json:
              schema: {}
          description: Not Found
        '500':
          content:
            application/json:
              schema: {}
          description: Internal Server Error
      summary: Insert data into an uploaded table
      x-required-scope: Read/Write
      tags:
      - Uploads
      operationId: postV1UploadsByNamespaceByTableNameInsert
      x-operation-id-source: derived
components:
  schemas:
    models.Error400:
      properties:
        error:
          example: Bad Request
          type: string
      type: object
    models.CSVUploadRequest:
      properties:
        data:
          description: The data to be uploaded in CSV format.
          type: string
        description:
          description: Description of the upload.
          type: string
        is_private:
          description: Indicates if the upload is private.
          type: boolean
        table_name:
          description: The name of the table to store the data.
          type: string
      type: object
    models.TableInsertResponse:
      properties:
        bytes_written:
          type: integer
        name:
          type: string
        rows_written:
          type: integer
      type: object
    models.Error404:
      properties:
        error:
          example: Object not found
          type: string
      type: object
    models.TableDeleteResponse:
      properties:
        message:
          type: string
      type: object
    models.TableCreateRequest:
      properties:
        description:
          type: string
        is_private:
          type: boolean
        namespace:
          type: string
        schema:
          items:
            $ref: '#/components/schemas/models.TableColumn'
          type: array
        table_name:
          type: string
      type: object
    models.TableListElement:
      properties:
        columns:
          description: List of table columns
          items:
            $ref: '#/components/schemas/models.TableColumnInfo'
          type: array
        created_at:
          description: ISO 8601 timestamp of table creation
          type: string
        full_name:
          description: Fully qualified table name (catalog.schema.table)
          type: string
        is_private:
          description: Whether the table is private
          type: boolean
        owner:
          allOf:
          - $ref: '#/components/schemas/models.TableOwner'
          description: Owner information
        purged_at:
          description: ISO 8601 timestamp of when table was purged
          type: string
        table_size_bytes:
          description: Size of the table in bytes
          type: string
        updated_at:
          description: ISO 8601 timestamp of last update
          type: string
      type: object
    models.CSVUploadResponse:
      properties:
        full_name:
          description: the full name of the table that was created
          example: dune.my_team.dataset_ten_year_us_interest_rates
          type: string
        success:
          description: Indicator if the request was successful
          type: boolean
        table_name:
          description: The name of the table that was created
          example: ten_year_us_interest_rates
          type: string
      type: object
    models.TableListResponse:
      properties:
        next_offset:
          description: Offset for next page of results
          type: integer
        tables:
          items:
            $ref: '#/components/schemas/models.TableListElement'
          type: array
      type: object
    models.TableOwner:
      properties:
        handle:
          description: User or team identifier
          type: string
        type:
          description: Type of entity that created the table
          type: string
      type: object
    models.TableCreateResponse:
      properties:
        already_existed:
          type: boolean
        example_query:
          type: string
        full_name:
          type: string
        message:
          type: string
        namespace:
          type: string
        table_name:
          type: string
      type: object
    models.Error401:
      properties:
        error:
          example: Invalid API Key
          type: string
      type: object
    models.TableColumnInfo:
      properties:
        metadata:
          additionalProperties: {}
          description: Additional column metadata
          type: object
        name:
          description: Column name
          type: string
        nullable:
          description: Whether the column can contain null values
          type: boolean
        type:
          description: Column data type
          type: string
      type: object
    models.TableColumn:
      properties:
        name:
          type: string
        nullable:
          type: boolean
        type:
          description: ColumnType is a json.RawMessage so that we can support objects like Array and Struct.
          items:
            type: integer
          type: array
      type: object
    models.Error500:
      properties:
        error:
          example: Internal error
          type: string
      type: object
    models.TableClearResponse:
      properties:
        message:
          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)