Quick Start Guide#
Get started with edgar-sec, a modern Python client for the SEC EDGAR® API. This guide walks you through installation, client setup, fetching filings, handling asynchronous workflows, and working with typed models.
—
Getting Started
No authentication key is required to use the EDGAR public API. Just install the package and start querying data.
Install edgar-sec using pip or conda (see Installing Edgar-SEC for more options).
import edgar_sec as ed
edgar = ed.EdgarAPI()
# Fetch company filings by CIK
submission_history = edgar.get_submissions(cik="0000320193")
print(submission_history.filings)
import edgar_sec as ed
import asyncio
async def main():
edgar = ed.EdgarAPI().Async
submission_history = await edgar.get_submissions(cik="0000320193")
print(submission_history.filings)
asyncio.run(main())
—
Working with Models#
All responses are returned as strongly typed Python dataclasses:
import edgar_sec as ed
edgar = ed.EdgarAPI()
submission_history = edgar.get_submissions(cik="0000320193")
print(submission_history.filings)
print(submission_history.filings[0].filing_date)
Models include:
—
Searching for Filings#
You can search filings using CIK, ticker, or company name:
import edgar_sec as ed
edgar = ed.EdgarAPI()
# Get submission history by ticker
submission_history = edgar.get_submissions(ticker="AAPL", type="10-Q")
# Search for a company's CIK by name substring
results = ed.EdgarHelpers.get_cik(search="Tesla")
for match in results:
print(match.name, match.cik)
—
Caching and Rate Limiting#
edgar-sec includes built-in file caching and throttling:
import edgar_sec as ed
edgar = ed.EdgarAPI(cache=True, cache_size=500)
# Caching avoids repeated calls to the same endpoint.
—
What’s Next?#
Learn how to use every endpoint and object class.
Dive into async pipelines, batching, and raw request tuning.
Understand how edgar-sec resolves and validates parameters.
Help improve the project — or fork it for your stack.