download_page_image
Save a specific National Archives catalogue page scan to disk so it can be read. Pick the page with extracted text or transcriptions, then fetch it by NAID plus page or object_id.
Instructions
Download one page of a record so it can actually be read.
This is the step that turns a catalogue hit into evidence. The image is written to disk rather than returned inline — a page scan runs to several megabytes.
NARA's media URLs are open and need no key, so this costs nothing against your API allowance. One catalogue call resolves the page list; the download itself is not an API call.
A pension file can run to sixty pages and the page you need is rarely the first. Use get_extracted_text or get_transcriptions to find which page carries the fact, then fetch it by the object_id they name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| naid | Yes | The record's NAID, e.g. '54765873'. | |
| page | No | Which page to download, 1-based, in the order get_record_images lists them. Defaults to 1 when object_id is not given. | |
| object_id | No | The digital object to download, as get_extracted_text, get_transcriptions and get_record_images name it. An alternative to page: pass one or the other. | |
| destination | Yes | Absolute path of a new file to write, e.g. '/tmp/hall-w17050-p51.jpg'. The directory must already exist, and the file must not: nothing is ever overwritten. |