Skip to content

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.

POST /api/b2b/search/series runs full-text search over series titles, labels, and synonyms, scoped to a company:

Terminal window
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 to POST /api/b2b/facts/full/by-series to get the actual fact rows with evidence links.
  • series_id — an internal series ID. Feed it to POST /api/b2b/series/batch for 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.

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.

Terminal window
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.

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

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:

Terminal window
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. after accepts YYYY-MM-DD, a relative window like 1y/3y/5y, or all. Single-term company-scoped queries default to the last 3 years (the response tells you via applied_filed_at_after_reason).
  • sortrecent (default) or relevance.
  • legal: true — expands legal-domain phrasing (going concern, material weakness, covenants, indemnification, …) into the query.
  • include_series: true — also returns series_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).

POST /api/b2b/issuer/reference returns the company card:

Terminal window
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"
}
]
}
  1. Search for the metric you want, scoped to a ticker.
  2. Take the top hit’s series_key.
  3. Fetch facts with POST /api/b2b/facts/full/by-series.
  4. Show the values — and their evidence_urls — to your users.

Next: Get financial facts.