Search companies & metrics
Everything in StockAlloy hangs off a series: one metric, for one company,
on one dimension slice, in one unit. AAPL × Revenue × (consolidated) × USD
is a series; DECK × Revenue × Direct-to-Consumer × USD is a different one.
Search is how you find the series you want; the
facts endpoints are how you get its values.
Search series
Section titled “Search series”POST /api/b2b/search/series runs full-text search over series titles,
labels, and synonyms, scoped to a company:
curl -s https://api.stockalloy.com/api/b2b/search/series \ -H "Content-Type: application/json" \ -H "X-API-Key: $STOCKALLOY_API_KEY" \ -d '{"query": "direct-to-consumer revenue", "ticker": "DECK", "limit": 5}'Response (truncated):
{ "scope": "company", "query": "direct-to-consumer revenue", "ticker": "DECK", "cik": "0001011570", "limit": 5, "offset": 0, "count": 3, "results": [ { "series_id": "01J5KX…", "series_key": "91b2c4d6e8…", "cik": "0001011570", "ticker": "DECK", "company_name": "Deckers Outdoor Corp", "metric_id": "us-gaap#RevenueFromContractWithCustomerExcludingAssessedTax", "dims_key": "7fa3e1…", "unit_signature": "monetary:USD", "title": "Revenue — Direct-to-Consumer", "subtitle": "BusinessSegmentsAxis: Direct-to-Consumer", "rank": -12.4, "point_count": 38, "last_period_end": "2024-03-31" } ]}Two identifiers matter in each hit:
series_key— a stable 64-char key. Feed it toPOST /api/b2b/facts/full/by-seriesto get the actual fact rows with evidence links.series_id— an internal series ID. Feed it toPOST /api/b2b/series/batchfor metadata and a pre-built chart blob URL.
rank is a BM25 relevance rank — lower is better. Add
"fetch_top": 1 to have the top hit hydrated inline under top_series
(metadata + blob URL) and save a round trip.
Search entities (metrics and members too)
Section titled “Search entities (metrics and members too)”POST /api/b2b/search/entities is the broader version: it searches
metrics (concepts like Revenue), members (dimension values like
“Direct-to-Consumer” or “Greater China”), and series in one call.
curl -s https://api.stockalloy.com/api/b2b/search/entities \ -H "Content-Type: application/json" \ -H "X-API-Key: $STOCKALLOY_API_KEY" \ -d '{"query": "greater china", "ticker": "AAPL", "types": ["member", "series"], "limit": 10}'Use types to restrict; omit it to search everything. Queries must be at
least 2 characters.
Scoping
Section titled “Scoping”| Scope | How | Notes |
|---|---|---|
| One company | "ticker": "AAPL" or "cik": "0000320193" |
The common case |
| Company set | "tickers": ["AAPL", "MSFT"] or "ciks": [...] |
Compare peers |
| Cross-company | Omit all company fields | Searches the full 6,100-company universe |
Search filing text
Section titled “Search filing text”POST /api/b2b/search/filings searches the narrative of filings — MD&A,
risk factors, notes, legal proceedings, and extracted table context — and
returns snippets with viewer links that highlight the matched passage:
curl -s https://api.stockalloy.com/api/b2b/search/filings \ -H "Content-Type: application/json" \ -H "X-API-Key: $STOCKALLOY_API_KEY" \ -d '{ "query": "supply chain constraints", "ticker": "AAPL", "types": ["risk", "mda"], "after": "3y", "limit": 5 }'Useful parameters:
types— restrict to section types:mda,notes,business,risk,legal,properties,market_risk,controls,compliance,table_context.after/before— date window.afteracceptsYYYY-MM-DD, a relative window like1y/3y/5y, orall. Single-term company-scoped queries default to the last 3 years (the response tells you viaapplied_filed_at_after_reason).sort—recent(default) orrelevance.legal: true— expands legal-domain phrasing (going concern, material weakness, covenants, indemnification, …) into the query.include_series: true— also returnsseries_suggestions: numeric series related to your text query.
Cross-company filing search (no company fields) requires at least 2 query terms, is capped at 25 results, and needs the cross-company entitlement on your key (included in all current plans).
Look up issuer reference data
Section titled “Look up issuer reference data”POST /api/b2b/issuer/reference returns the company card:
curl -s https://api.stockalloy.com/api/b2b/issuer/reference \ -H "Content-Type: application/json" \ -H "X-API-Key: $STOCKALLOY_API_KEY" \ -d '{"ticker": "RKLB"}'{ "scope": "company", "ticker": "RKLB", "cik": "0001819994", "count": 1, "rows": [ { "cik": "0001819994", "current_ticker": "RKLB", "issuer_name": "Rocket Lab USA, Inc.", "ipo_date": "2021-08-25", "exchange": "NASDAQ", "sector": "Industrials", "industry": "Aerospace & Defense", "sic_code": "3663", "as_of_date": "2026-07-01" } ]}Typical flow
Section titled “Typical flow”- Search for the metric you want, scoped to a ticker.
- Take the top hit’s
series_key. - Fetch facts with
POST /api/b2b/facts/full/by-series. - Show the values — and their
evidence_urls — to your users.
Next: Get financial facts.