> ## 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.

# Get run by ID

> Get detailed information about a specific automation run by its ID.



## OpenAPI

````yaml https://agent.tinyfish.ai/v1/openapi/main get /v1/runs/{id}
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/{id}:
    get:
      tags:
        - Runs
      summary: Get run by ID
      description: Get detailed information about a specific automation run by its ID.
      operationId: getRunById
      parameters:
        - schema:
            type: string
            pattern: ^[A-Za-z0-9_-]+$
            description: Run ID
            example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          required: true
          description: Run ID
          name: id
          in: path
        - schema:
            type: string
            enum:
              - base64
              - url
              - none
            default: url
            description: >-
              Screenshot delivery mode. url: absolute URLs to screenshot images.
              base64: inline data URIs. none: omit screenshots. Defaults to url.
            example: url
          required: false
          description: >-
            Screenshot delivery mode. url: absolute URLs to screenshot images.
            base64: inline data URIs. none: omit screenshots. Defaults to url.
          name: screenshots
          in: query
        - schema:
            type: string
            enum:
              - url
              - none
            default: url
            description: >-
              HTML snapshot delivery mode. url: absolute URLs to HTML snapshot
              pages (only non-null when capture_config.html was enabled). none:
              omit HTML URLs. Defaults to url.
            example: url
          required: false
          description: >-
            HTML snapshot delivery mode. url: absolute URLs to HTML snapshot
            pages (only non-null when capture_config.html was enabled). none:
            omit HTML URLs. Defaults to url.
          name: html
          in: query
      responses:
        '200':
          description: Run details
          content:
            application/json:
              schema:
                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
                  video_url:
                    type: string
                    nullable: true
                    description: >-
                      Presigned URL to the video recording of this run. Null if
                      no recording is available. URL expires after 15 minutes.
                    example: >-
                      https://s3.amazonaws.com/bucket/eva-traces/run-id/video/recording.webm?...
                  steps:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for this step
                          example: evt_abc123
                        timestamp:
                          type: string
                          description: ISO 8601 timestamp when this step occurred
                          example: '2026-01-14T10:30:05Z'
                        status:
                          type: string
                          enum:
                            - PENDING
                            - RUNNING
                            - COMPLETED
                            - FAILED
                            - CANCELLED
                          description: Current status of the run
                          example: COMPLETED
                        action:
                          type: string
                          nullable: true
                          description: Description of the action taken in this step
                          example: Click the login button
                        screenshot:
                          type: string
                          nullable: true
                          description: >-
                            Screenshot for this step. Format depends on the
                            screenshots query param: base64 returns a data URI
                            (data:image/jpeg;base64,...), url returns an
                            absolute URL to the screenshot. Null if
                            screenshots=none or no screenshot available.
                          example: >-
                            https://agent.tinyfish.ai/runs/a1b2c3d4/steps/evt_abc123/screenshot
                        html:
                          type: string
                          nullable: true
                          description: >-
                            URL to the full-page HTML snapshot captured at this
                            step. Null if html=none or no HTML was captured.
                            Requires capture_config.html: true when starting the
                            run.
                          example: >-
                            https://agent.tinyfish.ai/runs/a1b2c3d4/steps/evt_abc123/html
                        duration:
                          type: string
                          nullable: true
                          description: Time taken for this step
                          example: 1.2s
                      required:
                        - id
                        - timestamp
                        - status
                        - action
                        - screenshot
                        - html
                        - duration
                      description: A single automation step
                    description: Steps the agent took during this 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
                  - video_url
                  - steps
                description: A single automation run
        '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
                required:
                  - error
                description: Standard error response format
        '404':
          description: Run not found
          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
                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
                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.

````