Skip to content

secapi-ai/secapi-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SEC API Python SDK

Use SEC API from Python to retrieve SEC filings, company data, financial statements, ownership data, and more.

Install

pip install secapi-client

Make a request

Create 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.

Documentation and support

Compatibility

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.

Status

The package version in this release is 1.0.1. See the status page for API availability and incident updates.

About

Official Python SDK for SEC API

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages