SEC Data Pipeline: Company Facts API

The Problem: Manual Data Pull

Every public company traded on U.S. exchanges is required to regularly file financial statement disclosures to the Securities and Exchange Commission (SEC). This mandate applies to both domestic filers (U.S.-based companies traded on exchanges like NASDAQ or NYSE) and Foreign Private Issuers (FPIs) (companies headquartered abroad but listed on U.S. exchanges).

While modern third-party brokerages excel at providing technical analysis and forward-looking market metrics, they frequently lack direct, granular access to each company’s audited financial statements. Consequently, individual investors seeking the source data for each investment is subjected to a manual workflow: either querying individual filings through the SEC’s public EDGAR interface or navigating the investor relations pages of multiple corporate websites.

The Solution: Automated Financial Data Pipeline

To eliminate this friction, I developed an automated ETL (Extract, Transform, Load) data pipeline that interfaces directly with the SEC’s EDGAR database. Built as a project to deepen my understanding of Python, this tool interfaces with the SEC's Company Facts API to extract and parse investment data.

How it Works:

  • Ingestion: The pipeline queries the Company Facts API utilizing Central Index Keys (CIKs) for each investment.

  • Parsing & Normalization: It then extracts the tagged XBRL (eXtensible Business Reporting Language) financial statement elements for Total Assets, Total Liabilities, Total Equity, Total Revenue, and Total Income.

  • Transformation: The script parses the unstructured JSON content into a structured tabular format as a pandas dataframe.

  • Deployment: Using Streamlit, I wrapped the Python logic into an interactive web application which allows users to interface with the dynamic widgets to instantly filter three years of historical financial trends right from a web browser.

This project bridges the gap between raw regulatory data and actionable investment analysis, turning complex SEC filings into an intuitive, interactive watch list ahead of earnings season.

Next
Next

A Data-Driven Approach to Financial Oversight: Ensuring Financial Health & Stability for DC Public Charter Schools - Challenges