Skip to content

Instantly share code, notes, and snippets.

@janlukasschroeder
Last active June 12, 2022 13:11
Show Gist options
  • Save janlukasschroeder/355e45e2f5cc5dee163f06d721eb152f to your computer and use it in GitHub Desktop.
Save janlukasschroeder/355e45e2f5cc5dee163f06d721eb152f to your computer and use it in GitHub Desktop.
Extract any section from 10-K and 10-Q SEC filings
from sec_api import ExtractorApi
extractorApi = ExtractorApi("YOUR_API_KEY")
# Tesla 10-K filing
filing_url = "https://www.sec.gov/Archives/edgar/data/1318605/000156459021004599/tsla-10k_20201231.htm"
# get the standardized and cleaned text of section 1A "Risk Factors"
section_text = extractorApi.get_section(filing_url, "1A", "text")
# get the original HTML of section 7 "Management’s Discussion and Analysis of Financial Condition and Results of Operations"
section_html = extractorApi.get_section(filing_url, "7", "html")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment