Python wrapper for the SEC EDGAR REST API providing access to company filings, submissions, and financial data from the U.S. Securities and Exchange Commission. Supports querying company facts, submissions, and XBRL companion data without requiring API keys.
pip install sec-edgar-apiVerified import paths — ran on the pinned version, not inferred.
Fetch SEC EDGAR submissions and company facts for Apple Inc.
Always pass user_agent='YourName yourname@example.com' when creating EdgarClient.
Zero-pad CIK strings: cik = str(cik).zfill(10)
Add delays between requests with time.sleep(0.1) or use a rate limiter.
Use 'from sec_edgar_api import EdgarClient' after installing with 'pip install sec-edgar-api'.
Inspect response dicts carefully and handle missing keys defensively with .get().
Use a Python version between 3.8 and 3.12, or check for an updated version of the `sec-edgar-api` library that explicitly supports Python 3.13.