Skip to main content
SEC filings contain the most authoritative information about public companies — from annual reports (10-K) to quarterly updates (10-Q) to material events (8-K). This guide shows you how to search filings and extract specific sections programmatically.

Prerequisites

  • Python 3.7+
  • A Financial Datasets API key (sign up here)
  • The requests library (pip install requests)

Step 1: Set Up Authentication

import requests

headers = {
    "X-API-KEY": "your_api_key_here"
}

Step 2: Search Filings by Ticker

Use the Filings API to find SEC filings for any US public company.
ticker = "AAPL"
filing_type = "10-K"  # options: 10-K, 10-Q, 8-K, and more
limit = 5

url = (
    f"https://api.financialdatasets.ai/filings"
    f"?ticker={ticker}"
    f"&type={filing_type}"
    f"&limit={limit}"
)

response = requests.get(url, headers=headers)
filings = response.json().get("filings")

for filing in filings:
    print(f"{filing['filed_at']}: {filing['type']} - {filing['description']}")

Step 3: Extract Specific Filing Sections

The real power is in extracting specific items from filings. Use the Filing Items API to pull individual sections without parsing the full document.
ticker = "AAPL"
item = "1A"  # Item 1A: Risk Factors
filing_type = "10-K"

url = (
    f"https://api.financialdatasets.ai/filings/items"
    f"?ticker={ticker}"
    f"&item={item}"
    f"&type={filing_type}"
    f"&limit=1"
)

response = requests.get(url, headers=headers)
items = response.json().get("items")

if items:
    print(f"Item 1A (Risk Factors):\n{items[0]['text'][:500]}...")

Common Filing Items

Here are the most commonly requested sections from 10-K filings:
ItemSection
1Business Overview
1ARisk Factors
7Management’s Discussion and Analysis (MD&A)
7AQuantitative and Qualitative Disclosures About Market Risk
8Financial Statements and Supplementary Data

Step 4: Filter by Date Range

Narrow your search to a specific time period:
url = (
    f"https://api.financialdatasets.ai/filings"
    f"?ticker=AAPL"
    f"&type=10-K"
    f"&filed_at_gte=2020-01-01"
    f"&filed_at_lte=2024-12-31"
)

response = requests.get(url, headers=headers)
filings = response.json().get("filings")

Step 5: Search by CIK Number

If you have an SEC CIK number instead of a ticker, you can use that as well:
cik = "0000320193"  # Apple's CIK

url = (
    f"https://api.financialdatasets.ai/filings"
    f"?cik={cik}"
    f"&type=10-K"
    f"&limit=5"
)

response = requests.get(url, headers=headers)
filings = response.json().get("filings")

Next Steps