# Polls the status of a previously submitted batch scrape job.
Results are retrieved from the webapp's persistent storage.

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/scrape/batch/{batchId}:
    get:
      summary: |-
        Polls the status of a previously submitted batch scrape job.
        Results are retrieved from the webapp's persistent storage.
      deprecated: false
      description: ''
      tags:
        - Scrape
        - Scrape
      parameters:
        - name: batchId
          in: path
          description: The batch identifier returned by the submission endpoint.
          required: true
          example: ''
          schema:
            type: string
        - name: includeResults
          in: query
          description: >-
            Whether to include per-URL results. Default true. Use false for a
            lightweight status check.
          required: false
          example: ''
          schema:
            type: boolean
            default: true
        - name: page
          in: query
          description: 1-based page index for paged results. Default 1.
          required: false
          example: 0
          schema:
            type: integer
            format: int32
            default: 1
        - name: pageSize
          in: query
          description: Page size for paged results (1-50). Default 50.
          required: false
          example: 0
          schema:
            type: integer
            format: int32
            default: 50
        - name: onlyFailed
          in: query
          description: Only return failed items. Default false.
          required: false
          example: ''
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchWebhookPayload'
              example:
                batchId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                status: completed
                totalUrls: 3
                succeededCount: 3
                failedCount: 0
                results:
                  - url: https://example.com/page1
                    success: true
                    statusCode: 200
                    html: <!doctype html>...
                    title: Page 1
                    contentLength: 45678
                    durationMs: 1200
                meta:
                  totalDurationMs: 4500
                  totalCostCredits: 9
                  startedAtUtc: '2025-01-01T12:00:00Z'
                  finishedAtUtc: '2025-01-01T12:00:04Z'
          headers: {}
          x-apidog-name: ''
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
              example:
                type: https://httpstatuses.com/404
                title: Not Found
                status: 404
                detail: Batch a1b2c3d4 not found or results expired.
                code: not_found
          headers: {}
          x-apidog-name: ''
      security:
        - ApiKey: []
          x-apidog:
            schemeGroups:
              - id: Mc0cG4A4XLcGS0YA4VR99
                schemeIds:
                  - ApiKey
            required: true
            use:
              id: Mc0cG4A4XLcGS0YA4VR99
            scopes:
              Mc0cG4A4XLcGS0YA4VR99:
                ApiKey: []
      x-apidog-folder: Scrape
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1110200/apis/api-44734727-run
components:
  schemas:
    BatchWebhookPayload:
      type: object
      properties:
        batchId:
          type: string
          description: The unique batch identifier.
          nullable: true
        status:
          type: string
          description: 'The overall batch status: completed, partial, or failed.'
          nullable: true
        totalUrls:
          type: integer
          description: Total number of URLs in the batch.
          format: int32
        succeededCount:
          type: integer
          description: Number of URLs that succeeded.
          format: int32
        failedCount:
          type: integer
          description: Number of URLs that failed.
          format: int32
        results:
          type: array
          items:
            $ref: '#/components/schemas/BatchItemResult'
          description: Per-URL results in execution order.
          nullable: true
        meta:
          $ref: '#/components/schemas/BatchWebhookMeta'
      additionalProperties: false
      description: Payload sent to the webhook URL on batch completion.
      x-apidog-orders:
        - batchId
        - status
        - totalUrls
        - succeededCount
        - failedCount
        - results
        - meta
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    BatchWebhookMeta:
      type: object
      properties:
        totalDurationMs:
          type: integer
          description: Total batch execution duration in milliseconds.
          format: int64
        totalCostCredits:
          type: integer
          description: The total credit cost consumed by this batch.
          format: int32
        startedAtUtc:
          type: string
          description: UTC timestamp when batch execution started.
          format: date-time
          nullable: true
        finishedAtUtc:
          type: string
          description: UTC timestamp when batch execution finished.
          format: date-time
          nullable: true
      additionalProperties: false
      description: Batch-level execution metadata.
      x-apidog-orders:
        - totalDurationMs
        - totalCostCredits
        - startedAtUtc
        - finishedAtUtc
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    BatchItemResult:
      type: object
      properties:
        url:
          type: string
          description: The URL that was scraped.
          nullable: true
        success:
          type: boolean
          description: Whether the URL was scraped successfully.
        statusCode:
          type: integer
          description: >-
            The HTTP status code returned by the target site, or null if no
            response.
          format: int32
          nullable: true
        error:
          type: string
          description: Error message if the URL failed.
          nullable: true
        html:
          type: string
          description: The scraped HTML content. Null if the URL failed.
          nullable: true
        title:
          type: string
          description: The page title.
          nullable: true
        contentLength:
          type: integer
          description: Length of the HTML content in characters.
          format: int32
          nullable: true
        durationMs:
          type: integer
          description: Duration of this URL's scraping in milliseconds.
          format: int64
      additionalProperties: false
      description: Result for a single URL within a batch.
      x-apidog-orders:
        - url
        - success
        - statusCode
        - error
        - html
        - title
        - contentLength
        - durationMs
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties:
        type: string
      x-apidog-orders:
        - type
        - title
        - status
        - detail
        - instance
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes:
    ApiKey:
      type: apikey
      description: >-
        API Key authentication for programmatic access. Enter your API key in
        the text input below.
      name: apiKey
      in: query
servers:
  - url: https://api.scrapingduck.com
    description: Prod Env
security:
  - ApiKey: []
    x-apidog:
      schemeGroups:
        - id: Mc0cG4A4XLcGS0YA4VR99
          schemeIds:
            - ApiKey
      required: true
      use:
        id: Mc0cG4A4XLcGS0YA4VR99
      scopes:
        Mc0cG4A4XLcGS0YA4VR99:
          ApiKey: []

```
