Use SEC API from Python to retrieve SEC filings, company data, financial statements, ownership data, and more.
pip install secapi-clientCreate an API key in the SEC API dashboard, then keep it in an environment variable. Do not place API keys in source code or commit them to a repository.
export SECAPI_API_KEY="secapi_live_..."import os
from secapi_client import SecApiClient
client = SecApiClient(api_key=os.environ["SECAPI_API_KEY"])
filing = client.latest_filing(ticker="AAPL", form="10-K")
print(filing["accessionNumber"])This requests the most recent Apple 10-K and prints its filing accession number, such as 0000320193-25-000079. The full filing value is a Python dictionary with the filing metadata you can use to retrieve a section or continue with another SEC API workflow.
Requires Python 3.11 or later. The SDK connects to https://api.secapi.ai by default and authenticates API-key requests with SECAPI_API_KEY.
The package version in this release is 1.0.1. See the status page for API availability and incident updates.