Skip to main content

Official Python SDK for the SEC Daily API — real-time SEC EDGAR filings, company data, and news.

Project description

SEC Daily API — Python SDK

Official Python SDK for the SEC Daily API — real-time SEC EDGAR filings, company data, and news.

Using Claude, Cursor, ChatGPT, or another AI assistant? Use the sec-daily-mcp package instead — it connects your AI tool directly to the SEC Daily API with no code required.

Installation

pip install sec-daily-api

Requires Python 3.8+. No runtime dependencies.

Quick Start

import os
from sec_daily_api import SecDailyAPI

client = SecDailyAPI(api_key=os.environ["SEC_DAILY_API_KEY"])

# Get Apple's latest 10-K filings
result = client.get_filings(ticker="AAPL", form_types="10-K", limit=5)

for filing in result["filings"]:
    print(filing["filingDateInEst"], filing["formType"], filing.get("summary", ""))

Get your API key at secdailyapi.com.


API Reference

For the full reference including all parameters, response schemas, and plan limits, see secdailyapi.com/docs.

SecDailyAPI(api_key=None, *, timeout=30.0)

Argument Type Description
api_key str Your API key. Defaults to SEC_DAILY_API_KEY env var
timeout float Per-request socket timeout in seconds (default 30)

get_filings(**params)

Search and filter SEC EDGAR filings.

result = client.get_filings(
    ticker="AAPL",
    form_types=["10-K", "10-Q"],
    filing_date_start="2025-01-01",
    filing_date_end="2025-12-31",
    limit=50,
)
for filing in result["filings"]:
    print(filing["formType"], filing["filingDateInEst"])
Parameter Type Description
ticker str Company ticker, e.g. "AAPL"
cik str Company CIK (numeric)
accession_number str Exact SEC accession number
form_types str | list[str] e.g. "10-K", ["10-K","10-Q"], "8-K", "4"
filing_date str Exact filing date YYYY-MM-DD
filing_date_start str Date range start YYYY-MM-DD
filing_date_end str Date range end YYYY-MM-DD
fieldset "minimal" | "standard" | "full" Response size control
limit int Results per page, default 200, max 1000
cursor str Pagination cursor from a previous response

Response: dict with filings (list), count (int), pagination (dict with hasMore and optional nextCursor).


iter_filings(**params)

Auto-paginating generator that yields individual filings across all pages.

# Walk all of Apple's 10-K filings without managing cursors yourself
for filing in client.iter_filings(ticker="AAPL", form_types="10-K", limit=1000):
    print(filing["id"], filing["filingDateInEst"])

Accepts the same filters as get_filings. Each page counts against your quota — use a larger limit to minimize requests.


get_filing(id)

Fetch a single filing by its internal ID. Returns None if not found.

filing = client.get_filing("abc123...")

get_filing_by_accession(accession_number)

Fetch a single filing by its SEC accession number. Returns None if not found.

filing = client.get_filing_by_accession("0001193125-24-012345")

get_entity(*, ticker=None, cik=None)

Look up a company's SEC profile. Provide either ticker or cik.

entity = client.get_entity(ticker="AAPL")
print(entity["name"], entity["cik"], entity["sicDescription"])

Returns a dict with: cik, name, ticker, exchange, sicCode, sicDescription, stateOfIncorporation, fiscalYearEnd, businessAddress, website, formerNames, and more. Returns None if not found.


get_news(**params)

Retrieve SEC press releases and market news.

result = client.get_news(
    news_type="PressReleases",
    start_date="2026-01-01",
    end_date="2026-01-31",
    limit=40,
)
for item in result["news"]:
    print(item["date"], item["newsType"])
Parameter Type Description
news_type str News category (default: "PressReleases")
start_date str Date range start YYYY-MM-DD
end_date str Date range end YYYY-MM-DD
limit int Results, default 40, max 100

get_news_item(id)

Fetch a single news item by ID. Returns None if not found.


TypeScript / type checking

Full type stubs are included. All response shapes are described as TypedDict classes.

from sec_daily_api import Filing, Entity, NewsItem, FilingsResponse

Error handling

from sec_daily_api import SecDailyAPI, SecDailyAPIError

try:
    result = client.get_filings(ticker="AAPL")
except SecDailyAPIError as err:
    print(err.status, err)  # e.g. 403, "SecDaily API error 403: Forbidden"
Status Meaning
400 Invalid parameters
403 Invalid or missing API key
429 Rate limit exceeded — retried automatically up to 3 times
504 Request timed out — retried automatically up to 3 times
500 Server error

Resources


Legal disclaimer

The data provided through this SDK is for informational purposes only and does not constitute investment advice, financial advice, trading advice, or any other type of advice. GoodTech LLC makes no representations as to the accuracy, completeness, or timeliness of the data. You are solely responsible for your use of the data. Always consult a qualified financial professional before making investment decisions.


Licensed under the Apache 2.0 License. Copyright 2026 GoodTech LLC.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sec_daily_api-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sec_daily_api-0.1.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file sec_daily_api-0.1.0.tar.gz.

File metadata

  • Download URL: sec_daily_api-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for sec_daily_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a32f4da2cf1c1e502dfcd083559c32e82c75bac89c181102a87c92c1691ff904
MD5 a5ba152e5a2404e8f655150dae9c3fd5
BLAKE2b-256 edd30fca0389f6a6d78d91731658deef5a522abbfa097129aa61a02611582f15

See more details on using hashes here.

File details

Details for the file sec_daily_api-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sec_daily_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for sec_daily_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8700f188aba3f4ecba5dbbc5c006322867837b1b069392530655578ac6a123fd
MD5 5e7308b242e68ff149bf3a62d57c6d66
BLAKE2b-256 3f4dcde24975f3e8383295d0d1e60a200d2c3de8a130746675c7cfb267bcf807

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page