Home / Tutorials / Section & text extraction
Section & text extraction

Extract 10-K risk factors (Item 1A) with Python

Pull Item 1A risk factors out of any 10-K as clean text with one API call, then search and compare them across companies or years.

Risk factors (Item 1A) are among the most read sections of a 10-K, and among the hardest to isolate: every filer formats its HTML differently. The /v1/extractor endpoint finds the section for you and returns it as plain text or HTML.

Extract Item 1A

Pass the filing URL and item=1A. This example uses Apple's fiscal 2025 10-K, then counts a few terms.

import os
import re
import requests

BASE = "https://secfeedapi.com"
HEADERS = {"Authorization": f"Bearer {os.environ['SECFEED_KEY']}"}

url = "https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/0000320193-25-000079-index.htm"
r = requests.get(f"{BASE}/v1/extractor", params={"url": url, "item": "1A", "type": "text"}, headers=HEADERS, timeout=120)
r.raise_for_status()
text = r.text
print(len(text), "characters,", len(text.split()), "words")
print(text[:300])

for term in ["tariff", "China", "artificial intelligence", "cybersecurity", "climate"]:
    n = len(re.findall(term, text, flags=re.I))
    print(f"{term:25} {n}")

Output:

68160 characters, 9782 words
Item 1A. Risk Factors

The following summarizes factors that could have a material adverse effect on the Company’s business, reputation, results of operations, financial condition and stock price. The Company may not be able to accurately predict, control or mitigate these risks. Statements in this 
tariff                    10
China                     3
artificial intelligence   6
cybersecurity             2
climate                   2

Item 1A of this 10-K is about 9,800 words. The text starts at the section heading and stops before Item 1B, with tables and page furniture removed.

Item codes

FormItems
10-K1, 1A, 1B, 1C, 2, 3, 4, 5, 6, 7, 7A, 8, 9, 9A, 9B, 10 to 15
10-Qpart1item1, part1item2, part1item3, part1item4, part2item1, part2item1a, part2item2 and so on
8-K1-1 for Item 1.01, 2-2 for Item 2.02, 5-2 for Item 5.02 and so on

Pass type=html to keep the original formatting, which is useful when you want to show the section to a reader.

Compare years

Run the same extraction on two consecutive 10-Ks and diff the text with Python's difflib to see which risks were added or rewritten. Get prior years from a filing search on cik:320193 with size=200, keeping the rows whose formType is 10-K.

Feed it to an LLM

Item 1A plus Item 7 (MD&A) is a compact, high signal input for summarization or classification. Extracting sections first keeps prompts small and avoids the cover page, exhibits index and signatures.

Next steps

More section & text extraction tutorials

Run this tutorial with your own key

500 free API calls a month. Every example on this page works on the free plan.

Get free API key →