# Screener.in Stock Scraper - Indian Stock Market Data (`fervent_bus/screenerin-scraper`) Actor

- **URL**: https://apify.com/fervent\_bus/screenerin-scraper.md
- **Developed by:** [Archit Khurana](https://apify.com/fervent_bus) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 stocks

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Screener.in Stock Scraper - Indian Stock Market Data Extractor

Extract comprehensive financial data from Screener.in, India's premier stock screening platform. Built for AI agents, data analysts, and investors using Claude, ChatGPT, and automated workflows via Apify MCP.

### Features

- **Comprehensive Stock Data**: Market cap, P/E ratios, book value, dividend yield, ROE/ROCE metrics
- **Quarterly Financial Results**: Last 4 quarters of sales, profit, and operating metrics
- **Flexible Screening**: Works with any Screener.in screen URL - sector screens, custom filters, value stocks
- **AI-Ready Output**: Clean JSON format compatible with Claude Code, ChatGPT, and AI agent pipelines
- **Fast & Reliable**: HTTP-based extraction, no browser overhead, LIGHT protection

### Input Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `screenUrl` | String | Yes | Screener.in screen URL (e.g., `https://www.screener.in/screens/1/All-Stocks/`) |
| `maxResults` | Integer | Yes | Maximum number of stocks to scrape (1-500, default: 50) |
| `proxyConfiguration` | Object | No | Apify proxy settings (residential recommended) |

### Output Schema

```json
{
  "url": "https://www.screener.in/company/AQYLON/",
  "companyName": "Aqylon Nexus Ltd",
  "marketCap": "₹ 1,234 Cr.",
  "currentPrice": "₹ 456",
  "stockPE": "23.4",
  "bookValue": "₹ 123",
  "dividendYield": "1.2%",
  "roe": "15.3%",
  "quarterlyResults": [
    {"Period": "Mar 2026", "Sales": "234", "Net Profit": "45"},
    ...
  ],
  "scrapedAt": "2026-09-25T22:48:00.000Z"
}
```

### Use Cases

1. **AI-Powered Stock Research**: Feed data into Claude/ChatGPT for investment analysis and recommendations
2. **Portfolio Screening**: Identify undervalued stocks using P/E, book value, and ROE filters
3. **Quarterly Trend Analysis**: Track revenue and profit trends across sectors
4. **MCP Integration**: Use with Apify MCP server for real-time stock data in AI agent workflows
5. **Financial Dashboards**: Build automated reporting on Indian equity markets
6. **Value Investing**: Screen for low P/E, high dividend yield stocks
7. **Sector Comparison**: Compare metrics across IT, pharma, banking, and manufacturing sectors

### Popular Screener.in Screens

- **All Stocks**: `https://www.screener.in/screens/1/All-Stocks/`
- **Value Stocks**: `https://www.screener.in/screens/71940/value-stocks/`
- **High Dividend**: `https://www.screener.in/screens/71944/high-dividend/`
- **Low P/E**: `https://www.screener.in/screens/71947/low-pe-stocks/`
- **IT Sector**: `https://www.screener.in/screens/71952/it-sector/`

### Pricing

- **Per Stock**: $0.005 (5 cents per 1000 stocks)
- **Startup Fee**: $0.05 per run
- **Example**: 100 stocks = $0.05 + (100 × $0.005) = $0.55

### AI Agent Integration

#### Claude Code / ChatGPT

```python
## Via Apify MCP
stocks = apify.run_actor("fervent_bus/screenerin-scraper", {
    "screenUrl": "https://www.screener.in/screens/1/All-Stocks/",
    "maxResults": 50
})

## Analyze with Claude
claude.ask(f"Which of these stocks are undervalued? {stocks}")
```

#### API Call

```bash
curl -X POST "https://api.apify.com/v2/acts/fervent_bus~screenerin-scraper/runs" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"screenUrl":"https://www.screener.in/screens/1/All-Stocks/","maxResults":50}'
```

### FAQ

**Q: Can I scrape custom screens?**\
A: Yes - any Screener.in URL works. Create your custom screen on screener.in, copy the URL, and pass it as `screenUrl`.

**Q: How current is the data?**\
A: Data is scraped live from Screener.in at runtime. Metrics reflect the current session's values.

**Q: Does it work with paid Screener.in accounts?**\
A: The scraper uses public Screener.in data. Premium features (detailed financials, alerts) require manual access.

**Q: Can I get historical data?**\
A: The actor extracts the last 4 quarters of financial results visible on company pages. For longer history, run periodically and store results.

**Q: Compatible with AI agents?**\
A: Yes - designed for Claude, ChatGPT, and MCP workflows. Output is clean JSON, no post-processing needed.

### Technical Details

- **Technology**: Python 3.11 + httpx + BeautifulSoup (no browser)
- **Protection Level**: LIGHT (government/financial site, stable selectors)
- **Proxy**: Apify residential proxy (auto-configured)
- **Runtime**: ~2-5 seconds per stock

### Support

Issues? Found a bug? Create an issue on [GitHub](https://github.com/roshtarg-cpu/screenerin-scraper) or contact via Apify platform.

***

*Compatible with Claude, ChatGPT & AI agents via Apify MCP. Built for automated stock research and investment analysis.*

# Actor input Schema

## `sector` (type: `string`):

Industry sector to filter stocks

## `minMarketCap` (type: `integer`):

Minimum market capitalization in crores

## `maxPE` (type: `number`):

Maximum price-to-earnings ratio (filter out overvalued stocks)

## `minDividendYield` (type: `number`):

Minimum dividend yield percentage

## `minROE` (type: `number`):

Minimum return on equity percentage

## `maxResults` (type: `integer`):

Maximum number of stocks to scrape

## `proxyConfiguration` (type: `object`):

Proxy settings

## Actor input object example

```json
{
  "sector": "All",
  "minMarketCap": 100,
  "maxPE": 25,
  "minDividendYield": 2,
  "minROE": 15,
  "maxResults": 3
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "sector": "All",
    "minMarketCap": 100,
    "maxPE": 25,
    "minDividendYield": 2,
    "minROE": 15,
    "maxResults": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("fervent_bus/screenerin-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "sector": "All",
    "minMarketCap": 100,
    "maxPE": 25,
    "minDividendYield": 2,
    "minROE": 15,
    "maxResults": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("fervent_bus/screenerin-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sector": "All",
  "minMarketCap": 100,
  "maxPE": 25,
  "minDividendYield": 2,
  "minROE": 15,
  "maxResults": 3
}' |
apify call fervent_bus/screenerin-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fervent_bus/screenerin-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/T3Vf1ICFEo3JDlOeo/builds/iRyoIU8GWmbxtUWNn/openapi.json
