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

# List search history

> List Search-history entries retained for up to 90 days.

<Warning>This session-authenticated operation is a planned preview and is not callable in production yet.</Warning>

<Card title="Open Darwin settings" icon="user" horizontal href="https://darwin.so/settings">Sign in to manage account data.</Card>


## OpenAPI

````yaml openapi-v2.json GET /account/searches
openapi: 3.1.0
info:
  title: Darwin API
  version: 2.0.0
  description: >-
    Search executable capabilities, manage durable work through explicit Action
    operations, and administer developer credentials for the signed-in account.
    Operations marked planned-preview are contract scaffolding and are not
    callable in production.
servers:
  - url: https://api.darwin.so/api/v2
security:
  - apiKey: []
  - bearer: []
paths:
  /account/searches:
    get:
      summary: List search history
      description: >-
        Planned preview; not callable in production. List Search-history entries
        retained for up to 90 days.
      operationId: list_search_history
      parameters:
        - name: cursor
          in: query
          schema:
            type: string
            minLength: 1
            maxLength: 200
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
      responses:
        '200':
          description: List Search-history entries retained for up to 90 days.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchHistoryPage'
        '401':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - AccountSession: []
components:
  schemas:
    SearchHistoryPage:
      title: Search history (planned preview)
      type: object
      additionalProperties: false
      required:
        - searches
        - retentionDays
        - nextCursor
      properties:
        searches:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
              - searchId
              - query
              - createdAt
              - expiresAt
            properties:
              searchId:
                type: string
                minLength: 1
                maxLength: 200
              query:
                type: string
                minLength: 1
                maxLength: 20000
              createdAt:
                type: string
                format: date-time
              expiresAt:
                type: string
                format: date-time
        retentionDays:
          type: integer
          const: 90
        nextCursor:
          type:
            - string
            - 'null'
    Error:
      type: object
      additionalProperties: true
      properties:
        error:
          type: string
        message:
          type: string
        fields:
          type: array
          items:
            type: object
            additionalProperties: true
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      x-fern-header:
        name: apiKey
        env: DARWIN_API_KEY
      description: >-
        Pass your Darwin API key in the x-api-key header. You can also
        authenticate with Authorization: Bearer <apiKey>.
    bearer:
      type: http
      scheme: bearer
      bearerFormat: Darwin API key or OAuth access token
      x-fern-bearer:
        name: token
        env: DARWIN_API_KEY
      description: >-
        Pass a Darwin API key or OAuth access token as Authorization: Bearer
        <token>. You can also pass a Darwin API key in x-api-key.
    AccountSession:
      type: apiKey
      in: cookie
      name: __Secure-better-auth.session_token
      description: >-
        The HTTP-only Darwin account session cookie set after sign-in. Local
        development uses better-auth.session_token without the __Secure- prefix.

````