Download the source code and follow the set-up instructions to pull financial statements directly from the SEC website for any stock with one shortcut.
Ensure the following prerequisites are installed on your workstation:
Clone or download the repository directly from GitHub:
Open a terminal window inside the downloaded project directory and install the required packages:
pip install -r requirements.txt
This installs all necessary Python packages (requests, pandas, openpyxl, etc.) simultaneously.
The SEC EDGAR system requires every automated request to declare a custom User-Agent identifying the user (Name and Email). This is standard SEC practice:
Open my_headers.py and replace the placeholder with your own name and email address:
headers = {'User-Agent': 'Your Name [email protected]'}
Save the file. You will not need to edit it again after this step.
Launch the extraction script in your terminal:
python get_financials.py
You will be prompted for a stock ticker (e.g., AAPL, MSFT, NVDA) and whether you want annual (10-K) or quarterly (10-Q) statements. The output Excel file automatically saves to a Company_Financials folder on your Desktop.
If you have Raycast installed on macOS, scraper.command lets you trigger the extraction pipeline from anywhere without touching a terminal:
scraper.command.Visual execution flow from terminal launch to structured financial tables in Excel: