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

# Download all results

> Every result as one NDJSON file named `{crawl_id}.jsonl`, one JSON object per line. Each line has the `url`; with `output_format`, also `content_status` and, once fetched, the page HTML in `content`. While the crawl runs, a later download may hold more lines. Documented at https://docs.zenrows.com/crawl/endpoints#download-the-results.



## OpenAPI

````yaml /api-reference/openapi.json get /crawls/{crawl_id}/download
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:
  /crawls/{crawl_id}/download:
    get:
      tags:
        - Crawl
      summary: Download all results
      description: >-
        Every result as one NDJSON file named `{crawl_id}.jsonl`, one JSON
        object per line. Each line has the `url`; with `output_format`, also
        `content_status` and, once fetched, the page HTML in `content`. While
        the crawl runs, a later download may hold more lines. Documented at
        https://docs.zenrows.com/crawl/endpoints#download-the-results.
      operationId: downloadCrawl
      parameters:
        - name: crawl_id
          in: path
          required: true
          description: The crawl's ID, as returned when it started.
          schema:
            type: string
          example: c_01M3XP7RZD4JT88F7PNPGBFRAF
      responses:
        '200':
          description: The results as NDJSON.
          headers:
            X-Crawl-Status:
              description: >-
                The crawl's status when the file was produced. After a stop it
                reads `stopped`, yet a later download may hold more lines for up
                to 10 minutes.
              schema:
                type: string
                enum:
                  - running
                  - completed
                  - stopped
                  - failed
          content:
            application/x-ndjson:
              schema:
                type: string
              example: >
                {"url":"https://www.scrapingcourse.com/ecommerce/product/abominable-hoodie/"}

                {"url":"https://www.scrapingcourse.com/ecommerce/product/adrienne-trek-jacket/"}
        '400':
          description: >-
            `unknown_parameter`: the request has a query parameter this endpoint
            does not accept; `detail` names it. Documented at
            https://docs.zenrows.com/crawl/endpoints#errors.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: unknown_parameter
                title: Unknown parameter
                detail: >-
                  The request has a parameter this endpoint does not accept:
                  limit.
                status: 400
                instance: urn:zenrows:request:9ac5b40be6127c8809b91babda784059
        '401':
          description: The API key is missing or invalid.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: AUTH002
                detail: Invalid API key.
                instance: /v1
                status: 401
                title: Invalid apikey provided (AUTH002)
                type: https://docs.zenrows.com/api-error-codes#AUTH002
        '402':
          description: >-
            The account is out of credits, or the plan does not include this
            capability.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: AUTH004
                detail: >-
                  This account has used all its credits for the period. Upgrade
                  or add credits to continue.
                instance: /v1
                status: 402
                title: Usage exceeded (AUTH004)
                type: https://docs.zenrows.com/api-error-codes#AUTH004
        '404':
          description: '`crawl_not_found`: no crawl with this ID exists on your account.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: crawl_not_found
                title: Crawl not found
                detail: No crawl with this identifier exists for this account.
                status: 404
                instance: urn:zenrows:request:9ac5b40be6127c8809b91babda784059
        '429':
          description: >-
            `too_many_crawls`: the account already runs its active jobs (3 by
            default, shared with Batch). Wait for one to end; the response
            carries `Retry-After: 30`.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: too_many_crawls
                title: Too many active crawls
                detail: >-
                  Your account already runs 3 active jobs. Wait for one to end,
                  then start the crawl again.
                status: 429
                instance: urn:zenrows:request:9ac5b40be6127c8809b91babda784059
        '500':
          description: '`internal_error`: something failed on our side. Retry later.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: internal_error
                title: Internal error
                detail: Something failed on our side. Retry later.
                status: 500
                instance: urn:zenrows:request:9ac5b40be6127c8809b91babda784059
      security:
        - apiKeyHeader: []
        - apiKeyQuery: []
components:
  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
  headers:
    XRequestId:
      description: Identifier for this request. Quote it when reporting a problem.
      schema:
        type: string
        example: 67fa4e35647515d8ad61bb3ee041e1bb
  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.