> ## Documentation Index
> Fetch the complete documentation index at: https://docs.financialdatasets.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Search SEC Filings

> Learn how to search and retrieve SEC filings (10-K, 10-Q, 8-K) and extract specific sections like Risk Factors using Python.

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](https://financialdatasets.ai))
* The `requests` library (`pip install requests`)

## Step 1: Set Up Authentication

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import requests

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

## Step 2: Search Filings by Ticker

Use the [Filings API](/api/filings/ticker) to find SEC filings for any US public company.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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](/api/filings/items) to pull individual sections without parsing the full document.

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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:

| Item | Section                                                    |
| ---- | ---------------------------------------------------------- |
| 1    | Business Overview                                          |
| 1A   | Risk Factors                                               |
| 7    | Management's Discussion and Analysis (MD\&A)               |
| 7A   | Quantitative and Qualitative Disclosures About Market Risk |
| 8    | Financial Statements and Supplementary Data                |

## Step 4: Filter by Date Range

Narrow your search to a specific time period:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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:

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
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

* [Filings API Reference](/api/filings/ticker) — full parameter documentation
* [Filing Items API Reference](/api/filings/items) — all available item types
* [Financial Statements Guide](/guides/analyze-financial-statements-python) — get the structured numbers from these filings
* [Company Facts API](/api/company/facts/ticker) — get company metadata and identifiers
