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

# Get a capture job

> Requires jobs:read and the submitting API key. Inspect data.state and data.result.ok; an outer ok=true means the lookup succeeded. An unknown state can be temporary during recovery.



## OpenAPI

````yaml /openapi.json get /v1/jobs/{id}
openapi: 3.1.0
info:
  title: ScreenshotAPI
  version: 1.0.0
  description: >-
    Hosted ScreenshotAPI capture endpoints, authentication, request options, and
    response envelopes.
servers:
  - url: https://api.screenshotapi.tech
    description: ScreenshotAPI production REST API
security:
  - bearerAuth: []
tags:
  - name: Captures
  - name: Jobs
  - name: Webhook delivery
  - name: Service
paths:
  /v1/jobs/{id}:
    get:
      tags:
        - Jobs
      summary: Get a capture job
      description: >-
        Requires jobs:read and the submitting API key. Inspect data.state and
        data.result.ok; an outer ok=true means the lookup succeeded. An unknown
        state can be temporary during recovery.
      operationId: getJob
      parameters:
        - name: id
          in: path
          description: Job ID returned by submission. Use the original submitting API key.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful lookup, not necessarily successful capture.
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  request_id:
                    type: string
                  data:
                    $ref: '#/components/schemas/JobSnapshot'
                required:
                  - ok
                  - request_id
                  - data
        '400':
          description: >-
            Structured failure. Inspect error.code, error.retriable, and
            error.details before retrying.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: >-
            Structured failure. Inspect error.code, error.retriable, and
            error.details before retrying.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Structured failure. Inspect error.code, error.retriable, and
            error.details before retrying.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Structured failure. Inspect error.code, error.retriable, and
            error.details before retrying.
          headers:
            Retry-After:
              description: Delay in seconds when provided.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            Structured failure. Inspect error.code, error.retriable, and
            error.details before retrying.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    JobSnapshot:
      type: object
      properties:
        id:
          type: string
        state:
          type: string
          enum:
            - waiting
            - prioritized
            - active
            - completed
            - failed
            - delayed
            - paused
            - unknown
        mode:
          type: string
          enum:
            - sync
            - async
        request_id:
          type: string
        progress:
          anyOf:
            - type: number
            - type: string
            - type: 'null'
        attempts_made:
          type: integer
        attempt_budget:
          type: integer
        enqueued_at:
          type: integer
        result:
          $ref: '#/components/schemas/JobResult'
        webhook:
          anyOf:
            - type: object
              properties:
                url:
                  type: string
                event:
                  type: string
              required:
                - url
            - type: 'null'
      required:
        - id
        - state
        - mode
        - request_id
        - progress
        - attempts_made
        - attempt_budget
        - enqueued_at
        - webhook
    ErrorResponse:
      type: object
      properties:
        ok:
          type: boolean
          const: false
        request_id:
          type: string
        error:
          $ref: '#/components/schemas/CaptureError'
      required:
        - ok
        - request_id
        - error
    JobResult:
      type: object
      properties:
        request_id:
          type: string
        mode:
          type: string
          enum:
            - sync
            - async
        ok:
          type: boolean
        data:
          $ref: '#/components/schemas/CaptureData'
        error:
          $ref: '#/components/schemas/CaptureError'
        duration_ms:
          type: number
        attempts_made:
          type: integer
        enqueued_at:
          type: integer
          description: Unix milliseconds.
        completed_at:
          type: integer
          description: Unix milliseconds.
        worker_id:
          type: string
      required:
        - request_id
        - mode
        - ok
        - duration_ms
        - attempts_made
        - enqueued_at
        - completed_at
    CaptureError:
      type: object
      properties:
        code:
          type: string
          enum:
            - invalid_request
            - idempotency_conflict
            - unauthorized
            - forbidden
            - quota_exceeded
            - rate_limited
            - render_timeout
            - render_incomplete
            - navigation_failed
            - blocked_by_target
            - target_error
            - render_crashed
            - internal_error
            - unsupported_option
            - egress_unavailable
            - egress_mismatch
        message:
          type: string
        retriable:
          type: boolean
        request_id:
          type: string
        docs_url:
          type: string
        details:
          type: object
          additionalProperties: {}
      required:
        - code
        - message
        - retriable
        - request_id
    CaptureData:
      type: object
      properties:
        url:
          type: string
        final_url:
          type: string
        format:
          type: string
        width:
          type: number
        height:
          type: number
        bytes:
          type: number
        duration_ms:
          type: number
        cached:
          type: boolean
          default: false
        data_url:
          type: string
        cdn_url:
          type: string
        blocked_requests:
          type: number
          default: 0
        region:
          type: string
        egress_country:
          type: string
        render_diagnostics:
          type: object
          properties:
            version:
              type: integer
            algorithm:
              type: string
              enum:
                - by_sections
                - native
                - element
            sections:
              type: integer
              minimum: 0
            device_scale_factor:
              type: number
              exclusiveMinimum: 0
            scroll_height:
              type: number
              minimum: 0
            stopped_reason:
              type: string
            truncated:
              type: boolean
          required:
            - version
            - algorithm
            - sections
            - device_scale_factor
            - scroll_height
            - stopped_reason
            - truncated
        inspection:
          type: object
          properties:
            markdown:
              type: string
              maxLength: 12000
            accessible_tree:
              type: string
              maxLength: 12000
            untrusted_content:
              type: boolean
              enum:
                - true
            character_limit:
              type: number
              enum:
                - 12000
          required:
            - markdown
            - accessible_tree
            - untrusted_content
            - character_limit
      required:
        - url
        - final_url
        - format
        - width
        - height
        - bytes
        - duration_ms
        - cached
        - blocked_requests
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Active sf_live_ API key with endpoint-specific scopes. Keep this
        credential server-side.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.