---
title: "Read a list of urls"
method: POST
path: "/tasks/v1/scrape/batch"
tags: ["Web Tasks"]
---

# Read a list of urls

`POST /tasks/v1/scrape/batch`

## Request

- Base URL: `https://api.oassis.dev`
- URL: `https://api.oassis.dev/tasks/v1/scrape/batch`
- Auth: one of:
  - HTTP bearer
  - none

A batch of scrapes: queues one scrape per url you give it. Same fields as /scrape but with `urls` (2–50) and no `url`. Returns a `jobId`. It discovers nothing — for that, use /crawl. Returns a jobId for asynchronous work. A successful start is acceptance, not completion; poll the job status. Account credits can be refunded for unused work; x402 has no automatic on-chain refund.

## Request body

- object
  - `formats` string[]: Outputs you want in the same response. `controls` is the map of what can be clicked; `elements` needs `selectors`; `json` needs `json.prompt` or `json.schema`.
  - `selectors` string[]: CSS selectors for the `elements` format.
  - `json` object: For the `json` format: a `prompt` describing what to pull out, a JSON `schema` to fill, or both.
    - `prompt` string
    - `schema` object
  - `controls` object: Options for the `controls` format: `visibleOnly`, and `limit` (1 to 1000) to cut the map.
    - `visibleOnly` boolean
    - `limit` integer
  - `links` object: Options for the `links` format: `visibleOnly`, `excludeExternal` to keep only internal links.
    - `visibleOnly` boolean
    - `excludeExternal` boolean
  - `wait` object: When to consider the page loaded: `until` (load, domcontentloaded, networkidle0, networkidle2), `selector` to wait for, `timeout` in ms.
    - `until` 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2'
    - `selector` string
    - `timeout` integer
  - `request` object: How to make the request: `headers`, `cookies`, `userAgent`, and `auth` for basic authentication.
    - `headers` object
    - `cookies` object[]
      - `name` string, required
      - `value` string, required
      - `domain` string
      - `path` string
      - `secure` boolean
      - `httpOnly` boolean
    - `userAgent` string
    - `auth` object
      - `username` string, required
      - `password` string, required
  - `block` object: What not to load, which makes a render faster and cheaper. `resourceTypes` takes image, font, stylesheet, media… and `urlPatterns` are regular expressions, not globs: `\.svg$`, not `*.svg`.
    - `resourceTypes` string[]
    - `urlPatterns` string[]
  - `maxAge` integer: Accept an answer up to this many milliseconds old. A cache hit costs $0.0002 instead of the format price. Leave it out to force a fresh render.
  - `binaryAs` 'base64': How a screenshot or a PDF comes back. `base64` is the only value today.
  - `viewport` object: The window to render in: `width`, `height`, `deviceScaleFactor`.
    - `width` integer, required
    - `height` integer, required
    - `deviceScaleFactor` number
  - `urls` string[], required: The pages of this batch. Two to fifty, no duplicates: a batch charges per url.

## Response `200`

The result.

## Other responses

- `400`: Invalid request; nothing is executed.
- `401`: Invalid or revoked API key.
- `402`: Insufficient account credits, or x402 payment required. The wallet challenge travels in PAYMENT-REQUIRED; a 402 is not a payment or an execution.
- `503`: Operation temporarily unavailable.

---

[API](https://skmtc.dev/oassis/apis/oassis-web-scraping-crawling-and-browser-control-for-ai-agen.md) · [All operations](https://skmtc.dev/oassis/apis/oassis-web-scraping-crawling-and-browser-control-for-ai-agen/llms.txt) · [OpenAPI document](https://skmtc.dev/oassis/apis/oassis-web-scraping-crawling-and-browser-control-for-ai-agen/revisions/dedc2b717b91?raw)
