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

> ## Agent Instructions
> Authenticate REST, SDK, and CLI requests with the `x-api-key` header using the `HYPERBROWSER_API_KEY` environment variable (create keys at https://app.hyperbrowser.ai).
> Always stop browser sessions (`sessions.stop(id)` / `PUT /api/session/{id}/stop`) and sandboxes (`sandboxes.stop(id)` / `PUT /api/sandbox/{id}/stop`) in `try`/`finally` blocks to avoid idle billing.
> Choose the right surface: use Web API (`/api/web/fetch`, `batch-fetch`, `crawl`, `search`) for stateless reading and extraction (prefer it over legacy `/api/scrape`); Browser Sessions (`/api/session`) for interactive, authenticated, or Playwright/Puppeteer workflows; Cloud Agents (`/api/task/*`) for autonomous browser tasks; and Sandboxes (`/api/sandbox`) for isolated Linux or macOS code execution.
> Use `@hyperbrowser/sdk` for Node.js/TypeScript, `hyperbrowser` 1.0+ typed-dict request params for Python (avoid legacy Pydantic request classes), the unified `hx` CLI for terminal workflows, and hosted OAuth MCP at `https://mcp.hyperbrowser.ai/mcp/web` (web tools; use `https://mcp.hyperbrowser.ai/mcp` only when browser, sandbox, admin, and usage tools are needed).

# Start a fetch job

> Enqueue an asynchronous web fetch job and poll its status/result separately. Requires scope `web.fetch.run`. See [Web Fetch](/web/fetch) and [`hx web fetch --async`](/cli/web).



## OpenAPI

````yaml openapi.json POST /api/web/fetch/job
openapi: 3.0.1
info:
  title: Hyperbrowser API
  version: 1.0.0
servers:
  - url: https://api.hyperbrowser.ai
    description: Production server
security: []
tags:
  - name: Sessions
    description: Create, control, update, snapshot, and observe cloud browser sessions.
  - name: WebMCP
    description: Discover and invoke page-provided WebMCP tools inside a browser session.
  - name: Profiles
    description: >-
      Persist and reuse browser cookies, storage, and auth state across
      sessions.
  - name: Extensions
    description: Upload and manage Chrome extensions loaded into browser sessions.
  - name: Static IPs
    description: Manage dedicated static IP addresses for browser sessions.
  - name: Web API
    description: High-speed web fetch, batch fetch, crawl, and search endpoints.
  - name: Legacy Scraping
    description: Maintained legacy scrape, batch scrape, crawl, and extract endpoints.
  - name: Cloud Agents
    description: Managed autonomous browser agent tasks.
  - name: Sandboxes
    description: ''
  - name: Volumes
    description: Persistent shared volumes mounted across sandboxes.
  - name: Persistent Disks
    description: Persistent writable and snapshot disks for macOS sandboxes.
  - name: Images & Builds
    description: Build, reuse, list, and delete custom sandbox images.
  - name: Snapshots
    description: Manage Hyperbrowser memory snapshots for sub-second sandbox boots.
  - name: Secrets
    description: >-
      Create and version encrypted secrets for sandboxes and browser credential
      fill.
  - name: Vaults
    description: Group related secrets into reusable vaults.
  - name: Platform & Billing
    description: Inspect team credits and per-job credit/token usage.
  - name: X402
    description: Pay-per-request HTTP 402 endpoints for sessions, fetch, and search.
paths:
  /api/web/fetch/job:
    post:
      tags:
        - Web API
      summary: Start a fetch job
      description: >-
        Enqueue an asynchronous web fetch job and poll its status/result
        separately. Requires scope `web.fetch.run`. See [Web Fetch](/web/fetch)
        and [`hx web fetch --async`](/cli/web).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FetchParams'
      responses:
        '200':
          description: Fetch job started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartJobIdResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST "https://api.hyperbrowser.ai/api/web/fetch/job" \
              -H "x-api-key: $HYPERBROWSER_API_KEY" \
              -H "Content-Type: application/json" \
              -d '{"url": "https://example.com"}'
components:
  schemas:
    FetchParams:
      type: object
      properties:
        url:
          type: string
          example: https://example.com
        stealth:
          $ref: '#/components/schemas/FetchStealthMode'
        outputs:
          $ref: '#/components/schemas/FetchOutputOptions'
        browser:
          $ref: '#/components/schemas/FetchBrowserOptions'
        navigation:
          $ref: '#/components/schemas/FetchNavigationOptions'
        cache:
          $ref: '#/components/schemas/FetchCacheOptions'
        actions:
          $ref: '#/components/schemas/FetchActionsOptions'
      required:
        - url
    StartJobIdResponse:
      type: object
      required:
        - jobId
      properties:
        jobId:
          type: string
          format: uuid
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
    FetchStealthMode:
      type: string
      enum:
        - none
        - auto
        - ultra
      default: auto
      description: Stealth mode.
    FetchOutputOptions:
      type: object
      properties:
        formats:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/FetchOutputMarkdown'
              - $ref: '#/components/schemas/FetchOutputHtml'
              - $ref: '#/components/schemas/FetchOutputLinks'
              - $ref: '#/components/schemas/FetchOutputScreenshot'
              - $ref: '#/components/schemas/FetchOutputJson'
              - $ref: '#/components/schemas/FetchOutputBranding'
              - type: string
                enum:
                  - markdown
                  - html
                  - links
                  - screenshot
                  - branding
        sanitize:
          $ref: '#/components/schemas/FetchSanitizeMode'
        includeSelectors:
          type: array
          items:
            type: string
        excludeSelectors:
          type: array
          items:
            type: string
        storageState:
          $ref: '#/components/schemas/FetchStorageStateOptions'
    FetchBrowserOptions:
      type: object
      properties:
        screen:
          $ref: '#/components/schemas/ScreenConfig'
        profileId:
          type: string
          example: prof_01JXYZ1234567890ABCDEF
        solveCaptchas:
          type: string
        location:
          $ref: '#/components/schemas/FetchBrowserLocationOptions'
        disableSoftwareWebGL:
          type: boolean
          default: false
          description: Skip forced SwiftShader WebGL rendering.
        operatingSystem:
          $ref: '#/components/schemas/OperatingSystem'
          description: Operating system claimed in the browser fingerprint.
        solverType:
          type: string
          description: Optional CAPTCHA solver identifier when `solveCaptchas` is enabled.
        acceptCookies:
          type: boolean
          default: false
          description: Automatically dismiss/accept cookie consent banners.
        region:
          $ref: '#/components/schemas/SessionRegion'
          description: Region where the backing browser runs (defaults to `us`).
    FetchNavigationOptions:
      type: object
      properties:
        waitUntil:
          $ref: '#/components/schemas/FetchWaitUntil'
        timeoutMs:
          type: integer
        waitFor:
          type: integer
    FetchCacheOptions:
      type: object
      properties:
        maxAgeSeconds:
          type: integer
    FetchActionsOptions:
      type: object
      description: >-
        Pre-capture interactive browser actions to execute before extracting
        outputs. See [Web Fetch](/web/fetch).
      properties:
        steps:
          type: array
          items:
            $ref: '#/components/schemas/FetchActionStep'
          maxItems: 25
        timeoutMs:
          type: integer
          description: Total timeout envelope across all action steps in milliseconds.
          minimum: 1
          maximum: 600000
          default: 60000
        mode:
          type: string
          enum:
            - strict
            - bestEffort
          default: strict
          description: Abort on first failed action (`strict`) or continue (`bestEffort`).
    FetchOutputMarkdown:
      type: object
      properties:
        type:
          type: string
          enum:
            - markdown
      required:
        - type
    FetchOutputHtml:
      type: object
      properties:
        type:
          type: string
          enum:
            - html
      required:
        - type
    FetchOutputLinks:
      type: object
      properties:
        type:
          type: string
          enum:
            - links
      required:
        - type
    FetchOutputScreenshot:
      allOf:
        - $ref: '#/components/schemas/FetchOutputScreenshotOptions'
        - type: object
          properties:
            type:
              type: string
              enum:
                - screenshot
          required:
            - type
    FetchOutputJson:
      allOf:
        - $ref: '#/components/schemas/FetchOutputJsonOptions'
        - type: object
          properties:
            type:
              type: string
              enum:
                - json
          required:
            - type
    FetchOutputBranding:
      type: object
      properties:
        type:
          type: string
          enum:
            - branding
      required:
        - type
    FetchSanitizeMode:
      type: string
      enum:
        - none
        - basic
        - advanced
    FetchStorageStateOptions:
      type: object
      properties:
        localStorage:
          type: object
          additionalProperties:
            type: string
        sessionStorage:
          type: object
          additionalProperties:
            type: string
    ScreenConfig:
      type: object
      properties:
        width:
          type: number
          default: 1280
        height:
          type: number
          default: 720
    FetchBrowserLocationOptions:
      type: object
      properties:
        country:
          type: string
        state:
          type: string
        city:
          type: string
    OperatingSystem:
      type: string
      enum:
        - windows
        - android
        - macos
        - linux
        - ios
    SessionRegion:
      type: string
      description: >-
        Region to run the session in. The asia-south region is only available on
        Enterprise and Select plans. Get in touch at
        https://calendly.com/shri-hyperbrowser/demo.
      enum:
        - us
        - us-central
        - us-west
        - us-east
        - asia-south
        - europe-west
    FetchWaitUntil:
      type: string
      enum:
        - load
        - domcontentloaded
        - networkidle
    FetchActionStep:
      description: 'One action step. Each variant is strict: unknown fields are rejected.'
      oneOf:
        - type: object
          title: Click
          additionalProperties: false
          required:
            - type
            - selector
          properties:
            type:
              type: string
              enum:
                - click
            selector:
              type: string
              minLength: 1
              maxLength: 2000
              description: CSS selector.
            button:
              type: string
              enum:
                - left
                - middle
                - right
            doubleClick:
              type: boolean
            timeoutMs:
              type: integer
              minimum: 1
              maximum: 600000
              description: Per-step timeout in milliseconds (default 30000).
        - type: object
          title: Type
          additionalProperties: false
          required:
            - type
            - selector
            - text
          properties:
            type:
              type: string
              enum:
                - type
            selector:
              type: string
              minLength: 1
              maxLength: 2000
              description: CSS selector.
            text:
              type: string
              maxLength: 2048
            delayMs:
              type: integer
              minimum: 0
              maximum: 10000
              description: Delay between keystrokes in milliseconds.
            clear:
              type: boolean
              description: Clear the existing value before typing.
            timeoutMs:
              type: integer
              minimum: 1
              maximum: 600000
              description: Per-step timeout in milliseconds (default 30000).
        - type: object
          title: Scroll by
          additionalProperties: false
          required:
            - type
            - deltaY
          properties:
            type:
              type: string
              enum:
                - scroll
            deltaY:
              type: integer
              description: Vertical scroll delta in pixels.
            deltaX:
              type: integer
              description: Horizontal scroll delta in pixels.
            timeoutMs:
              type: integer
              minimum: 1
              maximum: 600000
              description: Per-step timeout in milliseconds (default 30000).
        - type: object
          title: Scroll to
          additionalProperties: false
          required:
            - type
            - to
          properties:
            type:
              type: string
              enum:
                - scroll
            to:
              type: string
              enum:
                - start
                - end
            timeoutMs:
              type: integer
              minimum: 1
              maximum: 600000
              description: Per-step timeout in milliseconds (default 30000).
        - type: object
          title: Wait for duration
          additionalProperties: false
          required:
            - type
            - until
            - durationMs
          properties:
            type:
              type: string
              enum:
                - wait
            until:
              type: string
              enum:
                - duration
            durationMs:
              type: integer
              minimum: 0
              maximum: 600000
        - type: object
          title: Wait for selector
          additionalProperties: false
          required:
            - type
            - until
            - selector
          properties:
            type:
              type: string
              enum:
                - wait
            until:
              type: string
              enum:
                - selector
            selector:
              type: string
              minLength: 1
              maxLength: 2000
              description: CSS selector.
            state:
              type: string
              enum:
                - attached
                - visible
                - hidden
            timeoutMs:
              type: integer
              minimum: 1
              maximum: 600000
              description: Per-step timeout in milliseconds (default 30000).
        - type: object
          title: Wait for load state
          additionalProperties: false
          required:
            - type
            - until
            - state
          properties:
            type:
              type: string
              enum:
                - wait
            until:
              type: string
              enum:
                - state
            state:
              type: string
              enum:
                - domcontentloaded
                - load
                - networkidle
            timeoutMs:
              type: integer
              minimum: 1
              maximum: 600000
              description: Per-step timeout in milliseconds (default 30000).
            idleTimeMs:
              type: integer
              minimum: 1
              maximum: 10000
        - type: object
          title: JavaScript
          additionalProperties: false
          required:
            - type
            - code
          properties:
            type:
              type: string
              enum:
                - js
            code:
              type: string
              minLength: 1
              maxLength: 2048
              description: JavaScript evaluated in the page.
            timeoutMs:
              type: integer
              minimum: 1
              maximum: 600000
              description: Per-step timeout in milliseconds (default 30000).
    FetchOutputScreenshotOptions:
      type: object
      properties:
        fullPage:
          type: boolean
        format:
          $ref: '#/components/schemas/FetchScreenshotFormat'
        cropToContent:
          type: boolean
        cropToContentMaxHeight:
          type: integer
        cropToContentMinHeight:
          type: integer
        highQuality:
          type: boolean
          description: Capture a higher-quality screenshot.
    FetchOutputJsonOptions:
      type: object
      properties:
        schema:
          type: object
        prompt:
          type: string
          description: >-
            Natural language prompt describing what data to extract. If only
            prompt is provided, a schema is auto-generated from it. If both
            prompt and schema are provided, the schema defines the output
            structure while the prompt provides additional guidance for the
            extraction.
    FetchScreenshotFormat:
      type: string
      enum:
        - jpeg
        - png
        - webp
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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