POST /screen/query
Screen with a free-form query
Screen the universe with a Screener.in-style expression instead of a fixed filter key set: Return on capital employed > 22% AND Market Capitalization > 500.
In plain words: Filter all listed companies with one text expression, such as Return on capital employed > 22% AND Market Capitalization > 500.
Try it
To test this route you need an API key on a plan that includes the REST API. Create one on the keys page of your dashboard, paste it into the Authorization field of the reference on this page and press Send. Your key stays in this browser tab.
curl -X POST -H "Content-Type: application/json" -d '{"query":"Return on capital employed > 22% AND Market Capitalization > 500","dialect":"screener","sort_by":"market_cap","order":"desc","limit":10,"include_condition_counts":true}' -H "Authorization: Bearer $DALALOS_API_KEY" "https://mcp.dalalos.in/v1/screen/query"{
"status": "success",
"data": {
"query": "Return on capital employed > 22% AND Market Capitalization > 500",
"dialect": "screener",
"sort_by": "market_cap",
"order": "desc",
"columns": [],
"referenced_metrics": [
"roce"
],
"definitions": [],
"scope": {},
"latest_results": {
"applied": false,
"period_end": null,
"companies_reported": null
},
"implausible_rule": {
"version": 1,
"bounds": {
"deliv_pct": {
"min": 0,
"max": 100
},
"promoter_pct": {
"min": 0,
"max": 100
},
"pledged_pct": {
"min": 0,
"max": 100
},
"piotroski_f_score": {
"min": 0,
"max": 9
},
"return_1y": {
"min": -1,
"max": 50
},
"revenue_growth": {
"min": -1,
"max": 50
},
"net_income_growth": {
"min": -100,
"max": 100
},
"roe": {
"min": -10,
"max": 10
},
"roa": {
"min": -10,
"max": 10
},
"roce": {
"min": -10,
"max": 10
},
"net_margin": {
"min": -10,
"max": 10
},
"operating_margin": {
"min": -10,
"max": 10
},
"ebitda_margin": {
"min": -10,
"max": 10
},
"earnings_yield": {
"min": -10,
"max": 1
},
"fcf_yield": {
"min": -10,
"max": 1
},
"debt_to_equity": {
"min": -100,
"max": 100
},
"interest_coverage": {
"min": -100000,
"max": 100000
},
"ev_to_ebitda": {
"min": -1000,
"max": 1000
},
"ev_to_ebit": {
"min": -1000,
"max": 1000
},
"price_to_sales": {
"min": 0,
"max": 1000
}
}
},
"results": [
{
"isin": "INE397D01024",
"nse_symbol": "BHARTIARTL",
"name": "Bharti Airtel Limited",
"sector": "Telecommunication",
"industry": "Telecom - Cellular & Fixed line services",
"company_type": "general",
"price": 2067.9,
"market_cap": 13120653476500,
"pe": 40.7461,
"pb": 8.3021,
"deliv_pct": 62.26,
"week52_high": 2172.9,
"week52_low": 1726.3,
"turnover": 7511679538.8,
"num_trades": 143700,
"roe": 0.2361,
"roa": 0.0721,
"roce": 0.2779,
"net_margin": 0.1657,
"operating_margin": 0.3189,
"ebitda_margin": 0.5767,
"debt_to_equity": 0.7664,
"interest_coverage": 3.2334,
"ev": 14257481476500,
"ev_to_ebitda": 10.9727,
"ev_to_ebit": 19.2615,
"earnings_yield": 0.0519,
"fcf_yield": 0.0587,
"price_to_sales": 5.6519,
"revenue_growth": 0.2247,
"net_income_growth": -0.0976,
"return_1y": -0.0114,
"promoter_pct": 50.07,
"pledged_pct": 0,
"piotroski_f_score": 6,
"equity_latest": 1580470000000,
"profit_after_tax_ttm": 384722000000,
"dividend_yield": 0.0116059770782,
"pct_off_52w_low": 0.197879858657
}
],
"pagination": {
"limit": 10,
"offset": 0,
"returned": 10,
"total_matches": 491,
"has_more": true,
"snapshot_id": 100
},
"snapshot": {
"id": 100,
"computed_at": "2026-11-26 16:20:31",
"row_count": 6031,
"registry_version": 1
},
"compatibility": {
"dialect": "screener",
"diagnostics": []
},
"condition_counts": {
"available": true,
"universe": 6063,
"conditions": [
{
"index": 0,
"text": "Return on capital employed > 22%",
"metric_ids": [
"roce"
],
"before": 6063,
"after": 715,
"alone": 715,
"fail_only": 1560,
"removed": {
"failed": 2883,
"missing": 1921,
"not_applicable": 544
},
"unknown_alone": {
"missing": 1921,
"not_applicable": 544
},
"nearest": {
"direction": "highest",
"operator": ">",
"threshold": 0.22,
"value": 0.22,
"unit": "percentage",
"surface_scale": 100,
"candidates": 2883,
"company": {
"isin": "INE288B01029",
"nse_symbol": "DEEPAKNTR",
"name": "Deepak Nitrite Limited"
}
}
}
],
"most_removed_index": 0,
"most_restrictive_index": 0,
"emptied_at_index": null
}
},
"cached_at": "2026-11-27T14:48:27+00:00",
"source": "indian-stock-mcp",
"stale": false,
"error": null,
"reason_code": null,
"data_age_seconds": 3866.426,
"as_of": "2026-11-26",
"freshness": {
"version": 1,
"stale": true,
"price": {
"basis": "end_of_day",
"session": "2026-11-26",
"market_latest_session": "2026-11-27",
"status": "behind_latest_session"
},
"metrics": {
"computed_at": "2026-11-26T16:20:31+00:00",
"results_season_period_end": "2026-09-30"
},
"reason_codes": [
"end_of_day_price"
],
"reason_text": "Prices are closing prices for Thursday 26 Nov 2026, not live."
}
}Saved answer. Run on 2026-11-27, answered 200. The API marked it stale ("stale": true): it answered from its last stored copy because a newer one was not available. Lists show their first item in full; the other items and long text are shortened. A call you make now gets the current answer.
A call can also answer 402, 403, 409 or 429 when a plan's limit is reached; those are described on Plans, credits and errors.
Request body and response
bearerAuthAuthorizationBearer <token>DalalOS API key (isk_live_...) as a Bearer token. Create one in the DalalOS dashboard.
The query and its paging/sort controls.
application/json- body
columns?array<string>Extra values to return per row: a metric name, a custom ratio's name, or a bracketed [expression]. At most 20. Each is described in data.columns with a stable id, and each row carries its value under columns keyed by that id.
definitions?array<>Inline custom ratios usable anywhere a metric name is, in the query, in columns, and in each other. Each is {name, expression, dialect}. At most 20; a name may not shadow a canonical metric id or a Screener ratio name, and the references between them may not form a cycle.
dialect?stringscreener (Screener.in names and surface units) or dalalos (canonical metric ids and storage units).
"screener"include_column_scales?booleanAdd data.column_scales: for each numeric row field (and each columns entry, by its id) the count, min, max and 5th / 95th percentile of the figures on file across ALL matches, in the row's units, plus whether any is negative -- the scale for an in-cell bar that reads the same on every page. A figure outside its field's plausible bound (implausible_flags) is counted (count, implausible_excluded) but left out of min/max/percentiles. Absent unless set. Mechanical statistics only.
falseinclude_condition_counts?booleanAdd data.condition_counts: for each top-level AND-ed condition of the query (in query order), how many companies remain after it, how many meet it alone, how many fail only it, how many it removed because the figure is missing or does not apply to the company type, and the nearest stored value among the companies it removed. Counted over the same universe and generation as pagination.total_matches, independent of limit/offset; absent unless set. Mechanical counts and stored figures only.
falseinclude_row_context?booleanAdd context to every returned row -- week52 (stored low, high, the price's position between them as a fraction, the trade dates of the bars behind them as low_date / high_date (null when not on file), and whether the adjustment is incomplete), as_of (quote day, latest quarterly and annual filing, shareholding period), stale_note and results_pending -- and data.column_basis, which names the filing each row field is read from. Absent unless set. Dates and stored figures only.
falselimit?integerRows per page (1..100).
25offset?integerRows to skip (0..5000).
0only_failing_condition?integer0-based index of a top-level condition (the condition_counts.conditions index). Returns only the companies that fail that one condition while meeting every other -- the rows its fail_only count counted -- so pagination.total_matches equals that count. A missing figure counts as not meeting. Out of range, or no filter: 400.
only_latest_results?booleanKeep only companies that have filed the current results season -- the most recent quarter-end at least 50 companies have reported. data.latest_results names that quarter. See GET /screen/latest-results.
falseorder?stringasc or desc.
"desc"query*stringThe screen expression, e.g. Return on capital employed > 22%.
scope?Exact-match classification filters AND-ed with the query, because the grammar has no string literal: an object with any of sector, industry, igroup, isubgroup, company_type (equality on the securities master) and index (membership of the named index). Echoed back as data.scope.
snapshot_id?integerMetrics generation to pin this page to, from a previous page's pagination.snapshot_id. Omit on the first page.
sort_by?stringSortable metric id to order by.
"market_cap"Success (or success-with-empty when nothing is cached).
application/json- response
Standard DalalOS response envelope. source is a per-tool provenance tag; stale/data_age_seconds describe cache freshness.
as_of?stringISO date (YYYY-MM-DD) the data refers to: the trade date of the newest row, or the end date of the newest period. Present only on tools that state one; cached_at is the fetch time.
datecached_at?stringISO timestamp the served data was refreshed.
data?unknownTool payload (object or array); null on error.
data_age_seconds?numberPresent only when cached_at is set.
error?stringreason_code?stringStable machine-readable category (no_data, not_found, bad_request,...).
resolved_via?stringPresent only when a query resolved via a rename/merger alias (rename, merger, demerger_successor; single-company result) or, on /v1/search, an everyday name (common_name: the company it means is the first row and carries the same resolved_via on the row; ordinary matches follow).
source?stringstale*booleanstatus*string"success""error"What comes back
The top-level fields of data in the saved answer, run on 2026-11-27. The fields can differ for another company or window.
| Field | Type |
|---|---|
query | string |
dialect | string |
sort_by | string |
order | string |
columns | list |
referenced_metrics | list |
definitions | list |
scope | object |
latest_results | object |
implausible_rule | object |
results | list |
pagination | object |
snapshot | object |
compatibility | object |
condition_counts | object |
Errors
| Status | Meaning on this route |
|---|---|
| 409 | The pinned metrics generation was replaced by a refresh (reason_code=snapshot_expired); restart from page 1. |
| 503 | No metrics generation is published yet (reason_code=snapshot_unavailable). |
The errors every route can return (401, 402, 403, 429 and the rest) are on Plans, credits and errors.
In MCP
The MCP tool screen_by_query reads the same data, for an AI assistant that connects over MCP, the Model Context Protocol, instead of REST.
Notes
- Metric names come from
GET /v1/ratios;dialectselects whether they are Screener.in phrases and surface units (screener, the default) or canonical DalalOS metric ids and storage units (dalalos). - Results are paginated against ONE published metrics generation: pass the
snapshot_ida page returned back on the next page, and a refresh in between answers 409snapshot_expiredrather than silently mixing two generations. - Missing values follow SQL three-valued logic -- a bare comparison against an unknown value does not match,
COALESCE(...)andORbehave as they do in SQL. - A query that cannot be parsed or resolved returns 400
bad_requestnaming the metric or position at fault.
Research data only. Answers are disclosed facts and mechanically computed figures. They are not investment advice.
KEEP EXPLORING