Skip to main content
These endpoints let you query across the companies in a scenario rather than one ticker at a time: a metric-based stock screener and a line-item extractor.

Screener filters

GET /financials/search/screener/filters
Returns the available filterable fields for the screener. Takes no parameters.
curl -s "https://api.davidhf.com/financials/search/screener/filters" \
  -H "X-API-KEY: YOUR_API_KEY"
{ "filters": ["market_cap", "price_to_earnings_ratio", "gross_margin", "..."] }

Stock screener

POST /financials/search/screener
Rank and filter companies by financial metrics. Send a JSON body.
FieldTypeRequiredDefaultDescription
scenario_idstringYes-The world to read from.
tickersstring[]NoallRestrict the search universe.
periodstringNottmMetric period.
limitintegerNo100Max results.
filtersobjectNo{}Map of metric → comparator. Comparators: gt, gte, lt, lte, eq.
curl -s -X POST "https://api.davidhf.com/financials/search/screener" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scenario_id": "<id>",
    "period": "ttm",
    "filters": {
      "market_cap": { "gt": 1000000000 },
      "gross_margin": { "gte": 0.4 }
    }
  }'
{ "results": [ { "ticker": "AAPL", "market_cap": 2950000000000, "gross_margin": 0.452 } ] }

Line items

POST /financials/search/line-items
Extract specific statement line items across tickers, handy for building feature tables.
FieldTypeRequiredDefaultDescription
scenario_idstringYes-The world to read from.
tickersstring[]NoallRestrict the universe.
periodstringNoquarterlyStatement period.
limitintegerNo100Max rows.
line_itemsstring[]No-Line items to extract, e.g. ["revenue", "net_income"].
curl -s -X POST "https://api.davidhf.com/financials/search/line-items" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scenario_id": "<id>",
    "tickers": ["AAPL", "MSFT"],
    "period": "quarterly",
    "line_items": ["revenue", "net_income", "free_cash_flow"]
  }'
{
  "results": [
    { "ticker": "AAPL", "report_period": "2026-03-31", "revenue": 124300000000, "net_income": 33700000000 }
  ]
}