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

> ## Agent Instructions
> The Zenrows API (Fetch, Extract, Crawl and Batch) is described in OpenAPI 3.1 at https://www.zenrows.com/openapi.json and listed in the RFC 9727 API catalog at https://www.zenrows.com/.well-known/api-catalog. Every endpoint also has its own page under /api-reference with its schema. Use the spec for exact parameter names and types. To call Zenrows from an agent, connect the MCP server at https://mcp.zenrows.com/mcp. To search these docs from an agent, connect the docs MCP server at https://docs.zenrows.com/mcp. Agent skills for Zenrows are published at https://github.com/ZenRows/cli and install with `npx skills add ZenRows/cli`.

# Stop the current run

> Move the running or pending run to `stopped`, which is terminal. Tasks in flight may finish; pending ones stay as they are. Idempotent on a stopped run; 409 when the run already completed or was deleted.



## OpenAPI

````yaml /api-reference/openapi.json post /jobs/{job_id}/stop
openapi: 3.1.0
info:
  title: Zenrows API
  version: 1.0.0
  summary: >-
    Reach any page, including the protected web, and return it as HTML,
    Markdown, plaintext, PDF or structured JSON.
  description: >-
    Zenrows is web data infrastructure for agents and applications. Three HTTP
    surfaces are described here:


    - **Fetch and Extract**: one synchronous request per page, at
    `https://api.zenrows.com/v1/`. Authentication is the `apikey` query
    parameter.

    - **Crawl**: collect the URLs behind one start page, at
    `https://api.zenrows.com/v1/crawls`. Authentication is the `X-API-Key`
    header or the `apikey` query parameter.

    - **Batch**: asynchronous jobs of up to 100,000 URLs, at
    `https://async.api.zenrows.com/v1`. Authentication is the `X-API-Key`
    header.


    **Browser** is not described here because it is not HTTP: you connect
    Puppeteer or Playwright to a WebSocket endpoint. See
    https://docs.zenrows.com/browser-sessions/introduction.


    **Cost.** A request costs 1 credit, 5 with JavaScript rendering, 10 with
    premium proxies, 25 with both, and 1 to 25 under `mode=auto`. Failed
    requests are never charged. The free tier is 5,000 credits a month, no card.


    **Versioning and deprecation.** The version is in the URL path (`/v1`, the
    only version so far). Inside a version Zenrows only adds: new endpoints,
    optional parameters, response fields and headers. Nothing is removed or
    changed. Retiring a version is announced at least twelve months ahead, and
    every response from a deprecated version carries the `Deprecation` (RFC
    9745) and `Sunset` (RFC 8594) headers. Policy:
    https://docs.zenrows.com/api-versioning.


    **Getting a key without a human.** `POST
    https://app.zenrows.com/api/agent/signup` returns a usable key; the spec is
    at https://www.zenrows.com/auth.md and a setup playbook at
    https://www.zenrows.com/SKILL.md.
  termsOfService: https://www.zenrows.com/legal/terms-of-use
  contact:
    name: Zenrows support
    email: support@zenrows.com
    url: https://www.zenrows.com/contact
  license:
    name: Proprietary
    url: https://www.zenrows.com/legal/terms-of-use
servers:
  - url: https://api.zenrows.com/v1
    description: Fetch and Extract (synchronous)
security:
  - apiKeyQuery: []
tags:
  - name: Fetch
    description: Retrieve one page, optionally rendered, proxied, converted or extracted.
  - name: Extract
    description: Which domains Extract serves, and getting a new one prepared.
  - name: Crawl
    description: Collect the URLs behind one start page, and each page's HTML when asked.
  - name: Batch
    description: Submit many URLs as one job and collect the results.
  - name: Account
    description: Plan, credits and concurrency for the calling key.
  - name: Onboarding
    description: Get a working key with no human in the loop.
externalDocs:
  description: Zenrows documentation
  url: https://docs.zenrows.com
paths:
  /jobs/{job_id}/stop:
    post:
      tags:
        - Batch
      summary: Stop the current run
      description: >-
        Move the running or pending run to `stopped`, which is terminal. Tasks
        in flight may finish; pending ones stay as they are. Idempotent on a
        stopped run; 409 when the run already completed or was deleted.
      operationId: stopBatchRun
      parameters:
        - name: job_id
          in: path
          required: true
          description: Identifier returned when the job was created.
          schema:
            type: string
      responses:
        '200':
          description: The run, stopped.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
              example:
                run_id: 01M4E06YS7VZPY4G25DV6FR3B8
                job_id: 01M4E06YS7BDRECVN5QRHJA6HR
                run_sequence: 1
                status: stopped
                trigger: manual
                last_batch_received: false
                stats:
                  total: 3
                  completed: 1
                  successful: 1
                  failed: 0
                  spend:
                    credits: 1
                    cost: 0.00009
                created_at: '2026-10-08T14:55:52Z'
                updated_at: '2026-10-08T14:56:06Z'
        '400':
          description: >-
            `invalid_argument`: validation failed. `invalid_tasks` lists each
            rejected task as `{index, reason}`. Documented at
            https://docs.zenrows.com/batch/developer-guide-restapi#error-handling-reference.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: invalid_argument
                detail: Validation failed.
                instance: /v1
                status: 400
                title: Validation failed (invalid_argument)
                type: https://docs.zenrows.com/api-error-codes#invalid_argument
        '401':
          description: '`unauthenticated`: the `X-API-Key` header is missing or invalid.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: unauthenticated
                detail: Invalid API key.
                instance: /v1
                status: 401
                title: Unauthenticated (unauthenticated)
                type: https://docs.zenrows.com/api-error-codes#unauthenticated
        '402':
          description: >-
            `payment_required` (no credits left) or `api_key_cap_reached` (the
            key hit a credit cap; `detail` names the cap and when it resets).
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: payment_required
                detail: No credits available.
                instance: /v1
                status: 402
                title: No credits available (payment_required)
                type: https://docs.zenrows.com/api-error-codes#payment_required
        '404':
          description: '`not_found`: the job, run or task does not exist or is not yours.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: not_found
                detail: Job not found.
                instance: /v1
                status: 404
                title: Job not found (not_found)
                type: https://docs.zenrows.com/api-error-codes#not_found
        '409':
          description: >-
            `run_not_terminal` or `conflict`: the run is in a state this action
            does not apply to.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: conflict
                detail: The run already completed.
                instance: /v1
                status: 409
                title: The run already completed (conflict)
                type: https://docs.zenrows.com/api-error-codes#conflict
        '429':
          description: >-
            `quota_exceeded`: the account already runs its active jobs (3 by
            default, shared with Crawl). Wait for one to end.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: quota_exceeded
                detail: Too many active jobs.
                instance: /v1
                status: 429
                title: Too many active jobs (quota_exceeded)
                type: https://docs.zenrows.com/api-error-codes#quota_exceeded
        '503':
          description: >-
            `internal`: a transient failure. Retry with backoff; for
            createBatchJob, list your jobs first, since the job may have been
            created.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: internal
                detail: Temporary failure, retry with backoff.
                instance: /v1
                status: 503
                title: Temporary failure, retry with backoff (internal)
                type: https://docs.zenrows.com/api-error-codes#internal
      security:
        - apiKeyHeader: []
      servers:
        - url: https://async.api.zenrows.com/v1
          description: Batch (asynchronous jobs)
components:
  headers:
    XRequestId:
      description: Identifier for this request. Quote it when reporting a problem.
      schema:
        type: string
        example: 67fa4e35647515d8ad61bb3ee041e1bb
  schemas:
    Run:
      type: object
      description: One run of a job.
      properties:
        run_id:
          type: string
        job_id:
          type: string
        run_sequence:
          type: integer
          description: 1 for the first run, then one more per rerun or scheduled fire.
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - stopped
            - deleted
          description: '`completed`, `failed`, `stopped` and `deleted` are terminal.'
        pause_state:
          type: string
          enum:
            - active
            - paused
          description: '`paused` after pauseBatchRun; `status` does not change.'
        trigger:
          type: string
          enum:
            - manual
            - scheduled
          description: What started the run.
        last_batch_received:
          type: boolean
          description: 'Open jobs: whether the final addBatchTasks call arrived.'
        stats:
          type: object
          description: Task counters. `completed` is `successful` plus `failed`.
          properties:
            total:
              type: integer
            completed:
              type: integer
            successful:
              type: integer
            failed:
              type: integer
            spend:
              type: object
              description: Absent until there is spend.
              properties:
                credits:
                  type: integer
                cost:
                  type: number
                  description: US dollars.
        failure_reason:
          type: string
          description: Only when the whole run failed. Open set; new values may appear.
          examples:
            - insufficient_credits
            - subscription_inactive
            - api_key_cap_reached
        failure_detail:
          type: string
          description: What happened, for example which cap and when it resets.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      description: >-
        Zenrows error envelope, sent as `application/problem+json` (RFC 9457
        problem details). `code` is the stable identifier to branch on; `type`
        links to its entry in the catalogue at
        https://docs.zenrows.com/api-error-codes. Read back from live responses.
      properties:
        code:
          type: string
          example: AUTH002
        status:
          type: integer
          example: 401
        title:
          type: string
          example: Invalid apikey provided (AUTH002)
        detail:
          type: string
          example: Invalid API key.
        type:
          type: string
          format: uri
          example: https://docs.zenrows.com/api-error-codes#AUTH002
        instance:
          type: string
          description: >-
            The request path or a request URN. Quote it when reporting a
            problem.
          example: /v1
  securitySchemes:
    apiKeyQuery:
      type: apiKey
      in: query
      name: apikey
      description: >-
        Fetch, Extract, Crawl and the account endpoint accept the key as the
        `apikey` query parameter. Keys are per account and self-serve: create
        one in the Zenrows dashboard (app.zenrows.com), or, for an agent with no
        human present, `POST https://app.zenrows.com/api/agent/signup`.
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Batch, Crawl, the Extract endpoints and the account endpoint read the
        same key from the `X-API-Key` header.

````

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