Download article
article_downloadDownload a paper from Anna's Archive by DOI or MD5 hash, reusing an existing local file when its MD5 matches or saving a new copy.
Instructions
Download a selected paper by exactly one of doi or hash. The hash field accepts a bare MD5 or an Anna's Archive /md5/ page URL. Resolves a DOI to its hash, then returns an existing file in ANNAS_DOWNLOAD_PATH if its full MD5 matches, otherwise downloads under a unique name. Returns path and bytes; downloads_left is omitted on local reuse. Optional title and format control a new file's name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doi | No | DOI, doi: identifier or https://doi.org/ URL. Supply exactly one of doi or hash | |
| hash | No | 32-character MD5 hash or Anna's Archive /md5/ page URL. Supply exactly one of doi or hash | |
| title | No | Optional title override for the saved filename | |
| format | No | Optional filename extension such as pdf. Inferred when omitted; does not convert the file | |
| timeout_seconds | No | Total operation timeout in seconds, including retries. Defaults to 1800; maximum 86400 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| bytes | Yes | ||
| downloads_left | No |