Skip to content

Pull a SEC filing

kaos-source ships REST connectors for government data — including SEC EDGAR. Fetch a filing, then parse it into the document AST like any other source.

Terminal window
# Discover and materialize an EDGAR filing (EDGAR requires a User-Agent with an email)
export KAOS_SOURCE_EDGAR_USER_AGENT="Your Name your.email@example.com"
kaos-source materialize "edgar://<cik>/<accession>" --name acme-10k
kaos-source preview acme-10k --max-bytes 4096

In Python, the EDGAR connector fetches the filing, which you then parse:

# (fetch via the EDGAR connector — network) then parse the HTML offline:
from kaos_web import html_to_document
doc = html_to_document(filing_html, url="https://www.sec.gov/...")
  • Connector requirements vary: EDGAR needs a User-Agent containing an email; GovInfo needs an API key; Federal Register and eCFR need neither (see environment variables).
  • Once parsed, everything downstream is offline and identical to any other document: search, extract citations, SQL over extracted tables, or a research agent over a filing corpus.
  • kaos-source also handles filesystem, archives, browser capture, GLEIF, and PACER.