# Screener.in (`shashwattrivedi/screener-in`)

Screener scraper for custom query

- **URL**: https://beta-securitybyobscurity.apify.com/shashwattrivedi/screener-in.md
- **Developed by:** [Shashwat Trivedi](https://beta-securitybyobscurity.apify.com/shashwattrivedi) (community)
- **Categories:** Automation
- **Stats:** 9 total users, 7 monthly users, 97.6% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

# README

## 📊 Screener.in Data Extractor

*Unlock the power of Indian stock market data with ease!*

Transform complex stock screening and company analysis into simple, automated data extraction. Whether you're a financial analyst, investor, or developer building trading applications, this Apify actor makes Indian stock market data accessible in just a few clicks.

### 🚀 What Can You Do?

#### 🔍 **Smart Stock Screening**

Run custom queries to find stocks that match your exact criteria:

- *"Market Cap > 10000 AND PE < 15"*
- *"ROE > 20 AND Debt to Equity < 0.5"*
- *"Sales Growth > 25 AND Current Ratio > 1.5"*

#### 📈 **Detailed Company Analysis**

Extract comprehensive financial data for any listed Indian company:

- Financial statements (P\&L, Balance Sheet, Cash Flow)
- Key ratios and metrics
- Peer comparisons
- Shareholding patterns

### ⚡ Two Simple Modes

#### Mode 1: `runQuery`

**Perfect for**: Finding stocks that match your investment criteria

**Required Inputs:**

```json
{
  "mode": "runQuery",
  "queryString": "Market Capitalization > 50000 AND Price to Earning < 20",
  "username": "your_screener_username",
  "password": "your_screener_password"
}
```

**What You Get:** A list of companies matching your filters with key metrics

***

#### Mode 2: `getstockdetails`

**Perfect for**: Deep-diving into a specific company's financials

**Required Inputs:**

```json
{
  "mode": "getstockdetails",
  "url": "https://www.screener.in/company/RELIANCE/"
}
```

**What You Get:** Complete financial profile including:

- 📊 Historical financial data
- 💹 Key performance ratios
- 👥 Shareholding patterns
- 🏢 Peer comparisons

### 🎯 Why Choose This Actor?

- **⚡ Lightning Fast**: Get results in seconds, not hours
- **🎯 Precise**: Query exactly what you need with flexible filters
- **📱 Ready-to-Use**: Clean, structured JSON output
- **🔒 Reliable**: Built for consistent performance
- **💡 Simple**: No complex setup - just run and get data

### 🌟 Perfect For

- **📈 Investment Research**: Screen stocks like a pro
- **🤖 Trading Bots**: Feed live data into your algorithms
- **📊 Portfolio Analysis**: Monitor your holdings effortlessly
- **🎓 Academic Research**: Access reliable financial data
- **📱 App Development**: Power your fintech applications

### 🚀 Quick Start

1. **Set your inputs** (mode + required parameters)
2. **Run the actor**
3. **Download your data** in clean JSON format
4. **Build something amazing!**

***

*Ready to supercharge your stock market analysis? Try it now and see the difference!*

### 📝 Notes

- Requires a Screener.in account for query mode
- All data sourced from Screener.in
- Output format: Clean, structured JSON
- No rate limits within reasonable usage

**Happy Investing! 📈**

# Actor input Schema

## `mode` (type: `string`):

Crawler mode

## `url` (type: `string`):

Used when mode is 'getstockdetails'

## `queryString` (type: `string`):

Used when mode is 'runQuery'

## `username` (type: `string`):

Used for login when mode is 'runQuery'

## `password` (type: `string`):

Used for login when mode is 'runQuery'

## Actor input object example

```json
{
  "mode": "getstockdetails",
  "url": "https://www.screener.in/company/TCS/consolidated/"
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("shashwattrivedi/screener-in").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("shashwattrivedi/screener-in").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{}' |
apify call shashwattrivedi/screener-in --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=shashwattrivedi/screener-in",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Screener.in",
        "description": "Screener scraper for custom query",
        "version": "0.0",
        "x-build-id": "1XmCLWfkIoPCAnUl8"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shashwattrivedi~screener-in/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shashwattrivedi-screener-in",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/shashwattrivedi~screener-in/runs": {
            "post": {
                "operationId": "runs-sync-shashwattrivedi-screener-in",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/shashwattrivedi~screener-in/run-sync": {
            "post": {
                "operationId": "run-sync-shashwattrivedi-screener-in",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Crawler mode",
                        "enum": [
                            "getstockdetails",
                            "runQuery"
                        ],
                        "type": "string",
                        "description": "Crawler mode",
                        "default": "getstockdetails"
                    },
                    "url": {
                        "title": "Company Page URL",
                        "type": "string",
                        "description": "Used when mode is 'getstockdetails'",
                        "default": "https://www.screener.in/company/TCS/consolidated/"
                    },
                    "queryString": {
                        "title": "Screen Query",
                        "type": "string",
                        "description": "Used when mode is 'runQuery'"
                    },
                    "username": {
                        "title": "Screener Username",
                        "type": "string",
                        "description": "Used for login when mode is 'runQuery'"
                    },
                    "password": {
                        "title": "Screener Password",
                        "type": "string",
                        "description": "Used for login when mode is 'runQuery'"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
