TradingView API: Screener and Symbol Data as JSON
Perceptlayer's TradingView API returns data from the TradingView site as JSON through three endpoints: symbol-search finds exchange-qualified symbols, screener-snapshot returns chosen columns for a list of symbols in one POST, and ideas lists published trading ideas for a symbol. Each successful call costs 1 credit. This guide walks through each endpoint with its recorded response, a snapshot script in Python and what a snapshot costs.
Which TradingView endpoints are there?
There are three endpoints, each answering one question: which symbol is this, what are its numbers right now, and what are people publishing about it. Two are GET requests and one, the screener snapshot, is a POST with a JSON body. Each successful call costs 1 credit, and failed calls cost nothing.
| Method | Path | Returns | Required | Optional | Credits |
|---|---|---|---|---|---|
GET |
/v1/tradingview/symbol-search |
Matching symbols with identifiers | text |
none | 1 |
POST |
/v1/tradingview/screener-snapshot |
Column values for a list of symbols | symbols, columns |
market, page, range |
1 |
GET |
/v1/tradingview/ideas |
Published ideas | none | symbol, sort, page |
1 |
The data is collected from publicly available sources and returned as found at the time of the call. It fits research, dashboards, screening pipelines and agents that need a reading on a symbol, not order execution. Nothing here is investment advice. If you're weighing TradingView's own products for developers, compare their terms and coverage yourself; this guide covers only the Perceptlayer endpoints.
Which parameters does each endpoint take?
The API documents types, required flags, length limits and allowed values, and nothing else, so this table lists exactly those and no defaults or page sizes. The screener's parameters go in a JSON body; the other two endpoints take query parameters. range on the screener is an object whose shape isn't documented, so leave it out until you've tested it in the playground.
| Endpoint | Parameter | Type | Required | Documented constraint |
|---|---|---|---|---|
symbol-search |
text |
string | yes | Up to 100 characters |
screener-snapshot |
symbols |
list of strings | yes | None documented |
screener-snapshot |
columns |
list of strings | yes | Up to 100 characters |
screener-snapshot |
market |
string | no | One of global, america, crypto, forex, bond, futures, coin, economics2, cfd |
screener-snapshot |
page |
integer | no | None documented |
screener-snapshot |
range |
object | no | None documented |
ideas |
symbol |
string | no | None documented |
ideas |
sort |
string | no | One of trending, recent, latest_popular, week_popular, suggested, recent_extended, picked_time |
ideas |
page |
integer | no | None documented |
The TradingView API page has a playground for each endpoint, so you can try a body or a sort value with your key before you script it.
How do you find the exchange-qualified symbol?
Call symbol-search with a name or ticker in text, then take full_id from the result you want. The recorded search for apple returns NASDAQ:AAPL first and NYSE:APLE second, and the recorded screener and ideas requests both use NASDAQ:AAPL. So full_id is the value to carry into the other two endpoints.
curl "https://api.perceptlayer.com/v1/tradingview/symbol-search?text=apple" \
-H "X-API-Key: $API_KEY"
{
"data": {
"symbols": [
{
"symbol": "AAPL",
"description": "Apple Inc.",
"type": "stock",
"exchange": "NASDAQ",
…
"cusip": "037833100",
"isin": "US0378331005",
"cik_code": "0000320193",
"currency_code": "USD",
…
"country": "US",
"is_primary_listing": true,
"typespecs": [
"common"
],
"full_id": "NASDAQ:AAPL"
},
{
"symbol": "APLE",
"description": "Apple Hospitality REIT, Inc.",
…
"full_id": "NYSE:APLE"
}
],
"symbols_remaining": 1009,
"count": 50
},
"success": true,
…
}
Two things make this endpoint useful beyond lookup. The isin, cusip and cik_code fields let you join a symbol to other datasets that key on those identifiers. And is_primary_listing plus type let you drop secondary listings and non-stock matches before they reach a screener list. The recording reports count 50 and symbols_remaining 1009 for this search, so a broad term matches far more than the first response holds.
How do you take a screener snapshot?
Send a POST with a JSON body naming the symbols and the columns you want. The response returns one row per symbol with its values. This is the recorded request for close, volume and market cap of AAPL and MSFT, which cost 1 credit:
curl -X POST "https://api.perceptlayer.com/v1/tradingview/screener-snapshot" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"symbols":["NASDAQ:AAPL","NASDAQ:MSFT"],"columns":["close","volume","market_cap_basic"]}'
{
"data": {
"totalCount": 2,
"data": [
{
"s": "NASDAQ:AAPL",
"d": [
351.91,
37407537
]
},
…
],
"rows": [
{
"symbol": "NASDAQ:AAPL",
"values": {
"close": 351.91,
"volume": 37407537,
"market_cap_basic": 5114020023456.405
}
},
{
"symbol": "NASDAQ:MSFT",
"values": {
"close": 506.24,
"volume": 27992069,
"market_cap_basic": 3759436549748.795
}
}
],
"columns": [
"close",
"volume"
],
"range": [
0,
50
]
},
"success": true,
…
}
Why read rows instead of d?
The response holds the values twice: as positional arrays in data[].d, with names in columns, and as named objects in rows[].values. In the recording, the request named three columns, rows carried all three, and d and columns carried only close and volume. Reading by name from rows keeps market_cap_basic and doesn't depend on array order. Check totalCount against the number of symbols you sent, so a symbol that didn't resolve doesn't vanish silently.
What about range and page?
The response's range came back as [0, 50], and the endpoint takes optional range and page parameters; the names match, but the API documents neither the shape of range nor how page applies. For a list of a few dozen symbols you can leave both out. For longer lists, test in the playground before relying on either.
What does a snapshot give a quant or an agent?
A snapshot is a point-in-time table: one row per symbol, one value per column, from a single call. For a quant, that's a cheap way to capture the same columns for a fixed universe on a schedule and build your own history. For an agent, it's one tool call that answers "what are these symbols at right now" without a loop over tickers.
The column names are the identifiers you pass in columns. The recording confirms close, volume and market_cap_basic; test any other name in the playground and check that it appears in rows[].values before you depend on it. Values are numbers, so they store as they are. Log the time of each call next to the rows, because the response itself carries no timestamp in the recording.
Through the MCP server at https://perceptlayer.com/mcp, an agent can find the endpoint with search_endpoints, read its parameters with get_endpoint (both free), then run it with call_endpoint. The AI agents docs cover setup.
How do you read published ideas?
Call ideas with a symbol and a sort, and you get a page of published ideas with titles, timestamps, engagement counts and a sentiment value. Ideas are opinions posted by users. They work as attention and sentiment data, such as how many ideas a symbol drew this week and how they lean, not as guidance. The response also includes a block about each idea's author; this guide leaves it out, and you should only store it if you have a reason to.
curl "https://api.perceptlayer.com/v1/tradingview/ideas?symbol=NASDAQ%3AAAPL&sort=recent&page=1" \
-H "X-API-Key: $API_KEY"
{
"data": {
"ideas": [
…
{
"id": 24117154,
"name": "AAPL: 56% Call Premium as Price Holds Above the 20-Day SMA",
…
"created_at": "2026-11-17T18:52:40+00:00",
"chart_url": "https://www.tradingview.com/chart/AAPL/7thlYz5m-AAPL-56-Call-Premium-as-Price-Holds-Above-the-20-Day-SMA/",
…
"comments_count": 0,
"views_count": 0,
"symbol": {
…
"full_name": "NASDAQ:AAPL",
…
"interval": "D",
…
},
…
"likes_count": 1,
"sentiment": "neutral",
"created_at_iso": "2026-11-17T18:52:40Z"
}
],
"count": 1000,
"page_size": 20,
"page_count": 50,
"page": 1,
"next": "https://www.tradingview.com/api/v1/ideas/?page=2&symbol=NASDAQ%3AAAPL&sort=recent"
},
"success": true,
…
}
In the recording, the two ideas have sentiment values long and neutral, and symbol.interval values 240 and D. The response reports page_size 20 and page_count 50 for this call, and next contains page=2; the endpoint takes a page parameter, so the names match. Each extra page is another call at 1 credit. De-duplicate on id when you collect daily.
How do you run a daily snapshot in Python?
The script below takes one screener snapshot of a fixed list, writes a row per symbol, then counts the latest ideas by sentiment for each symbol. It reads only fields that appear in the recorded responses and waits on 429 and 503 using Retry-After.
import csv
import datetime
import os
import time
from collections import Counter
import requests
API_KEY = os.environ["API_KEY"]
BASE = "https://api.perceptlayer.com/v1/tradingview"
HEADERS = {"X-API-Key": API_KEY}
SYMBOLS = ["NASDAQ:AAPL", "NASDAQ:MSFT"]
COLUMNS = ["close", "volume", "market_cap_basic"]
def call(method, path, **kwargs):
for _ in range(3):
r = requests.request(method, f"{BASE}/{path}", headers=HEADERS, timeout=60, **kwargs)
if r.status_code in (429, 503):
time.sleep(int(r.headers.get("Retry-After", "5")))
continue
r.raise_for_status()
return r.json()["data"]
raise RuntimeError(f"gave up on {path}")
now = datetime.datetime.now(datetime.timezone.utc).isoformat(timespec="seconds")
snap = call("POST", "screener-snapshot", json={"symbols": SYMBOLS, "columns": COLUMNS})
if snap.get("totalCount") != len(SYMBOLS):
print("expected", len(SYMBOLS), "rows, got", snap.get("totalCount"))
with open("snapshots.csv", "a", newline="") as f:
out = csv.writer(f)
for row in snap.get("rows", []):
values = row.get("values", {})
out.writerow([now, row.get("symbol")] + [values.get(c) for c in COLUMNS])
for symbol in SYMBOLS:
time.sleep(1)
ideas = call("GET", "ideas", params={"symbol": symbol, "sort": "recent", "page": 1})
counts = Counter(i.get("sentiment") for i in ideas.get("ideas", []))
print(now, symbol, dict(counts))
The pause keeps the script within the free tier's 1 request a second; paying accounts run at least 5. Errors come back with an HTTP status and a JSON body with code, message and request_id, and the errors docs list every code. Requests have no idempotency key, so a client timeout can hide a call that succeeded and was billed.
What does a TradingView snapshot cost?
Each snapshot is one call and 1 credit, whether it covers one symbol or the list you send. Ideas cost 1 credit per symbol per page, and a symbol search costs 1 credit once per new symbol. Multiply by how often you run, and that's the bill in credits.
| Job | Arithmetic | Credits a month |
|---|---|---|
| Symbol lookups for a 10-symbol list | 10 × 1 credit | 10 (once) |
| Daily snapshot | 1 call × 30 days × 1 credit | 30 |
| Hourly snapshot | 24 calls × 30 days × 1 credit | 720 |
| Daily ideas, first page, 10 symbols | 10 × 30 days × 1 credit | 300 |
| Hourly snapshot plus daily ideas | 720 + 300 | 1,020 |
The 100 free credits on signup cover the lookups and three months of a daily snapshot, or the lookups and almost four days of the hourly snapshot. At 1,020 credits a month, the Starter pack's 10,000 credits last nine full months; purchased credits last 12 months. See pricing for what credits cost and the credits docs for how debits work.
To try it, run symbol-search and then a screener-snapshot in the playground on the screener snapshot endpoint page, then get a free API key. Other market data sources are listed under finance APIs.
APIs in this post
Frequently asked questions
How much does a TradingView API call cost?
Each successful call to symbol-search, screener-snapshot or ideas costs 1 credit. Failed calls cost nothing and return X-Credits-Used: 0. A screener snapshot covers the whole list of symbols you send in one call, so a daily snapshot is 30 credits a month. Every response carries X-Credits-Used and X-Credits-Remaining so a job can log its spend.
Which columns can the screener snapshot return?
You name them in the columns list. The recorded call used close, volume and market_cap_basic, and all three came back in rows[].values. The API documents no list of column names, so test any other name in the playground and confirm it appears in rows[].values before you build on it. Read values by name, not by position.
What symbol format do the endpoints expect?
Use the exchange-qualified full_id that symbol-search returns, such as NASDAQ:AAPL. The recorded screener request sends NASDAQ:AAPL and NASDAQ:MSFT in symbols, and the recorded ideas request sends NASDAQ:AAPL in symbol. Searching first also gives you isin, cusip and cik_code for joining with other data.
Is the data real time?
The data is collected from publicly available sources and returned as found at the time of the call. The recorded snapshot response carries no timestamp, so log the time of each call yourself. Use the API for research, screening and agents, not for order execution, and treat published ideas as opinions rather than guidance.
How fast can I take snapshots?
Request rates are per account, shared by all its keys, and counted per minute. Free accounts get 1 request a second, 60 a minute; paying accounts run at least 5 a second, depending on the pack. Responses carry RateLimit-Remaining and RateLimit-Reset, and a 429 carries Retry-After. The rate limits docs have the details.