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

# List batches

> Lists your batches, newest first, with their progress and the credits they've used. Items aren't included, so get them with [Get a batch](/api-reference/scraping/batch-scrape-status).

This endpoint has no rate limit.




## OpenAPI

````yaml GET /batch/scrape
openapi: 3.1.0
info:
  title: Spidra API
  version: 1.0.0
  description: >-
    Public API endpoints for web scraping via Spidra. Authenticate with
    `Authorization: Bearer YOUR_API_KEY`.
servers:
  - url: https://api.spidra.io/api
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /batch/scrape:
    get:
      tags:
        - Batch Scraping
      summary: List batches
      description: >
        Lists your batches, newest first, with their progress and the credits
        they've used. Items aren't included, so get them with [Get a
        batch](/api-reference/scraping/batch-scrape-status).


        This endpoint has no rate limit.
      parameters:
        - name: page
          in: query
          description: The page to return, starting at 1.
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          description: Batches per page, from 1 to 50. Higher values are capped at 50.
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 20
          example: 2
      responses:
        '200':
          description: One page of batches.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jobs:
                    type: array
                    items:
                      type: object
                      properties:
                        uuid:
                          type: string
                          format: uuid
                          description: >-
                            The batch's ID. Use it with `GET
                            /batch/scrape/{batchId}`.
                        status:
                          $ref: '#/components/schemas/BatchStatus'
                        totalUrls:
                          type: integer
                          description: How many URLs the batch has.
                        completedCount:
                          type: integer
                          description: How many URLs finished successfully.
                        failedCount:
                          type: integer
                          description: How many URLs failed.
                        outputFormat:
                          type: string
                          enum:
                            - markdown
                            - json
                          description: The batch's `output`.
                        scrapingChannel:
                          type: string
                          enum:
                            - api
                            - playground
                          description: >-
                            `api` when the batch was sent with an API key,
                            `playground` when it was started from the dashboard.
                        createdAt:
                          type: string
                          format: date-time
                          description: When the batch was created.
                        finishedAt:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          description: When the batch finished or was cancelled.
                        firstUrl:
                          type:
                            - string
                            - 'null'
                          description: The batch's first URL, to help you recognize it.
                        creditsUsed:
                          type: integer
                          description: Credits used across all its URLs so far.
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        description: This page's number.
                      limit:
                        type: integer
                        description: Batches per page.
                      total:
                        type: integer
                        description: How many batches you have in all.
                      totalPages:
                        type: integer
                        description: How many pages there are at this `limit`.
              example:
                jobs:
                  - uuid: 38ae74ab-3a7f-421f-9d02-50c6b48d8c49
                    status: running
                    totalUrls: 3
                    completedCount: 2
                    failedCount: 0
                    outputFormat: json
                    scrapingChannel: api
                    createdAt: '2026-10-25T03:09:37.000Z'
                    finishedAt: null
                    firstUrl: >-
                      https://books.toscrape.com/catalogue/a-light-in-the-attic_1000/index.html
                    creditsUsed: 4
                  - uuid: 7ebc7287-e3ea-4376-a2ea-4d4d4579902b
                    status: completed
                    totalUrls: 1
                    completedCount: 1
                    failedCount: 0
                    outputFormat: json
                    scrapingChannel: api
                    createdAt: '2026-10-24T19:27:00.000Z'
                    finishedAt: '2026-10-24T19:27:03.000Z'
                    firstUrl: https://www.producthunt.com/leaderboard/weekly/2026/42
                    creditsUsed: 1
                pagination:
                  page: 1
                  limit: 2
                  total: 258
                  totalPages: 129
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          description: The list couldn't be loaded. Try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                status: error
                message: Failed to retrieve batch jobs
                code: INTERNAL_ERROR
components:
  schemas:
    BatchStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - cancelled
      description: >
        - `pending`: queued, no URL has started yet.

        - `running`: at least one URL is being scraped.

        - `completed`: every URL has finished. Some may have failed, so check
        `failedCount` and each item's `status`.

        - `cancelled`: you cancelled the batch. Items that had finished keep
        their results.
    ErrorResponse:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: What went wrong, as a sentence you can show to a person.
        code:
          type: string
          description: >-
            A stable code for the error, when there is one, such as
            `JOB_NOT_FOUND` or `SERVICE_BUSY`. Branch on this rather than on
            `message`.
        errors:
          description: >-
            On validation errors (`422`), every problem with the request.
            Scrape, batch, crawl, map and search return a list of sentences.
            Templates, presets and monitors return `{ field, message }` objects.
          oneOf:
            - type: array
              items:
                type: string
            - type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
        retry_after:
          type: integer
          description: >-
            On `503 SERVICE_BUSY`, how many seconds to wait before sending the
            request again.
  responses:
    Unauthorized:
      description: The API key is missing, wrong, or turned off.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing:
              summary: No key sent
              value:
                status: error
                message: Missing authentication
            invalid:
              summary: Wrong or turned-off key
              value:
                status: error
                message: Invalid token or API key
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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