Skip to main content
POST
Create a batch
Each item in requests is a POST to /search or /agent/runs with a batch-unique customId. The same customId is returned in the results file so you can map output rows back to your input data. See the Batch API guide for the end-to-end workflow.

Get your Exa API key

Authorizations

x-api-key
string
header
required

Pass your Exa API key in the x-api-key header. You can also authenticate with Authorization: Bearer .

Headers

Exa-Beta
enum<string>
required

Required beta token for the Batch API.

Available options:
batches-2026-06-06

Body

application/json
requests
object[]
required

The requests to enqueue. Each customId must be unique within the batch.

Minimum array length: 1
metadata
object

Caller-provided metadata stored with the batch.

Example:

Response

OK

id
string
required

Batch ID. New batch IDs are returned with the batch_ prefix.

Example:

"batch_01j7x9v0m2n4p6q8r0s2t4v6w8"

object
string
required

The object type, always batch.

Allowed value: "batch"
status
enum<string>
required

Lifecycle status of the batch.

Available options:
in_progress,
completed,
cancelling,
cancelled,
expired
requestCounts
object
required
createdAt
string<date-time>
required

When the batch was created.

expiresAt
string<date-time>
required

When the batch expires, or null if it does not expire.

endedAt
string<date-time>
required

When the batch reached a terminal status, or null while it is still running.

resultsUrl
string | null
required

Short-lived presigned download URL for the batch results file (JSONL), or null until the batch completes. This is a direct object-store download link, not an API route; fetch it as-is and re-fetch the batch to mint a fresh URL once it expires.

metadata
object
required

Caller-provided key-value metadata for your own tracking.

Example: