Download an ECFS document
ecfs_download_documentDownload one document (usually a PDF) from an ECFS filing and save it to disk, returning the saved file path. Identify it by the filing's submission ID and the document's position in the filing — the {n} in its…
Instructions
Download one document (usually a PDF) from an ECFS filing and save it to disk, returning the saved file path. Identify it by the filing's submission ID and the document's position in the filing — the {n} in its https://www.fcc.gov/ecfs/document/{id_submission}/{n} location/src URL. Fetches the file through a headless Chrome browser (Google Chrome must be installed), so it takes a few seconds per document. Files are always saved as .pdf inside the user's configured download folder (ECFS_DOWNLOAD_DIR, default ~/Downloads/ecfs).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_dir | No | Optional subfolder of the user's download folder (ECFS_DOWNLOAD_DIR, default ~/Downloads/ecfs) to save into, e.g. "wt-09-209". It's created if missing. Absolute or ~ paths are accepted only if they are inside the download folder; anything outside it is rejected. Omit unless the user asks for a subfolder. The saved file always ends in .pdf. | |
| id_submission | Yes | The ECFS submission ID of the filing the document belongs to. | |
| document_number | No | 1-based position of the document within the filing — the {n} in its https://www.fcc.gov/ecfs/document/{id_submission}/{n} location URL. Defaults to 1. |