Edgar-SEC: A Modern Python Client for SEC EDGAR® API#

edgar-sec is a lightweight, typed, and modern Python package for accessing the U.S. Securities and Exchange Commission (SEC) EDGAR® API. It offers both synchronous and asynchronous endpoints, with structured dataclasses, built-in caching, rate limiting, and developer-friendly error handling.

Install Edgar-SEC#

pip install edgar-sec
conda install -c conda-forge edgar-sec

See Installing Edgar-SEC for advanced options.

Badges#

Build Status

Github Actions build status.

Build Status
GitHub Build Status
Static Analysis

Code linting and static analysis status.

Static Analysis Status
GitHub Static Analysis Status
Unit Test Status

Unit test coverage for critical components.

Unit Test Status
GitHub Unit Tests
Security Analysis

GitHub CodeQL security scanning.

OpenSSF
GitHub Security CodeQL Scan
OpenSSF Best Practices

Open Source Security Foundation (OpenSSF) Gold Badge.

OpenSSF Best Practices Certified
View edgar-sec on PyPI
Code Coverage

Codecov test coverage report.

Code Coverage
Code Coverage with Codecov
Socket Security Score

Security risk analysis via Socket.dev.

Socket Security Score
Socket Security Analysis
Packaging Status

Repology packaging status across Linux distributions.

Packaging Status
Packaging Status Repology
PyPI Version

Latest version released on PyPI.

PyPI Version
View Edgar-SEC on PyPI
PyPI Downloads

Download stats via Pepy.tech.

PyPI Downloads
PyPI Download Statistics
Conda-Forge Version

Conda-Forge published version.

Conda-Forge Version
View Edgar-SEC on Conda-Forge
Conda-Forge Downloads

Number of downloads from Conda-Forge.

Conda-Forge Downloads
Conda-Forge Download Statistics

Key Features#

Typed Models

Structured Python @dataclass models for filings, metadata, entities, and submissions.

Async + Sync Clients

Fully asynchronous and synchronous interfaces via edgar_sec.clients.EdgarAPI and edgar_sec.clients.EdgarAPI.AsyncAPI.

File Caching

Caches responses to disk to reduce redundant API calls and accelerate development.

Caches responses to disk to reduce redundant API calls and accelerate development.

icon:

archive

Caches responses to disk to reduce redundant API calls and accelerate development.

Built-in Rate Limiting

Auto-throttling respects SEC EDGAR API limits — no extra config required.

Pythonic Error Handling

Designed for transparency and reliability — clear exceptions for all edge cases.

Resources#

Explore the documentation: