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

# Upload a CSV of URLs

> Reserve an upload for a CSV too large to send inline (up to 50 MB and 100,000 rows; the slot lives 24 hours). Then PUT the raw file to `upload.url` with `upload.headers`, and pass `file_input_id` to createBatchJob.



## OpenAPI

````yaml /api-reference/openapi.json post /job_inputs
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:
  /job_inputs:
    post:
      tags:
        - Batch
      summary: Upload a CSV of URLs
      description: >-
        Reserve an upload for a CSV too large to send inline (up to 50 MB and
        100,000 rows; the slot lives 24 hours). Then PUT the raw file to
        `upload.url` with `upload.headers`, and pass `file_input_id` to
        createBatchJob.
      operationId: uploadBatchInput
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - csv
              properties:
                type:
                  type: string
                  enum:
                    - csv
                csv:
                  type: object
                  required:
                    - fields
                  properties:
                    header:
                      type: boolean
                      description: >-
                        `true` maps `fields` by header name; otherwise by
                        0-based column index.
                    fields:
                      type: object
                      required:
                        - url
                      properties:
                        url:
                          type:
                            - string
                            - integer
                          description: Header name or column index of the URL.
                        external_id:
                          type:
                            - string
                            - integer
            example:
              type: csv
              csv:
                header: true
                fields:
                  url: URL
                  external_id: Customer Ref
      responses:
        '201':
          description: The upload slot.
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_input_id:
                    type: string
                  expires_at:
                    type: string
                    format: date-time
                  upload:
                    type: object
                    properties:
                      url:
                        type: string
                        format: uri
                        description: Presigned URL to PUT the file to.
                      method:
                        type: string
                        enum:
                          - PUT
                      headers:
                        type: object
                        additionalProperties:
                          type: string
                        description: Send exactly these headers with the upload.
                      expires_at:
                        type: string
                        format: date-time
              example:
                file_input_id: fi_01M4F4B8D3E2C1A9
                expires_at: '2026-10-09T15:10:00Z'
                upload:
                  url: >-
                    https://inputs.example-bucket.s3.amazonaws.com/fi_01M4F4B8D3E2C1A9.csv?X-Amz-Expires=3600
                  method: PUT
                  headers:
                    Content-Type: text/csv
                  expires_at: '2026-10-08T16:10:00Z'
        '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
        '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:
    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.