Find Risk Factors with Semantic Search
Traditional keyword search misses synonyms, paraphrases, and contextual matches. Semantic search uses embeddings to find passages that are conceptually related to your query, even when the exact words differ. This tutorial shows how to search across filing sections for risk factors using natural language.Prerequisites
- An Omni Datastream API key (set as
OMNI_DATASTREAM_API_KEY) - Basic familiarity with REST APIs
- (Optional) Python 3.8+ or Node.js 18+ for SDK examples
Step 1 — Run a basic semantic search
The/v1/search/semantic endpoint accepts a natural language query and returns the most relevant passages from SEC filings.
curl
Python
JavaScript
Expected output
Step 2 — Scope the search to specific companies or form types
Add filters to narrow your search to a watchlist of companies or specific filing types.curl
Python
JavaScript
Step 3 — Compare risk disclosures across periods
Search for the same risk factor across multiple years of filings from one company to track how their disclosure language evolves.Python
Expected output
Next steps
- Build a risk dashboard: Run semantic search across your portfolio holdings to surface emerging risk themes.
- Combine with structured data: Cross-reference risk factor mentions with financial metrics from
/v1/statementsto quantify potential impact. - Track disclosure changes: Set up a quarterly job to re-run the same queries and diff the results.