# Stock Screener (TradingView Scanner) (`automatic/tradingview-screener`) Actor

Stock screener built on TradingView's market scanner, across 58 country markets: filter by market cap, P/E, change, volume and more, by exchange list or ticker watchlist. One quote record per symbol: price, change, volume, valuation metrics. No account needed. Fresh every run.

- **URL**: https://apify.com/automatic/tradingview-screener.md
- **Developed by:** [Philip Kirkbride](https://apify.com/automatic) (community)
- **Categories:** Business
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 result rows

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## TradingView Stock Screener

### Quick Start

Screen stocks with TradingView screener data: metric filters, exchange lists, or an `EXCHANGE:TICKER` watchlist, returning one unified quote record per symbol.
Use it for market research, watchlist snapshots, and country-by-country screens.
Start with this minimal input:

```json
{"market": "america", "exchanges": ["NYSE", "NASDAQ"], "filters": [{"field": "market_cap_basic", "operation": "greater", "value": 100000000000}], "maxResults": 50}
```

### Input

| Name | Type | Default | What it does |
| --- | --- | --- | --- |
| `market` | string | `america` | Country market to screen (`america` covers all US exchanges; also `uk`, `india`, `brazil`, `peru`, and dozens more). |
| `filters` | array | `[]` | Metric filters, ANDed: `{"field": "market_cap_basic", "operation": "greater", "value": 1000000000}`. Operations: `equal`, `greater`, `less`, `in_range` (value = `[lo, hi]`). |
| `exchanges` | array | `[]` | Restrict to exchange codes, e.g. `["NYSE", "NASDAQ"]`. Composes with filters. |
| `symbols` | array | `[]` | Quotes for exactly these `EXCHANGE:TICKER` pairs (e.g. `["NASDAQ:AAPL", "NYSE:JPM"]`). A bare `AAPL` matches nothing. |
| `extraColumns` | array | `[]` | Additional TradingView column ids (e.g. `["Perf.W", "total_revenue_ttm"]`) whose raw values ride in each record's `metrics`. |
| `sortBy` | string | `market_cap_basic` | Field the server sorts by before the cap. |
| `sortOrder` | string | `desc` | Sort direction. |
| `maxResults` | integer | `100` | Cap on emitted records (up to 5000). |

### Output

One dataset record per symbol: `recordKey`, `source`, `kind`, `market`, `symbol`, `ticker`, `exchange`, `name`, `price`, `changePct`, `changeAbs`, `volume`, `avgVolume10d`, `relVolume10d`, `marketCapUsd`, `peTTM`, `epsTTM`, `dividendYieldPct`, `sector`, `industry`, `beta1Y`, `currency`, `metrics` (raw passthrough of every requested column), `sourceUrl`, `collectedAt`.

### Output example

```json
{"recordKey":"tradingview:NASDAQ:AAPL","source":"tradingview","kind":"screener_row","market":"america","symbol":"AAPL","ticker":"NASDAQ:AAPL","exchange":"NASDAQ","name":"Apple Inc.","price":339.5,"changePct":-1.0031,"changeAbs":-3.44,"volume":35850955,"avgVolume10d":39244371,"relVolume10d":0.9263,"marketCapUsd":4954724039180,"peTTM":38.9188,"epsTTM":8.7566,"dividendYieldPct":0.3091,"sector":"Electronic Technology","industry":"Telecommunications Equipment","beta1Y":0.7189,"currency":"USD","metrics":{"name":"AAPL","description":"Apple Inc.","close":339.5,"change":-1.0031,"change_abs":-3.44,"volume":35850955,"average_volume_10d_calc":39244371,"relative_volume_10d_calc":0.9263,"market_cap_basic":4954724039180,"price_earnings_ttm":38.9188,"earnings_per_share_basic_ttm":8.7566,"dividends_yield_current":0.3091,"sector":"Electronic Technology","industry":"Telecommunications Equipment","beta_1_year":0.7189,"currency":"USD"},"sourceUrl":"https://www.tradingview.com/symbols/NASDAQ-AAPL/","collectedAt":"2026-10-21T03:28:35Z"}
```

The run summary (KeyValue store `OUTPUT`) reports the server-matched total, pages fetched, duplicates skipped, and warnings for requested symbols the screen did not return.

### Price

**$0.001 per result row**, plus **$0.005 per run start**. The run-start event is charged per GB of memory; the default 512 MB run is one start event. The start is charged even if the run saves no rows. A failed run saves no rows, so no rows are charged. When your maximum charge for the run is reached, the run stops and keeps the rows already saved. Platform usage is included in these prices.

### FAQ

**Which markets are supported?** 58 country markets, from `america` and `uk` to `india`, `brazil`, and `peru`. An unknown market fails with a clear error.

**Is historical data available?** No — each run returns current screener values. Historical candles are out of scope.

**Are prices real-time?** Prices match what TradingView's public screener shows without an account: delayed on most exchanges (for example 15 minutes for US, Indian and Brazilian stocks, 20 minutes for Japan and Korea), real-time where TradingView gives that publicly. Add `update_mode` to `extraColumns` to see each symbol's delay in `metrics`.

**What happens to a typo'd column id?** Unknown `extraColumns` ids come back as `null` values at their position, not an error. Unsupported filter operations are rejected up front.

**Are results stable across pages?** Tied sort keys can reorder between pages; the Actor de-duplicates by ticker, so no symbol appears twice in a run.

For support, contact Apify support and include the Actor run ID.

# Actor input Schema

## `market` (type: `string`):

Scanner market slug; 'america' is the all-US-exchanges aggregate. Unknown slugs are rejected.

## `filters` (type: `array`):

Server-side scanner filters, ANDed: metric thresholds like {"field": "market_cap_basic", "operation": "greater", "value": 1000000000} or {"field": "sector", "operation": "equal", "value": "Electronic Technology"}. Supported operations: equal, greater, less, in_range (value = \[lo, hi] pair of two numbers or two strings).

## `exchanges` (type: `array`):

Restrict to these exchange codes (e.g. \["NYSE", "NASDAQ", "OTC"]) — applied as one server-side exchange filter. Sugar for filters; compose with metric filters.

## `symbols` (type: `array`):

EXCHANGE:TICKER pairs (e.g. \["NASDAQ:AAPL", "NYSE:JPM"]) — quotes for exactly these symbols (a bare "AAPL" matches nothing). Composes with filters and exchanges.

## `extraColumns` (type: `array`):

Additional TradingView scanner column ids (e.g. \["Perf.W", "total_revenue_ttm"]) whose raw values ride in each record's metrics object. The default quote fields are always included; unknown column ids come back as null.

## `sortBy` (type: `string`):

TradingView field id the server sorts by before the maxResults cap (default market_cap_basic — deterministic-ish pages; ties can flip, rows are de-duplicated by ticker).

## `sortOrder` (type: `string`):

Direction of the server-side sort.

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

Cap on emitted quote records after the filter run (fetched in pages of 1000; boundary duplicates from server-side sort ties are de-duplicated).

## Actor input object example

```json
{
  "market": "america",
  "filters": [],
  "exchanges": [],
  "symbols": [],
  "extraColumns": [],
  "sortBy": "market_cap_basic",
  "sortOrder": "desc",
  "maxResults": 100
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "market": "america",
    "filters": [],
    "exchanges": [],
    "symbols": [],
    "extraColumns": [],
    "sortBy": "market_cap_basic",
    "sortOrder": "desc",
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("automatic/tradingview-screener").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 = {
    "market": "america",
    "filters": [],
    "exchanges": [],
    "symbols": [],
    "extraColumns": [],
    "sortBy": "market_cap_basic",
    "sortOrder": "desc",
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("automatic/tradingview-screener").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 '{
  "market": "america",
  "filters": [],
  "exchanges": [],
  "symbols": [],
  "extraColumns": [],
  "sortBy": "market_cap_basic",
  "sortOrder": "desc",
  "maxResults": 100
}' |
apify call automatic/tradingview-screener --silent --output-dataset

```

## MCP server setup

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

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/KjgtpcCcXgHmVCA47/builds/B8ZpQqFcV1q6xTZsW/openapi.json
