Edgar Agent Tool
Structured access to SEC EDGAR filings (10-K, 10-Q, 8-K, 20-F, 13F-HR) with automatic section extraction — designed for LLM agents and financial analysis.
Features
- 🔍 Company Lookup — Convert stock tickers or CIK strings to SEC CIK numbers
- 📑 Filing Retrieval — Fetch recent filings for any public company or institutional filer
- 🧩 Automatic Section Parsing — Extract specific sections (Risk Factors, MD&A, Financial Statements, etc.)
- 🌐 Cross-Company Search — Find filings across all companies by date range
- 🤖 LLM-Friendly — Clean markdown output, structured dictionary returns, designed for AI agents
- ⚡ Smart Caching — Built-in TTL caches to respect SEC rate limits
Installation
pip install edgar-agent-tool
Or install from GitHub for the latest version:
pip install git+https://github.com/problemsolversguild/edgar_agent_tool.git
Development Installation
pip install -e ".[dev]"
pytest
Quick Start
First, set up your SEC User-Agent (required by the SEC):
export SEC_USER_AGENT="YourName your@email.com"
from edgar_agent_tool.filings import get_filing, get_recent_filings
# Get Apple's latest 10-K with automatic section parsing
filing = get_filing("AAPL", filing_type="10-K")
print(filing["summary"])
# Extract a specific section (e.g., Risk Factors)
filing = get_filing("AAPL", filing_type="10-K", section="1A")
print(f"Risk Factors: {len(filing['section']['content'])} characters")
# Get a list of recent 8-K filings
filings = get_recent_filings("MSFT", filing_type="8-K", count=5)
for f in filings:
print(f"{f['filingDate']}: {f['form']} - {f['primaryDocDescription']} - {f['items']}")
Key Functions
| Function | Description |
|---|---|
get_filing(ticker, filing_type, index, section) |
Get a parsed filing with automatic section extraction |
get_recent_filings(ticker, filing_type, count) |
List recent filings for a company |
get_latest_filings(filing_type, start_date, end_date, count) |
Search filings across all companies |
ticker_to_cik(ticker) |
Convert ticker to SEC CIK number |
resolve_cik(identifier) |
Resolve ticker or CIK string to (cik, label) |
get_filing_document(url, as_md) |
Fetch raw filing content (optionally as markdown) |
Filing Classes
For direct object-oriented control, use the typed filing classes:
| Class | Description |
|---|---|
Filing10K |
Annual reports with 23 standard items across 4 parts |
Filing10Q |
Quarterly reports with financial statements and MD&A |
Filing8K |
Current reports for material events (earnings, exec changes, etc.) |
Filing20F |
Annual reports for foreign private issuers |
Filing13F |
Institutional investment manager quarterly holdings reports (13F-HR) |
Each class provides:
- Lazy content loading — Content fetched only when accessed
- Automatic section parsing — Structured access to standard items or holdings
- Convenience properties —
.business,.risk_factors,.mda,.financials(or.holdings,.top_holdings,.total_valueonFiling13F) - Summary generation — Human-readable filing overviews via
.summary()
Section Reference
10-K Sections
- Item 1: Business description
- Item 1A: Risk Factors ⭐
- Item 7: Management's Discussion & Analysis (MD&A) ⭐
- Item 8: Financial Statements ⭐
10-Q Sections
- I-1 (or
1): Financial Statements - I-2 (or
2): MD&A ⭐ - II-1A (or
1A): Risk Factor updates
8-K Items
- 1.01: Material Definitive Agreement
- 2.02: Results of Operations (earnings) ⭐
- 5.02: Director/Officer changes
- 7.01: Regulation FD Disclosure
- 8.01: Other Events
20-F Sections
- 3.D: Risk Factors ⭐
- 4.B: Business Overview
- 5: Operating and Financial Review (OFR) ⭐
- 18: Financial Statements ⭐
Metadata
Release files for edgar_agent_tool 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| edgar_agent_tool-1.0.0.tar.gz | 27.3 kB | Without provenance | Details for edgar_agent_tool-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| edgar_agent_tool-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for edgar_agent_tool-1.0.0-py3-none-any.whl |
Total release size: 50.3 kB
Release files / edgar_agent_tool-1.0.0.tar.gz
| Download URL | edgar_agent_tool-1.0.0.tar.gz |
|---|---|
| Size | 27.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
291eb7f5674075083bfdc092caf76af29efccdec51a54c07799bb8669d9d3d84
|
|
BLAKE2b-256 checksum How to use checksums |
6002ebb7860fdf2b4d85ee8ea52ca7e2c9bf220fe0e0110ce117324fcdbfdeae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / edgar_agent_tool-1.0.0-py3-none-any.whl
| Download URL | edgar_agent_tool-1.0.0-py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f2eccd6ae3f75bfb53de9a405a610fb15dfa51cfc4942122069c6aa9bea7661
|
|
BLAKE2b-256 checksum How to use checksums |
812e73b8fe94b63027dd645f8edb967ae53e35a9409997ad1798d19a82bb702a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for edgar_agent_tool 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.