download_file
Download a public FERC eLibrary filing to your local download directory using a file_id from list_files, with native, zip, or PDF format options.
Instructions
Download a public eLibrary file to FERC_DOWNLOAD_DIR.
Does not return file bytes. Privileged, protected, and CEII documents are refused. Call list_files first to pick a file_id.
format=native saves that one original file and is the default. format=zip asks eLibrary for every file on the accession as one archive; if the accession has a single attachment, the archive is unwrapped to that file and content_type / is_bundle / expected_size describe the saved document. format=pdf asks eLibrary to generate a combined PDF of the whole accession.
The result reports expected_size from FERC's metadata alongside the byte count actually written, plus size_matches_metadata and is_bundle, so a mismatch between the file you asked for and the artifact you got is visible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | native | |
| file_id | No | ||
| accession_number | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||