EdgarTools is a Python library designed to access and analyze SEC EDGAR filings, XBRL financial statements, 10-K, 10-Q, and 8-K reports. It provides structured Python objects for over 20 filing types, converting complex SEC data into easy-to-use DataFrames. Currently at version 5.29.0, the library is actively developed with frequent updates addressing bug fixes and adding new features, often multiple releases per month.
pip install edgartoolsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set your SEC identity, create a `Company` object, access basic company information, and retrieve the latest income statement and balance sheet. It highlights the structured data access that edgartools provides.
Call `edgar.set_identity("Your Name your.email@example.com")` once at the beginning of your script, or set the `EDGAR_IDENTITY` environment variable.Ensure you `pip install edgartools`. If you previously installed `edgar`, run `pip uninstall edgar && pip install edgartools`.
Upgrade to edgartools v5.28.5 or newer to ensure HTML content in `TextBlock` disclosures is automatically sanitized to plain text.
Upgrade to edgartools v5.28.3 or newer to get accurate quarter labels for non-calendar fiscal year companies.
edgartools generally handles rate limiting internally, but for large-scale operations, enable local storage, batch downloads, and process filings sequentially or with careful parallel processing.
Use `financials.cashflow_statement()` for consistency and to follow the canonical naming convention.
First, uninstall the conflicting 'edgar' package, then install or reinstall 'edgartools'. `pip uninstall edgar` `pip install edgartools`
Set your identity either programmatically or via an environment variable before making any requests.
`from edgar import set_identity`
`set_identity('Your Name your.email@company.com')`
Or via environment variable:
`export EDGAR_IDENTITY='Your Name your.email@company.com'` (Linux/macOS)Configure `edgartools` to use your operating system's certificate store, which should include your corporate CA. `from edgar import configure_http` `configure_http(use_system_certs=True)`
Access the form-specific object using `.obj()` or the XBRL object using `.xbrl()` before accessing financial properties. `tenk = filing.obj()` `income_statement = tenk.financials.income_statement` Or: `xbrl_statements = filing.xbrl().statements`