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.
Fetch and parse
Section titled “Fetch and parse”# 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-10kkaos-source preview acme-10k --max-bytes 4096In 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_documentdoc = html_to_document(filing_html, url="https://www.sec.gov/...")- Connector requirements vary: EDGAR needs a
User-Agentcontaining 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-sourcealso handles filesystem, archives, browser capture, GLEIF, and PACER.