SEC Downloader

raw JSON →
0.12.2 verified Fri May 01 auth: no python

sec-downloader is a Python library that provides useful extensions for sec-edgar-downloader, including the ability to download SEC filings asynchronously, cache filings, and handle concurrent rate limits. The current version is 0.12.2, compatible with Python >=3.7. It is actively maintained with periodic releases.

pip install sec-downloader
error ModuleNotFoundError: No module named 'sec_downloader'
cause The package is not installed or installed in a different Python environment.
fix
Run pip install sec-downloader in your current environment or activate the correct virtual environment.
error sec_downloader.exceptions.RateLimitExceeded: SEC EDGAR rate limit reached. Please wait before making more requests.
cause The SEC EDGAR server enforces a rate limit of 10 requests per second. The library's built-in rate limiter is being triggered.
fix
Ensure your requests are spaced out. The async downloader handles this automatically, but if you see this error, reduce concurrency or increase delay between requests.
breaking In version 0.12.0, the method `download_filing` was renamed to `get_filing_details` and its return type changed from string to a list of `DownloadDetails` objects.
fix Update your code to use `get_filing_details` and handle `DownloadDetails` objects instead of raw strings.
gotcha AsyncEdgarDownloader uses aiohttp.ClientSession internally. Do not reuse the same session after closing the context manager; create a new instance for each connection.
fix Always use `async with AsyncEdgarDownloader() as edgar:` to ensure proper session lifecycle.

Async download of a 10-K filing for Apple using the default rate limiter.

import asyncio
from sec_downloader import AsyncEdgarDownloader

async def main():
    async with AsyncEdgarDownloader() as downloader:
        details = await downloader.get_filing_details('AAPL', '10-K', limit=1)
        for d in details:
            print(d.filing_url)

asyncio.run(main())