---
title: "Batch Search Datasets"
method: POST
path: "/v2/datasets/batch-search"
tags: ["datasets"]
---

# Batch Search Datasets

`POST /v2/datasets/batch-search`

Search for articles across multiple news datasets in a single request.

Searches the same query across all specified datasets simultaneously using
SerpAPI with combined `site:` operators for efficient multi-source search.

**Supported Datasets:**
nytimes, washpost, sfstandard, sacbee, sfchronicle, newyorker, theatlantic, sjmercury, latimes

**Example:**
```json
POST /v2/datasets/batch-search
{
    "q": "artificial intelligence regulation",
    "datasets": ["nytimes", "washpost", "theatlantic"],
    "limit": 20
}
```

**Headers:**
- `Authorization`: Bearer {api_key}
- `X-Organization-ID`: Organization UUID

## Request body

- BatchSearchRequest — Request body for POST /v2/datasets/batch-search
  - `author` string, nullable — Filter results by author/byline name. Appended as quoted phrase to search query.
  - `datasets` string[], nullable — List of dataset names to search across. Defaults to all datasets if not provided.
  - `limit` integer — Max results per dataset
  - `q` string, required — Search query

## Response `200`

Successful Response

- BatchSearchResponse — Response for POST /v2/datasets/batch-search
  - `datasets_searched` string[]
  - `errors` object
  - `query` string, required
  - `results` DatasetSearchResult[]
    - `author` string, nullable — Article author/byline if available
    - `date` string, nullable — Publication date if available
    - `snippet` string, nullable — Text snippet from the search result
    - `source` string, nullable — Source display name
    - `title` string, required
    - `url` string, required
  - `results_by_dataset` object
  - `total_results` integer

## Other responses

- `400` — Invalid request
- `401` — Missing or invalid API key
- `403` — API key does not belong to organization
- `500` — Internal server error
- `503` — Search service not configured

---

[API](https://skmtc.dev/runcaptain/apis/api-reference.md) · [All operations](https://skmtc.dev/runcaptain/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runcaptain/api-reference/revisions/fe4649e3f4aa/schema)
