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

# GET /batch/{endpoint}/{id}/errors

> The URLs of a batch that failed, with their error codes. Free.

## Overview

Lists the URLs that were run and failed, oldest first, each with an `error_code` — the same code a single call of that URL would have answered with — so you can tell the ones worth retrying (`TARGET_TIMEOUT`, `TARGET_SERVER_ERROR`) from the ones that never will work (`DNS_RESOLUTION_FAILED`, `TARGET_BLOCKED`). Free; failed URLs are never charged.

```bash theme={"theme":"css-variables"}
curl "https://api.prefetch.io/batch/enrich/crw_7c2e9a4b1d0f4e6a8b3c5d7e9f1a2b3c/errors" \
  -H "X-API-Key: $PREFETCH_API_KEY"
```


## OpenAPI

````yaml GET /batch/{endpoint}/{id}/errors
openapi: 3.1.0
info:
  title: Prefetch API
  description: >-
    Extract brand identity, company data, screenshots, IAB classifications, and
    clean page content from any URL.
  version: 1.0.0
  contact:
    email: support@prefetch.io
servers:
  - url: https://api.prefetch.io
    description: Production
security:
  - apiKey: []
tags:
  - name: Endpoints
    description: Data extraction endpoints. All require authentication and consume credits.
  - name: Health
    description: Health and readiness probes. No authentication required.
paths:
  /batch/{endpoint}/{id}/errors:
    get:
      tags:
        - Endpoints
      summary: Batch errors
      description: The URLs that failed, oldest first, each with its `error_code`. Free.
      operationId: getBatchErrors
      parameters:
        - schema:
            type: string
            enum:
              - brand
              - enrich
              - company
              - classify
              - screenshot
              - styleguide
            description: What every URL is run through. /batch/scrape has its own page.
            example: enrich
          required: true
          description: What every URL is run through. /batch/scrape has its own page.
          name: endpoint
          in: path
        - schema:
            type: string
            description: The id returned when the job was created.
            example: crw_9f2c1a7b4e0d4c3a
          required: true
          description: The id returned when the job was created.
          name: id
          in: path
        - schema:
            type: string
            description: Failed pages to skip, for paging.
            example: '0'
          required: false
          description: Failed pages to skip, for paging.
          name: skip
          in: query
        - schema:
            type: string
            description: 'Failed pages per response (1–100). Default: 100.'
            example: '100'
          required: false
          description: 'Failed pages per response (1–100). Default: 100.'
          name: limit
          in: query
      responses:
        '200':
          description: The URLs that failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/CrawlErrorsData'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - success
                  - data
                  - meta
              example:
                success: true
                data:
                  id: crw_7c2e9a4b1d0f4e6a8b3c5d7e9f1a2b3c
                  status: completed
                  failed: []
                  failed_total: 0
                  skipped: {}
                  next: null
                meta:
                  requestId: 6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b
                  durationMs: 1840
        '400':
          description: Invalid or missing parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Revoked key, expired key, blocked URL, or credit limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Batch not found or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate or concurrency limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily unavailable — retry shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CrawlErrorsData:
      type: object
      properties:
        id:
          type: string
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - cancelled
        failed:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
              depth:
                type: integer
              status_code:
                type: integer
                nullable: true
              error:
                type: string
                nullable: true
              error_code:
                type: string
                nullable: true
                description: >-
                  Why the page failed, as one of the API's [error
                  codes](/concepts/errors#error-codes).
                example: TARGET_SERVER_ERROR
            required:
              - url
              - depth
              - status_code
              - error
              - error_code
          description: Pages that were fetched and failed, oldest first.
        failed_total:
          type: integer
        skipped:
          $ref: '#/components/schemas/SkippedUrls'
        next:
          type: string
          nullable: true
      required:
        - id
        - status
        - failed
        - failed_total
        - skipped
        - next
    Meta:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          description: Unique identifier for this request.
          example: a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d
        durationMs:
          type: integer
          nullable: true
          description: Time taken to process the request in milliseconds.
          example: 1842
      required:
        - requestId
        - durationMs
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
          description: >-
            Always false. Absent, like `meta`, on authentication and rate-limit
            errors, which are answered before a request is processed.
        error:
          type: string
          description: >-
            Human-readable error message. The wording can change: branch on
            `error_code`.
          example: Credit limit exceeded
        error_code:
          type: string
          enum:
            - INVALID_REQUEST
            - PAYLOAD_TOO_LARGE
            - NOT_FOUND
            - CONFLICT
            - UNAUTHORIZED
            - FORBIDDEN
            - CREDITS_EXHAUSTED
            - RATE_LIMITED
            - CONCURRENCY_LIMITED
            - URL_BLOCKED
            - URL_NOT_PERMITTED
            - DNS_RESOLUTION_FAILED
            - TARGET_BLOCKED
            - TARGET_CONNECTION_FAILED
            - TARGET_TIMEOUT
            - TARGET_SSL_ERROR
            - TARGET_SERVER_ERROR
            - TARGET_CLIENT_ERROR
            - TARGET_NOT_A_PAGE
            - TARGET_UNLOADABLE
            - RESEARCH_INCONCLUSIVE
            - TIMEOUT
            - SERVICE_BUSY
            - SERVICE_UNAVAILABLE
            - INTERNAL_ERROR
          description: >-
            What went wrong, for machines. Stable: a code keeps its meaning once
            published. See [Error handling](/concepts/errors).
          example: CREDITS_EXHAUSTED
        retryable:
          type: boolean
          description: >-
            Whether the same request can succeed if sent again after a short
            wait (honour `Retry-After` when present). False for problems with
            the request or the target.
          example: false
        retryAfterSeconds:
          type: integer
          description: 'On `RATE_LIMITED`: seconds until a request will be accepted.'
        limit:
          type: integer
          description: >-
            On `CONCURRENCY_LIMITED`: how many requests this key may have in
            flight.
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - error
        - error_code
        - retryable
    SkippedUrls:
      type: object
      additionalProperties:
        type: object
        properties:
          count:
            type: number
          samples:
            type: array
            items:
              type: string
        required:
          - count
          - samples
      description: >-
        URLs the crawl found but did not fetch, by reason: `limit`, `depth`,
        `out-of-scope`, `excluded`, `not-included`, `robots`, `off-site`,
        `file`, `invalid`, `blocklist`, `duplicate` (a redirect onto a page
        already crawled).
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Prefetch API key. Obtain one from the dashboard.

````

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