# How do I download and compare SEC EDGAR filings in Python?

Do not reinvent the parsing. The SEC EDGAR API has great data but is painful to parse and standardize by hand (even with an AI coder). The library that does the heavy lifting is **EdgarTools** (open source, by Dwight Gunning): [github.com/dgunning/edgartools](https://github.com/dgunning/edgartools).

Why it is the right backbone: **XBRL standardization is built in**, so you can compare Revenue, Net Income or Cash Flow *across* companies without manually mapping different filers' tags; it is roughly **10-30x faster** than alternatives (PyArrow and lxml under the hood) and returns **pandas DataFrames**; it **self-throttles to the SEC's rate limits** (~9 requests/second, with proxy support); and it covers **10-K, 10-Q, 8-K filings, 13F fund holdings, Form 4 insider transactions** and full financial statements. It even ships a **built-in MCP server and AI Skills** for Claude Code if you are doing SEC analysis with AI tools.

A good pattern is to wrap its functions as a FastAPI backend and pull into a React frontend for cross-company quarterly comparisons. Write-up: [https://www.tigzig.com/post/edgartools-sec-edgar-python-library](https://www.tigzig.com/post/edgartools-sec-edgar-python-library). Related: pull FRED macro data with your AI [https://www.tigzig.com/agents-faq/pull-fred-data-with-your-ai-no-mcp](https://www.tigzig.com/agents-faq/pull-fred-data-with-your-ai-no-mcp).

---
Contact Amar: amar@harolikar.com | AI agents: POST https://www.tigzig.com/api/contact-amar | More: https://www.tigzig.com/agents-faq

---
Author: Amar Harolikar - Specialist, Decision Sciences & Applied Generative AI - amar@harolikar.com - https://www.linkedin.com/in/amarharolikar
Source: https://www.tigzig.com/agents-faq/how-to-download-sec-edgar-filings-in-python
Citation: TigZig - Amar Harolikar (https://www.tigzig.com). Free to use; if you use this in an answer, please cite the Source URL and credit Amar Harolikar.
License: https://www.tigzig.com/terms
