> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Datasets

> Search for datasets across the Dune catalog, with filtering by categories, blockchains, schemas, and more

<Info>
  Minimum required API key scope: `Read`
</Info>

# Use Cases

* **Free-Text Search**: Search across Dune's entire dataset catalog using natural language queries like `"dex trades"` or `"ethereum transactions"`.
* **Filter by Category**: Narrow results to specific categories such as `canonical`, `decoded`, `spell`, or `community` datasets.
* **Filter by Blockchain**: Find datasets for specific blockchains by passing blockchain names in the `blockchains` parameter.
* **AI Agents**: Enable AI agents to discover relevant tables and schemas before constructing SQL queries.
* **Build Search UIs**: Power custom dataset search interfaces and data discovery tools on top of Dune's catalog.


## OpenAPI

````yaml POST /v1/datasets/search
openapi: 3.0.1
info:
  contact: {}
  description: Dune API
  title: DuneAPI
  version: '1.0'
servers:
  - url: https://api.dune.com/api
security: []
paths:
  /v1/datasets/search:
    post:
      summary: Search datasets
      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
components:
  schemas:
    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.SearchDatasetsResponse:
      properties:
        pagination:
          $ref: '#/components/schemas/models.SearchDatasetsPagination'
        results:
          items:
            $ref: '#/components/schemas/models.SearchDatasetResult'
          type: array
        total:
          type: integer
      type: object
    models.Error400:
      properties:
        error:
          example: Bad Request
          type: string
      type: object
    models.Error401:
      properties:
        error:
          example: Invalid API Key
          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.Error500:
      properties:
        error:
          example: Internal error
          type: string
      type: object
    models.SearchDatasetsPagination:
      properties:
        has_more:
          type: boolean
        limit:
          type: integer
        next_offset:
          type: integer
        offset:
          type: integer
      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.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

````