sec-filing-puller
SEC Filing Puller
Analysts lose a day prompting for 10-K numbers and still distrust the result. Models get these numbers wrong in predictable ways: they mix fiscal years, blend restated and originally reported figures, confuse quarterly with YTD or TTM, and slip on units. Do not recall financials from memory and do not scrape them from websites. Run the scripts. They read SEC's structured data and attach a filing citation to every number. Spend your own effort on judgment: whether the periods line up, whether the definitions match, and what the XBRL cannot tell you.
Setup (once)
SEC requires a declared User-Agent with contact info. Without one, requests get HTTP 403. Ask the user for their name/company and email if you don't have them, then run:
export SEC_USER_AGENT="Acme Research jane@acme.com" # the user's own contact, never a made-up one
pip install pandas # the only dependency; everything else is stdlib
The scripts stay under SEC's 10 requests/second limit and cache responses in ~/.cache/sec-filing-puller (override with SEC_CACHE_DIR, bypass with --refresh). Endpoint details are in references/edgar-api.md.