Skip to main content

SEC Filing Search

Search SEC.gov and EDGAR for financial filings using domain filtering, extract key financial metrics, and produce structured summaries of public company filings. This example demonstrates practical financial data extraction using the Agent API with targeted domain filters.

Features

  • Search SEC.gov and EDGAR exclusively using search_domain_filter
  • Extract key metrics from 10-K, 10-Q, and 8-K filings
  • Structured JSON output for financial data
  • Compare filings across companies or time periods
  • Combine SEC data with broader market context via web search
This example uses the Agent API’s web_search tool with domain filtering to target SEC.gov specifically. The search is grounded in actual SEC filings rather than secondary reporting.

Installation

Usage

Save the full code below to sec_search.py and run:
Compare companies:

Full Code

Example Output

Structured Extraction

Company Comparison

SEC EDGAR contains the official, audited financial data for all US public companies. By restricting search to sec.gov and edgar.sec.gov, you ensure your financial data comes from primary source filings rather than secondary reporting.
Financial data extracted by the model should be verified against the original filing before use in official reports or investment decisions. The model may occasionally misparse tables or footnotes.

Limitations

  • The search is limited to what SEC EDGAR makes publicly available and indexable.
  • Very recent filings may not yet be indexed by the search engine.
  • Complex financial tables (multi-year comparisons, segment breakdowns with footnotes) may be summarized rather than fully extracted.
  • The model provides data as-is from filings. It does not adjust for accounting method changes between periods.