Skip to content

Instantly share code, notes, and snippets.

@janlukasschroeder
Last active June 12, 2022 13:21
Show Gist options
  • Save janlukasschroeder/883b3466620e9792f3b5f6fbe3a15aa9 to your computer and use it in GitHub Desktop.
Save janlukasschroeder/883b3466620e9792f3b5f6fbe3a15aa9 to your computer and use it in GitHub Desktop.
Extract the risk factor section (part 2, item 1a) from 10-Q filings
from sec_api import ExtractorApi
extractorApi = ExtractorApi("YOUR_API_KEY")
# Tesla 10-Q filing
filing_url = "https://www.sec.gov/Archives/edgar/data/1318605/000095017022006034/tsla-20220331.htm"
# extract section 1A "Risk Factors" in part 2 as cleaned text
section_text = extractorApi.get_section(filing_url, "part2item1a", "text")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment