{
  "openapi": "3.0.1",
  "info": {
    "title": "TradingView Scraper: Screener, Technicals & Quotes API",
    "description": "Scan stocks, crypto, forex, futures & CFDs on TradingView. Preset scans, filters, Buy/Sell technicals, quotes, fundamentals, news. Up to 5,000 rows a run.",
    "version": "0.4",
    "x-build-id": "A8mhQpBWa5jEtRNeF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~tradingview-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-tradingview-scraper",
        "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/khadinakbar~tradingview-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-tradingview-scraper",
        "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/khadinakbar~tradingview-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-tradingview-scraper",
        "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": "Scrape mode",
            "enum": [
              "screener",
              "technicals",
              "quotes"
            ],
            "type": "string",
            "description": "What to fetch. 'screener' = scan a whole market and return the top N rows by a sort column. 'technicals' = Strong Buy to Strong Sell gauge plus RSI/MACD/Stochastic for named symbols across timeframes. 'quotes' = price, volume, performance and fundamentals snapshot for named symbols. Not a chart-image scraper.",
            "default": "screener"
          },
          "market": {
            "title": "Market",
            "enum": [
              "america",
              "crypto",
              "forex",
              "futures",
              "cfd",
              "coin",
              "uk",
              "germany",
              "france",
              "italy",
              "spain",
              "switzerland",
              "netherlands",
              "australia",
              "canada",
              "brazil",
              "mexico",
              "argentina",
              "japan",
              "china",
              "hongkong",
              "india",
              "korea",
              "taiwan",
              "singapore",
              "indonesia",
              "malaysia",
              "thailand",
              "vietnam",
              "philippines",
              "uae",
              "ksa",
              "turkey",
              "egypt",
              "rsa",
              "russia",
              "poland"
            ],
            "type": "string",
            "description": "Market to scan in screener mode. 'america' = US stocks. 'crypto' = crypto pairs. 'forex' = currency pairs. 'futures' = futures contracts (CME, ICE, NSE and more). 'cfd' = CFDs and indices. 'coin' = spot coins. 'ksa' = Saudi Arabia, 'rsa' = South Africa. Other values scan that country's stocks. Ignored in technicals/quotes when symbols are full tickers like 'NASDAQ:AAPL'.",
            "default": "america"
          },
          "preset": {
            "title": "Preset scan (screener only)",
            "enum": [
              "none",
              "top_gainers",
              "top_losers",
              "most_active",
              "unusual_volume",
              "oversold_rsi",
              "overbought_rsi",
              "strong_buy",
              "strong_sell",
              "high_dividend",
              "large_cap",
              "small_cap_gainers",
              "high_volatility"
            ],
            "type": "string",
            "description": "One-click scan applied to the chosen market in 'screener' mode. 'none' = no preset (sort by sortBy). Presets: top_gainers, top_losers, most_active, unusual_volume, oversold_rsi (RSI under 30), overbought_rsi (RSI over 70), strong_buy, strong_sell (TradingView technical rating), high_dividend (yield 5%+), large_cap, small_cap_gainers, high_volatility. A preset sets its own sort unless you choose a different sortBy. Your own filters are added on top.",
            "default": "none"
          },
          "filters": {
            "title": "Custom filters (screener only)",
            "type": "array",
            "description": "Extra rules in 'screener' mode, all combined with AND. Each rule is {\"field\": \"RSI\", \"operation\": \"lt\", \"value\": 30}. Operations: gt, gte, lt, lte, eq, neq, in_range (value is [min, max]), not_in_range, has, has_none_of, empty, nempty. Field = any TradingView column id such as RSI, market_cap_basic, price_earnings_ttm, dividends_yield_current, Recommend.All, Perf.1M. A rule that cannot be read is skipped with a note in SUMMARY.",
            "default": []
          },
          "symbols": {
            "title": "Symbols (for technicals/quotes; optional filter for screener)",
            "type": "array",
            "description": "Tickers like 'NASDAQ:AAPL', 'CME_MINI:ES1!', 'TVC:US10Y', 'BINANCE:BTCUSDT', 'FX:EURUSD'. Plain names like 'apple' or 'bitcoin' resolve to the main listing. Required for technicals and quotes. Optional in screener mode (limits the scan to these symbols). Up to 500 per run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "timeframes": {
            "title": "Timeframes (technicals mode)",
            "type": "array",
            "description": "Intervals for the buy/sell gauge and oscillators in 'technicals' mode. '1m','5m','15m','30m','1h','2h','4h','1d','1W','1M'. Each adds a separate Recommend.All gauge + RSI/MACD column to every row. Ignored in screener/quotes modes. Default ['1h','4h','1d','1W'] balances signal vs cost.",
            "default": [
              "1h",
              "4h",
              "1d",
              "1W"
            ],
            "items": {
              "type": "string"
            }
          },
          "minMarketCapUsd": {
            "title": "Min market cap (USD, screener only)",
            "minimum": 0,
            "type": "integer",
            "description": "Exclude symbols below this market cap in 'screener' mode. Example: 1000000000 = $1B floor. Set 0 to disable. Ignored in technicals/quotes. Use to filter penny stocks or microcap noise.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort field (screener only)",
            "enum": [
              "market_cap_basic",
              "volume",
              "change",
              "Recommend.All",
              "RSI",
              "close",
              "name"
            ],
            "type": "string",
            "description": "Column to sort screener results by. 'market_cap_basic' = market cap (stocks). 'volume' = traded volume. 'change' = % change. 'Recommend.All' = TradingView gauge. 'RSI'. 'close'. 'name'. Markets without market cap (futures, forex, crypto, coin, cfd) switch automatically to a sensible column (volume). Ignored in technicals/quotes.",
            "default": "market_cap_basic"
          },
          "sortOrder": {
            "title": "Sort order (screener only)",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Direction of sortBy. 'desc' = largest first. 'asc' = smallest first. Ignored in technicals/quotes.",
            "default": "desc"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum rows saved and billed for this run. Screener returns the top N by sortBy. Technicals/quotes return up to N of your symbols. Up to 5,000 per run. Memory is sized automatically from this number.",
            "default": 50
          },
          "includeNews": {
            "title": "Add recent news headlines",
            "type": "boolean",
            "description": "Attach the latest headlines to each saved row (title, source, publish time, link). Same price per result. Adds a few seconds per 8 symbols. Works best for stocks and crypto.",
            "default": false
          },
          "newsPerSymbol": {
            "title": "Headlines per symbol",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many headlines to attach per row when 'Add recent news headlines' is on. 1 to 10.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify proxy used for TradingView requests. Datacenter is sufficient (endpoint is public, no anti-bot). Override with residential only if you hit 429s from running massive bursts.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": []
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}