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

# Batch content

> Queue multiple web requests for later retrieval.



## OpenAPI

````yaml post /browser/batches
openapi: 3.1.0
info:
  title: Agent First
  description: The missing services for agent-first development.
  version: 1.0.0
servers:
  - url: https://api.agentfirst.dev
security:
  - bearerAuth: []
paths:
  /browser/batches:
    post:
      summary: Batch content
      description: Queue multiple web requests for later retrieval.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                urls:
                  description: The URLs of the pages to browse.
                  type: array
                  items:
                    type: string
                    format: uri
                  minItems: 1
                  maxItems: 1000
                  example:
                    - https://guitars.com/
                    - https://cartervintage.com/
                    - https://musiccityvintageguitars.com/
                    - '[Additional URLs here]'
                difficulty:
                  description: The difficulty pool to attempt to access the URLs from.
                  type: string
                  enum:
                    - low
                    - medium
                    - high
                  default: low
                  example: low
                speed:
                  description: >-
                    The speed to attempt to access the URLs at, where
                    `ridiculous` is 30 percent faster on average than `light`
                    speed.
                  type: string
                  enum:
                    - light
                    - ridiculous
                    - ludicrous (planned)
                  default: light
                  example: light
                device:
                  description: >-
                    The name as returned by the [devices resource](devices) of
                    the device to emulate browsing on (these names are case
                    insensitive); device emulation is unused by default.
                  type: string
                  example: null
                country:
                  description: >-
                    The [two-letter ISO
                    code](https://www.iso.org/obp/ui/#search/code) of the
                    country to browse from (these codes are case insensitive); a
                    random country is used by default.
                  type: string
                  example: null
                subdivision:
                  description: >-
                    The alphanumeric second part (proceeding the separator) of a
                    [first-level subdivision
                    code](https://www.iso.org/obp/ui/#search/code) in the
                    (prerequisite) country to browse from (these codes are case
                    insensitive); a random subdivision is used by default.
                  type: string
                  example: null
                city:
                  description: >-
                    The [commonly spelled name](https://www.geonames.org/) of
                    the city in the (prerequisite) country to browse from (these
                    names are temporarily case sensitive); a random city is used
                    by default.
                  type: string
                  example: null
                captcha:
                  description: >-
                    The intended resolution of any detected captcha, where
                    `rejected` results in a `403` response.
                  type: string
                  enum:
                    - solved
                    - ignored
                    - rejected
                  default: solved
                  example: rejected
                readiness:
                  description: >-
                    The standard ready event to await before snapshotting
                    browsed content.
                  type: string
                  enum:
                    - load
                    - domcontentloaded
                  default: load
                  example: load
                delay:
                  description: >-
                    The number of supplemental seconds to delay before
                    snapshotting browsed content; no delay is used by default.
                  type: number
                  minimum: 0.1
                  maximum: 10
                  example: null
                format:
                  description: The format to output to.
                  type: string
                  enum:
                    - rendered
                    - raw
                    - markdown
                  default: rendered
                  example: markdown
                expiration:
                  description: >-
                    The age in days of when to consider cached content expired,
                    where `0` disables caching.
                  type: integer
                  minimum: 0
                  maximum: 1
                  default: 1
                  example: 0
                callback (planned):
                  description: >-
                    The HTTP or HTTPS callback URL or Amazon SQS queue URL or
                    ARN to notify when the batch content has been retrieved; any
                    SQS queue must grant `sqs:SendMessage` permission to the
                    `arn:aws:iam::180363035301:role/api-instance` AWS principal.
                  type: string
                  example: https://webhook.site/02e249f8-1faf-4fab-bcf5-78ce683e85a8
              required:
                - urls
        required: true
      responses:
        '202':
          description: A job identifier and confirmation count.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    description: The identifier to retrieve the batch content with.
                    type: string
                    format: uuid
                    example: a0482596-c2ad-445a-a435-727002156a20
                  count:
                    description: >-
                      The number of requests in the batch as confirmed by the
                      API.
                    type: integer
                    minimum: 1
                    maximum: 1000
                    example: 37
                required:
                  - id
                  - count
        '401':
          $ref: '#/components/responses/authenticationError'
        '402':
          $ref: '#/components/responses/creditsError'
        '403':
          $ref: '#/components/responses/authorizationError'
        '422':
          $ref: '#/components/responses/paramsError'
        '500':
          $ref: '#/components/responses/unknownError'
components:
  responses:
    authenticationError:
      description: The authorization header was missing.
      content:
        text/plain:
          schema:
            type: string
            example: Authorization header must be provided
    creditsError:
      description: No more credits are available.
      content:
        text/plain:
          schema:
            type: string
            example: Credit balance is 0; top up at https://agentfirst.dev/#pricing
    authorizationError:
      description: The API token was invalid.
      content:
        text/plain:
          schema:
            type: string
            example: Valid API token must be provided
    paramsError:
      description: One or more parameters were invalid.
      content:
        text/plain:
          schema:
            type: string
            example: Character counts must be no more than 255
    unknownError:
      description: An unknown error occurred.
      content:
        text/plain:
          schema:
            type: string
            example: Unknown error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````