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

# List and search runs

> List automation runs with optional filtering by status, goal text, and date range. Returns paginated results with total count. Default sort order is newest first.



## OpenAPI

````yaml https://agent.tinyfish.ai/v1/openapi/main get /v1/runs
openapi: 3.0.0
info:
  title: TinyFish Web Agent Automation API
  version: 1.0.0
  description: >-
    REST API for running AI-powered browser automations. Execute tasks on any
    website using natural language instructions.
  contact:
    name: TinyFish Support
    email: support@tinyfish.ai
servers:
  - url: https://agent.tinyfish.ai
    description: Production
security: []
tags:
  - name: Automation
    description: Browser automation endpoints for executing tasks on websites
  - name: Runs
    description: Endpoints for retrieving automation run data
  - name: Browser
    description: Remote browser session endpoints
  - name: Fetch
    description: Fetch URLs and extract clean page content
  - name: Search
    description: Web search endpoints
  - name: Browser Context Profiles
    description: >-
      Saved browser context endpoints for managing reusable login state,
      cookies, storage, and profile setup sessions
  - name: Vault
    description: >-
      Vault credential management endpoints for connecting password managers and
      managing stored credentials
paths:
  /v1/runs:
    get:
      tags:
        - Runs
      summary: List and search runs
      description: >-
        List automation runs with optional filtering by status, goal text, and
        date range. Returns paginated results with total count. Default sort
        order is newest first.
      operationId: listRuns
      parameters:
        - schema:
            type: string
            enum:
              - PENDING
              - RUNNING
              - COMPLETED
              - FAILED
              - CANCELLED
            description: Filter by run status
            example: COMPLETED
          required: false
          description: Filter by run status
          name: status
          in: query
        - schema:
            type: string
            maxLength: 500
            description: Filter runs by goal text (case-insensitive partial match)
            example: linkedin
          required: false
          description: Filter runs by goal text (case-insensitive partial match)
          name: goal
          in: query
        - schema:
            type: string
            format: date-time
            description: Filter runs created after this ISO 8601 timestamp
            example: '2026-01-01T00:00:00Z'
          required: false
          description: Filter runs created after this ISO 8601 timestamp
          name: created_after
          in: query
        - schema:
            type: string
            format: date-time
            description: Filter runs created before this ISO 8601 timestamp
            example: '2026-02-01T00:00:00Z'
          required: false
          description: Filter runs created before this ISO 8601 timestamp
          name: created_before
          in: query
        - schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
            description: Sort order by created_at
            example: desc
          required: false
          description: Sort order by created_at
          name: sort_direction
          in: query
        - schema:
            type: string
            description: Cursor for pagination (from previous response)
            example: eyJpZCI6ImFiYyIsImNyZWF0ZWRBdCI6IjIwMjYtMDEtMDFUMTI6MDA6MDBaIn0=
          required: false
          description: Cursor for pagination (from previous response)
          name: cursor
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            description: Maximum number of results to return (1-100)
            example: 20
          required: false
          description: Maximum number of results to return (1-100)
          name: limit
          in: query
      responses:
        '200':
          description: Paginated list of runs
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        run_id:
                          type: string
                          description: Unique identifier for the run
                          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                        status:
                          type: string
                          enum:
                            - PENDING
                            - RUNNING
                            - COMPLETED
                            - FAILED
                            - CANCELLED
                          description: Current status of the run
                          example: COMPLETED
                        goal:
                          type: string
                          description: Natural language goal for this automation run
                          example: Find all pricing information
                        created_at:
                          type: string
                          description: ISO 8601 timestamp when run was created
                          example: '2026-01-14T10:30:00Z'
                        started_at:
                          type: string
                          nullable: true
                          description: ISO 8601 timestamp when run started executing
                          example: '2026-01-14T10:30:05Z'
                        finished_at:
                          type: string
                          nullable: true
                          description: ISO 8601 timestamp when run finished
                          example: '2026-01-14T10:31:30Z'
                        num_of_steps:
                          type: integer
                          nullable: true
                          minimum: 0
                          description: >-
                            Number of steps taken during the automation run.
                            Null while the run is still in progress.
                          example: 5
                        result:
                          type: object
                          nullable: true
                          additionalProperties:
                            nullable: true
                          description: Extracted data from the automation run
                        output_schema:
                          type: object
                          nullable: true
                          properties: {}
                          additionalProperties:
                            nullable: true
                          description: >-
                            Provider-supported structured-output schema subset
                            originally requested for this run. Null when no
                            output_schema was provided.
                          example:
                            type: object
                            properties:
                              title:
                                type: string
                              price:
                                type: number
                            required:
                              - title
                              - price
                        profile_attached:
                          type: boolean
                          description: >-
                            Whether this run attached a Browser Context Profile
                            internally.
                          example: true
                        profile_id:
                          type: string
                          nullable: true
                          description: >-
                            Browser Context Profile ID attached to this run, or
                            null when no profile attached.
                          example: prof_abc123
                        error:
                          type: object
                          nullable: true
                          properties:
                            code:
                              type: string
                              description: >-
                                Machine-readable error code for programmatic
                                handling
                              example: service_busy
                            message:
                              type: string
                              description: Error message describing why the run failed
                              example: Browser crashed during execution
                            category:
                              type: string
                              enum:
                                - SYSTEM_FAILURE
                                - AGENT_FAILURE
                                - BILLING_FAILURE
                                - UNKNOWN
                              description: >-
                                Error category. SYSTEM_FAILURE = TinyFish issue
                                (retry). AGENT_FAILURE = run issue (fix input).
                                BILLING_FAILURE = out of credits (add credits).
                                UNKNOWN = unclassified (treat as retryable).
                              example: SYSTEM_FAILURE
                            retry_after:
                              type: number
                              nullable: true
                              description: >-
                                Suggested retry delay in seconds (null if not
                                retryable)
                              example: 60
                            help_url:
                              type: string
                              description: URL to documentation for troubleshooting
                              example: https://docs.tinyfish.ai/prompting-guide
                            help_message:
                              type: string
                              description: Human-readable help message with guidance
                              example: >-
                                Need help? Check out our goal prompting guide
                                for tips and examples.
                            profile_hint:
                              type: object
                              properties:
                                message:
                                  type: string
                                  description: >-
                                    Human-readable profile setup nudge for auth
                                    walls and bot challenges.
                                setup_url:
                                  type: string
                                  description: >-
                                    Internal URL to set up the caller’s default
                                    Browser Context Profile.
                                  example: >-
                                    /profiles/prof_abc123/setup?domain=example.com&returnTo=%2Fruns%2Frun_123&ref=run_error_nudge
                                reason:
                                  type: string
                                  enum:
                                    - auth_wall
                                    - bot_challenge
                                  description: >-
                                    Why a Browser Context Profile may solve this
                                    failed run.
                                  example: auth_wall
                              required:
                                - message
                                - setup_url
                                - reason
                              description: >-
                                Optional nudge shown when a failed run is likely
                                solvable by setting up a Browser Context
                                Profile.
                          required:
                            - message
                            - category
                          description: >-
                            Error details. Null if the run succeeded or is still
                            running.
                        profile_hint:
                          type: object
                          properties:
                            message:
                              type: string
                              description: >-
                                Human-readable profile setup nudge for auth
                                walls and bot challenges.
                            setup_url:
                              type: string
                              description: >-
                                Internal URL to set up the caller’s default
                                Browser Context Profile.
                              example: >-
                                /profiles/prof_abc123/setup?domain=example.com&returnTo=%2Fruns%2Frun_123&ref=run_error_nudge
                            reason:
                              type: string
                              enum:
                                - auth_wall
                                - bot_challenge
                              description: >-
                                Why a Browser Context Profile may solve this
                                failed run.
                              example: auth_wall
                          required:
                            - message
                            - setup_url
                            - reason
                          description: >-
                            Optional nudge shown when a failed run is likely
                            solvable by setting up a Browser Context Profile.
                        streaming_url:
                          type: string
                          nullable: true
                          description: >-
                            URL to watch live browser session (available while
                            running)
                          example: https://stream.agent.tinyfish.ai/session/xyz
                        browser_config:
                          type: object
                          nullable: true
                          properties:
                            proxy_enabled:
                              type: boolean
                              nullable: true
                              description: Whether proxy was enabled
                              example: false
                            proxy_country_code:
                              type: string
                              nullable: true
                              description: Country code for proxy
                              example: US
                          required:
                            - proxy_enabled
                            - proxy_country_code
                          description: Browser configuration used for the run
                      required:
                        - run_id
                        - status
                        - goal
                        - created_at
                        - started_at
                        - finished_at
                        - num_of_steps
                        - result
                        - output_schema
                        - profile_attached
                        - profile_id
                        - error
                        - streaming_url
                        - browser_config
                      description: A run summary (without video_url and steps)
                    description: Array of runs
                  pagination:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of runs matching the current filters
                        example: 142
                      next_cursor:
                        type: string
                        nullable: true
                        description: >-
                          Cursor for fetching next page. Null if no more
                          results.
                        example: >-
                          eyJpZCI6ImFiYyIsImNyZWF0ZWRBdCI6IjIwMjYtMDEtMDFUMTI6MDA6MDBaIn0=
                      has_more:
                        type: boolean
                        description: Whether there are more results after this page
                        example: true
                    required:
                      - total
                      - next_cursor
                      - has_more
                    description: Pagination information
                required:
                  - data
                  - pagination
                description: Paginated list of runs
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - MISSING_API_KEY
                          - INVALID_API_KEY
                          - INVALID_INPUT
                          - RATE_LIMIT_EXCEEDED
                          - INTERNAL_ERROR
                          - RETRY_REQUIRED
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - SERVICE_BUSY
                          - TIMEOUT
                          - INSUFFICIENT_CREDITS
                          - CONTENT_POLICY_VIOLATION
                          - MAX_STEPS_EXCEEDED
                          - SITE_BLOCKED
                          - TASK_FAILED
                          - CANCELLED
                        description: Machine-readable error code
                        example: INVALID_INPUT
                      message:
                        type: string
                        description: Human-readable error message
                        example: Field "url" is required and must be a string
                      details:
                        nullable: true
                        description: Additional error details (validation errors, etc.)
                    required:
                      - code
                      - message
                  request_id:
                    type: string
                    description: >-
                      Request correlation ID, also returned as the X-Request-ID
                      response header. Include it when reporting issues.
                    example: 8f9dba20-e37b-4749-a919-2269e28b4a2c
                required:
                  - error
                description: Standard error response format
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - MISSING_API_KEY
                          - INVALID_API_KEY
                          - INVALID_INPUT
                          - RATE_LIMIT_EXCEEDED
                          - INTERNAL_ERROR
                          - RETRY_REQUIRED
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - SERVICE_BUSY
                          - TIMEOUT
                          - INSUFFICIENT_CREDITS
                          - CONTENT_POLICY_VIOLATION
                          - MAX_STEPS_EXCEEDED
                          - SITE_BLOCKED
                          - TASK_FAILED
                          - CANCELLED
                        description: Machine-readable error code
                        example: INVALID_INPUT
                      message:
                        type: string
                        description: Human-readable error message
                        example: Field "url" is required and must be a string
                      details:
                        nullable: true
                        description: Additional error details (validation errors, etc.)
                    required:
                      - code
                      - message
                  request_id:
                    type: string
                    description: >-
                      Request correlation ID, also returned as the X-Request-ID
                      response header. Include it when reporting issues.
                    example: 8f9dba20-e37b-4749-a919-2269e28b4a2c
                required:
                  - error
                description: Standard error response format
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - MISSING_API_KEY
                          - INVALID_API_KEY
                          - INVALID_INPUT
                          - RATE_LIMIT_EXCEEDED
                          - INTERNAL_ERROR
                          - RETRY_REQUIRED
                          - UNAUTHORIZED
                          - FORBIDDEN
                          - NOT_FOUND
                          - SERVICE_BUSY
                          - TIMEOUT
                          - INSUFFICIENT_CREDITS
                          - CONTENT_POLICY_VIOLATION
                          - MAX_STEPS_EXCEEDED
                          - SITE_BLOCKED
                          - TASK_FAILED
                          - CANCELLED
                        description: Machine-readable error code
                        example: INVALID_INPUT
                      message:
                        type: string
                        description: Human-readable error message
                        example: Field "url" is required and must be a string
                      details:
                        nullable: true
                        description: Additional error details (validation errors, etc.)
                    required:
                      - code
                      - message
                  request_id:
                    type: string
                    description: >-
                      Request correlation ID, also returned as the X-Request-ID
                      response header. Include it when reporting issues.
                    example: 8f9dba20-e37b-4749-a919-2269e28b4a2c
                required:
                  - error
                description: Standard error response format
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication. Get your key from the API Keys page.

````