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

# Batch Scrape Sitemap

> Submits multiple sitemap URLs for scraping and returns a batch ID used to check the status later



## OpenAPI

````yaml post /batch/scrape_sitemap
openapi: 3.1.0
info:
  contact:
    email: support@blat.ai
    name: Blat Support
  description: >-
    A web scraping API that supports HTML and Markdown output with optional link
    extraction.
  title: Scrape API
  version: '1.0'
servers:
  - url: https://api.blat.ai
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /batch/scrape_sitemap:
    post:
      tags:
        - scraping
      summary: Batch Scrape Sitemap
      description: >-
        Submits multiple sitemap URLs for scraping and returns a batch ID used
        to check the status later
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api.BatchScrapeSitemapRequest'
        description: Batch sitemap scraping request parameters
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api.BatchScrapeResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/utils.APIError'
          description: Invalid request parameters
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/utils.APIError'
          description: Unauthorized - Make sure you have a valid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/utils.APIError'
          description: Internal server error
      security:
        - bearerauth: []
components:
  schemas:
    api.BatchScrapeSitemapRequest:
      properties:
        urls:
          description: List of sitemap URLs to scrape
          example:
            - https://example.com/
          items:
            type: string
          type: array
          uniqueItems: false
        webhook:
          $ref: '#/components/schemas/scraper.Webhook'
      required:
        - urls
    api.BatchScrapeResponse:
      example:
        batch_id: batch_id
      properties:
        batch_id:
          description: >-
            The ID of the batch scrape. Used to check the status of the batch
            later.
          type: string
    utils.APIError:
      example:
        code: code
        details:
          key: ''
        message: message
      properties:
        code:
          type: string
        details:
          additionalProperties: {}
        message:
          type: string
    scraper.Webhook:
      description: Optional webhook configuration
      properties:
        events:
          description: >-
            The events that will trigger the webhook. By default, the webhook
            will trigger for every page scraped (data).
          items:
            $ref: '#/components/schemas/scraper.WebhookEvent'
          type: array
          uniqueItems: false
        headers:
          additionalProperties:
            type: string
          description: The headers to send to the webhook.
        metadata:
          additionalProperties:
            type: string
          description: >-
            Custom metadata that will be sent in the webhook's request body for
            every event from this batch. Ideal for correlation.
        url:
          description: >-
            The URL where the webhook will be sent. It will trigger for every
            scraped url (data). The response will be the same as the
            corresponding GET status endpoint plus a metadata field.
          example: https://example.com/scrape_hook
          type: string
      required:
        - url
    scraper.WebhookEvent:
      enum:
        - data
      type: string
      x-enum-varnames:
        - WebhookEventData
  securitySchemes:
    bearerauth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````