Home / Learn / How to Build a Stock Screener with an API
Guide

How to Build a Stock Screener with an API

Updated 2026-10-18

A stock screener filters the whole listed universe down to the names that match your criteria — say, large caps with a low P/E and a high ROE. Instead of scraping a screener website, you can run the same filters programmatically.

The screener endpoint

Call GET /v1/screener with one or more filter parameters. Each filter is a field, an operator, and a value — for example market cap above a threshold, P/E below a ceiling, or ROE above a floor. Combine several filters to narrow the universe, and paginate through the matches.

curl "https://bharatstockapi.com/v1/screener?filter=pe_ratio<20&filter=roe>15" -H "X-API-Key: bsk_live_..."

Fields you can filter on

The screener works over the same canonical metrics served everywhere else — market cap, P/E, P/B, ROE, ROCE, dividend yield, revenue growth, and liquidity aggregates like 30-day average turnover and delivery percentage. Because the values match the stock pages and the ratios endpoint, a result you screen for will show the same numbers when you drill into the stock.

From screen to detail

Each screener row returns the ticker and its metrics; follow up with /v1/stocks/{ticker} or the stock page for the full profile. See the screener reference for the complete list of filterable fields and operators.

More guides

How to Get NSE Quarterly Results via API

A developer's guide to fetching NSE & BSE quarterly and annual results programmatically — the endpoint, the fields, consolidation basis, and how to read the as-filed numbers correctly.

Read guide →

What Is the P/E Ratio (and How to Get It via API)

What the price-to-earnings ratio means, how it's calculated from price and EPS, the gotchas (negative earnings, consolidation basis), and how to fetch a stock's current P/E for any NSE/BSE company through an API.

Read guide →

How to Find Which Mutual Funds Hold a Stock (via API)

Find every mutual-fund scheme that holds a given NSE/BSE stock — quantity, market value, and % of AUM — built from AMFI and 40+ fund houses' own monthly portfolio disclosures, available as a REST API.

Read guide →

How to Get Indian Stock Prices via API (NSE & BSE EOD)

Fetch end-of-day OHLCV price history for any NSE or BSE stock via API — the endpoint, the fields, split/bonus adjustment, and how to build a clean price series.

Read guide →

ROE vs ROCE Explained (and How to Get Them via API)

What return on equity (ROE) and return on capital employed (ROCE) measure, how they differ, and how to fetch both for any Indian stock through a single API call.

Read guide →

How to Get a Company's Shareholding Pattern via API

Fetch the promoter, FII, DII, and public shareholding breakdown for any NSE/BSE company via API — straight from the SEBI quarterly disclosures.

Read guide →

How to Track Bulk Deals, Block Deals & Insider Trades via API

Follow the big trades — bulk deals, block deals, and SEBI insider/promoter (PIT) disclosures — for any Indian stock or market-wide, through a REST API.

Read guide →

NSE vs BSE: Which Ticker Should You Use with the API?

How ticker symbols work across NSE and BSE, why the same company can have two listings, and how to resolve names to the right ticker with the search API.

Read guide →

Try it with your own key

A free API key takes under a minute — no card required.

Get a free API key