# BatchWebhookPayload

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths: {}
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-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-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-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.scrapingduck.com
    description: Prod Env
security: []

```
