Python library to access and analyze SEC Edgar filings, XBRL financial statements, 10-K, 10-Q, and 8-K reports
Project description
EdgarTools — Python Library for SEC EDGAR Filings
EdgarTools is a Python library for accessing SEC EDGAR filings as structured data. Parse financial statements, insider trades, fund holdings, proxy statements, and 20+ other filing types with a consistent Python API — in a few lines of code. Free and open source.
Why EdgarTools?
SEC EDGAR has every filing back to 1994, free — and almost none of it is ready to use. EdgarTools turns any filing into a typed Python object, so a 10-K's revenue is one line instead of an afternoon of XBRL parsing.
# Apple's latest income statement — rendered, standardized, done
from edgar import Company
Company("AAPL").get_financials().income_statement()
|
Financial Statements Income, balance sheet, cash flow in one call XBRL-standardized for cross-company comparison |
Every Filing Type 13F holdings, Form 4 insiders, 8-K events, funds, proxies Typed objects + pandas DataFrames for 20+ forms |
Built for Pipelines & AI Rate-limit aware, smart caching, enterprise mirrors Built-in MCP server + LLM-ready text for RAG |
How It Works
Everything starts with a Company or a Filing. Call .obj() and you get a typed object built for that form — its data ready as pandas DataFrames and clean text.
The same typed output that reads cleanly in a notebook drops straight into a pipeline: DataFrames for your warehouse, LLM-ready text and an MCP server for your AI stack, rate-limit and enterprise-mirror aware for scale.
pip install edgartools
from edgar import *
set_identity("your.name@example.com") # SEC requires an identifying email
# One line to a rendered, standardized balance sheet
Company("AAPL").get_financials().balance_sheet()
# Browse a company's filings, parse insider transactions
form4 = Company("MSFT").get_filings(form="4")[0].obj()
form4.to_dataframe() # insider buy/sell transactions
Use Cases
Extract Financial Statements from 10-K and 10-Q Filings
Get income statements, balance sheets, and cash flow statements from SEC annual and quarterly reports. Data is parsed from XBRL with standardized labels for cross-company comparison.
financials = Company("MSFT").get_financials()
financials.balance_sheet() # Balance sheet with all line items
financials.income_statement() # Revenue, net income, EPS
Track Insider Trading with SEC Form 4
Monitor insider buying and selling activity from SEC Form 4 filings. See which executives are purchasing or selling shares, option exercises, and net position changes.
form4 = Company("TSLA").get_filings(form="4")[0].obj()
form4.to_dataframe() # Insider buy/sell transactions
Analyze 13F Institutional Holdings & Hedge Fund Portfolios
Track what hedge funds and institutional investors own by parsing SEC 13F filings. EdgarTools extracts complete portfolio holdings with position sizes, values, and quarter-over-quarter changes.
from edgar import get_filings
thirteenf = get_filings(form="13F-HR")[0].obj()
thirteenf.holdings # DataFrame of all portfolio positions
Institutional Holdings guide →
Parse 8-K Current Reports for Corporate Events
Access material corporate events as they happen -- earnings releases, acquisitions, executive changes, and more. EdgarTools parses 8-K filings into structured items with full text extraction.
eightk = get_filings(form="8-K")[0].obj()
eightk.items # List of reported event items
Query XBRL Financial Data Across Companies
Access structured XBRL financial facts for any SEC filer. Query specific line items like revenue or total assets over time, and compare across companies using standardized concepts.
facts = Company("AAPL").get_facts()
facts.query().by_concept("Revenue").to_dataframe() # Revenue history as DataFrame
|
Financial data
Funds & ownership
|
Filings & text
Built for production
|
EdgarTools supports all SEC form types including 10-K annual reports, 10-Q quarterly filings, 8-K current reports, 13F institutional holdings, Form 4 insider transactions, proxy statements (DEF 14A), S-1 registration statements, N-CSR fund reports, N-MFP money market data, N-PORT fund portfolios, Schedule 13D/G ownership, Form D offerings, Form C crowdfunding, and Form 144 restricted stock. Parse XBRL financial data, extract text sections, and convert filings to pandas DataFrames.
Comparison with Alternatives
EdgarTools is a Python library that talks directly to SEC EDGAR. sec-api is a hosted API service that returns JSON. Both parse SEC filings — the difference is how you work with the data.
| EdgarTools | sec-api | Raw EDGAR | |
|---|---|---|---|
| What it is | Python library | REST API service | DIY |
| Cost | Free (MIT) | $49+/mo | Free |
| Data format | Typed Python objects | JSON | Raw XML/HTML |
| Parsed filing types | 24 (10-K, 8-K, 13F, N-PORT, proxy, etc.) | 15+ structured APIs | — |
| Financials | |||
| Full-text search | |||
| AI/MCP integration | |||
| Language | Python | Any | Any |
| Open source | N/A |
Use EdgarTools with Claude Code & Claude Desktop
EdgarTools includes an MCP server and AI skills for Claude Desktop and Claude Code. Ask questions in natural language and get answers backed by real SEC data.
- "Compare Apple and Microsoft's revenue growth rates over the past 3 years"
- "Which Tesla executives sold more than $1 million in stock in the past 6 months?"
Setup Instructions
Option 1: AI Skills (Recommended)
Install the EdgarTools skill for Claude Code or Claude Desktop:
pip install "edgartools[ai]"
python -c "from edgar.ai import install_skill; install_skill()"
This adds SEC analysis capabilities to Claude, including 3,450+ lines of API documentation, code examples, and form type reference.
Option 2: MCP Server
Run EdgarTools as an MCP server for any AI client -- Claude Desktop, Cline, or your own containerized deployment.
Add to Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"edgartools": {
"command": "uvx",
"args": ["--from", "edgartools[ai]", "edgartools-mcp"],
"env": {
"EDGAR_IDENTITY": "Your Name your.email@example.com"
}
}
}
}
Requires uv. Alternatively, pip install "edgartools[ai]" and use python -m edgar.ai.
See AI Integration Guide for complete documentation.
Support This Project
EdgarTools is used in production at hedge funds, fintechs, and research desks. It's MIT-licensed — no API keys, no rate limits, no subscriptions — and one person maintains it.
The SEC ships a new XBRL taxonomy every year and amends filing types every quarter. Keeping 20+ parsers current, and adding new extractors as the SEC adds disclosure types, is the work sponsorship funds.
Recurring sponsorship + corporate tiers via GitHub · One-time thanks via Buy Me a Coffee
Recent maintenance shipped via sponsorship:
- NPORT-P fund portfolio extraction
- MA-I municipal advisor parser
- 424B prospectus family (B1–B8) extractors
- XBRL taxonomy updates for the 2026 cycle
For teams running EdgarTools in production
If EdgarTools is in your data pipeline, GitHub Sponsors offers corporate tiers from $250 to $1,500/mo with:
- Response SLAs (24h–48h first response on critical issues)
- Quarterly strategy calls and roadmap input
- Logo placement in this README
- 7-day early access for internal regression testing
- Annual invoicing through GitHub — procurement-friendly
Documentation & Resources
Get Help & Connect
- GitHub Issues - Bug reports and feature requests
- Discussions - Questions and community discussions
Contributing
Contributions welcome:
- Code: Fix bugs, add features, improve documentation
- Examples: Share interesting use cases and examples
- Feedback: Report issues or suggest improvements
- Spread the Word: Star the repo, share with colleagues
See our Contributing Guide for details.
Professional Services
Need help building production SEC data infrastructure? The creator of EdgarTools offers consulting for teams building financial AI products:
- SEC Data Sprint (1–3 days) — Working prototype on your data
- Architecture Review (1–2 weeks) — Pipeline audit with prioritized fixes
- Pipeline Build (2–4 weeks) — Production-ready code, tests, and handoff
EdgarTools is distributed under the MIT License
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edgartools-5.34.0.tar.gz.
File metadata
- Download URL: edgartools-5.34.0.tar.gz
- Upload date:
- Size: 3.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3067e235f75fe627594eac568b53c70f1502858f107cdac0f40aaf673bf2951
|
|
| MD5 |
d1ea9fb2794046dd0643085569c4bda9
|
|
| BLAKE2b-256 |
57769cb23718548fcd99b054a2205f21fd96f9bfb813e2143554b787d4849177
|
File details
Details for the file edgartools-5.34.0-py3-none-any.whl.
File metadata
- Download URL: edgartools-5.34.0-py3-none-any.whl
- Upload date:
- Size: 3.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9c837f129f39db0f6710d427a2f6de545e4dfa160b0c334ff4e89444163d874
|
|
| MD5 |
d779708669956f9d5bb331dc7f30c2ae
|
|
| BLAKE2b-256 |
6bf5cd6ca4cd4bb72ef5b635c88ee367dcb5ba784f751c3c4567034af5e2ee1a
|