batch_content
Read a batch task's stored result by job_id and task_id; text results return inline up to max_chars, while binary results provide a presigned result_url.
Instructions
Read one Batch task's stored result, by job_id and task_id (from batch_results). A text result (HTML, Markdown, plain text, JSON) comes back inline, cut to max_chars (default 20000); a final note says when it was cut. A binary result (a PDF) is not inlined: the reply gives its result_url, presigned for 2 hours. Finding that URL reads the run's results; on a large run one call may run out of time first and answer with lookup_cursor: call batch_content again with it to go on.
BATCH_TASK_NOT_READY: the task has not finished; BATCH_TASK_FAILED: it failed (task_error holds its error); BATCH_RESULT_EXPIRED: past the job's retention (14 days by default); rerun to scrape it again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | Batch job id returned by batch_create or batch_list | |
| run_id | No | An earlier run's id (from batch_status or batch_rerun). Default: the job's latest run. | |
| task_id | Yes | task_id from a batch_results row | |
| max_chars | No | Max characters of a text result to return (default 20000) | |
| lookup_cursor | No | lookup_cursor from a previous batch_content reply on a binary result, to go on looking for its result_url |