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

# Get batch details

> Retrieve the details of a batch including all its tasks and completion status.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/batches/{batch_id}
openapi: 3.1.0
info:
  title: Nimble SDK
  version: 1.0.0
  description: The AI-Native SDK for Real-Time Web Data at scale
servers:
  - url: https://sdk.nimbleway.com
security: []
paths:
  /v2/batches/{batch_id}:
    get:
      tags:
        - Tasks
      summary: Get batch details
      description: >-
        Retrieve the details of a batch including all its tasks and completion
        status.
      parameters:
        - description: The unique identifier of the batch.
          in: path
          name: batch_id
          required: true
          schema:
            description: The unique identifier of the batch.
            examples:
              - 123e4567-e89b-12d3-a456-426614174000
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchGetResponse'
          description: Batch found and returned successfully.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskErrorResponse'
          description: Batch not found.
      security:
        - BearerAuth: []
components:
  schemas:
    BatchGetResponse:
      additionalProperties: false
      description: Response containing batch details with all tasks.
      properties:
        completed:
          description: Whether all tasks in the batch have finished.
          type: boolean
        completed_at:
          description: ISO timestamp when the batch completed.
          type: string
        completed_count:
          description: Number of tasks that have completed so far.
          type: number
        created_at:
          description: ISO timestamp when the batch was created.
          type: string
        id:
          description: Unique identifier for the batch.
          type: string
        progress:
          description: Completion ratio between 0 and 1.
          type: number
        status:
          const: success
          type: string
        tasks:
          description: List of tasks in the batch.
          items:
            anyOf:
              - additionalProperties: false
                properties:
                  _query: {}
                  account_name:
                    description: Account name that owns the task.
                    type: string
                  api_type:
                    enum:
                      - web
                      - serp
                      - ecommerce
                      - social
                      - media
                      - agent
                      - extract
                      - fast-serp
                      - labs
                    type: string
                  batch_id:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Batch ID if this task is part of a batch.
                    examples:
                      - 4b0a90bf-c951-42e4-95b3-a95a65ba69fc
                  created_at:
                    description: Timestamp when the task was created.
                    examples:
                      - '2024-01-15T10:30:00Z'
                    type: string
                  download_url:
                    anyOf:
                      - format: uri
                        type: string
                      - type: 'null'
                    description: URL for downloading the task results.
                    examples:
                      - >-
                        https://api.webit.live/api/v2/tasks/123e4567-e89b-12d3-a456-426614174000/results
                  error:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Error message if the task failed.
                    examples:
                      - Connection timeout
                  error_type:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Classification of the error type.
                    examples:
                      - timeout_error
                  id:
                    description: Unique task identifier.
                    examples:
                      - 123e4567-e89b-12d3-a456-426614174000
                    minLength: 1
                    type: string
                  input:
                    description: Original input data for the task.
                  modified_at:
                    description: Timestamp when the task was last modified.
                    examples:
                      - '2024-01-15T10:35:00Z'
                    type: string
                  output_url:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Storage location of the output data.
                  queue:
                    description: Queue name the task was submitted to.
                    type: string
                  state:
                    description: Current state of the task.
                    enum:
                      - pending
                      - queued
                      - in_progress
                      - success
                      - error
                    examples:
                      - pending
                    type: string
                  status_code:
                    description: HTTP status code from the task execution.
                    examples:
                      - 200
                    type: number
                  status_url:
                    description: URL for checking the task status.
                    examples:
                      - >-
                        https://api.webit.live/api/v2/tasks/123e4567-e89b-12d3-a456-426614174000
                    format: uri
                    type: string
                required:
                  - id
                  - state
                  - status_url
                  - created_at
                  - input
                  - _query
                type: object
              - type: 'null'
          type: array
      required:
        - status
        - id
        - completed
        - completed_count
        - progress
        - created_at
        - tasks
      type: object
    TaskErrorResponse:
      additionalProperties: false
      description: Error response for task operations.
      properties:
        error:
          description: Error message describing what went wrong.
          examples:
            - task not found
          type: string
        status:
          const: failed
          description: Status indicating the request failed.
          type: string
      required:
        - status
        - error
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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