Canonical: https://weaveos.com/reference/anthropic/download-message-batch-results

1. [Software capabilities](https://weaveos.com/reference)
2. /[Anthropic Claude API](https://weaveos.com/reference/anthropic)
3. /Download Anthropic Message Batch results

[![](https://weaveos.com/reference/logos/anthropic.svg)Anthropic Claude API](https://weaveos.com/reference/anthropic)

# Download Anthropic Message Batch results

After processing ends, stream the Message Batch results as JSONL. Match each line by custom\_id and check result.type for succeeded, errored, canceled, or expired before reading message content.

Documentation reviewed November 27, 2026 · 2 methods with sources

## Ways to do it

1. [1API: GET /v1/messages/batches/{message\_batch\_id}/results](https://weaveos.com/reference/anthropic/download-message-batch-results#method-1)
2. [2SDK: messages.batches.results()](https://weaveos.com/reference/anthropic/download-message-batch-results#method-2)

API

### GET /v1/messages/batches/{message\_batch\_id}/results

Stream one JSON object per request after the batch reaches ended.

[Read source: Anthropic retrieve Message Batch results](https://platform.claude.com/docs/en/api/messages/batches/results)

- Requirements

  An Anthropic API key, the Message Batch ID, and the anthropic-version header.

- Limitations

  Results are not guaranteed to follow request order. Each line can contain a message, an error, or a reason the request was not attempted.

Example shell

Copy

```
curl --fail "https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results" -H 'anthropic-version: 2026-10-21' -H "Authorization: Bearer $ANTHROPIC_API_KEY" > results.jsonl
```

SDK

### messages.batches.results()

Stream JSONL results through the official Python client and match each response by custom\_id.

[Read source: Anthropic Python batch results reference](https://platform.claude.com/docs/en/api/python/messages/batches/results)

- Requirements

  The anthropic Python package, ANTHROPIC\_API\_KEY, and the ID of a batch whose processing has ended.

- Limitations

  A batch returns one result per input request. Read message fields only on succeeded results.

Example text

Copy

```
import os
from anthropic import Anthropic

client = Anthropic()
for item in client.messages.batches.results(os.environ["MESSAGE_BATCH_ID"]):
    print(item.custom_id, item.result.type)
```

[Previous Anthropic Claude API taskCount Claude message input tokens](https://weaveos.com/reference/anthropic/count-message-input-tokens)

## More from Anthropic Claude API

[View all 2 Anthropic Claude API tasks](https://weaveos.com/reference/anthropic)

## The same task in other apps

- [![](https://weaveos.com/reference/logos/openai.svg)OpenAI API](https://weaveos.com/reference/openai)

  ### [Retrieve OpenAI batch results](https://weaveos.com/reference/openai/retrieve-batch-results)

  Poll a batch until it reaches a terminal state, then use its output\_file\_id or error\_file\_id to download JSONL results. Match each line by custom\_id instead of assuming request order.

  API, SDK
