This folder isolates the minimal command-line tooling required to download SEC 10-K filings using the sec-api service.
- Create a virtual environment and install dependencies:
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt - Edit
config.pyand insert your SEC API key (the placeholderYOUR_SEC_API_KEY_HEREshould be replaced with the actual key).
Download filing URLs and extract sections (defaults to forms 10-K variants, sections 1--3, and year 2024). The script stores URLs in filing_urls.txt and writes CSVs per section/year.
python sec_api_calls_10.py --years 2023 2024 --sections 1A 7A --output-dir data/Use --skip-url-download to reuse an existing URL list, and --append to grow the list instead of overwriting it.
sec_api_calls_10.py: Main CLI implementing URL retrieval and section extraction.config.py.example: Template for storing the SEC API key (never commit the actual key).requirements.txt: Python dependencies.