{
  "openapi": "3.0.1",
  "info": {
    "title": "TradingView Scraper",
    "description": "Scrape TradingView screener, technical-analysis ratings, and quotes for stocks, crypto, forex, and futures. MCP-ready, $0.005 per result.",
    "version": "0.2",
    "x-build-id": "E6F25heb4nhePHl6h"
  },
  "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 scrape. 'screener' = scan a market for stocks/coins matching filters (returns ranked list). 'technicals' = TradingView's Strong-Buy→Strong-Sell gauge + RSI/MACD/Stochastic for specific symbols across timeframes. 'quotes' = price/change/volume/fundamentals snapshot for specific symbols. NOT a chart-image or news scraper.",
            "default": "screener"
          },
          "market": {
            "title": "Market",
            "enum": [
              "america",
              "crypto",
              "forex",
              "futures",
              "bond",
              "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",
              "saudiarabia",
              "turkey",
              "egypt",
              "southafrica",
              "russia",
              "poland"
            ],
            "type": "string",
            "description": "TradingView market to scan. 'america' = US stocks (NASDAQ/NYSE/AMEX). 'crypto' = all crypto pairs across exchanges. 'forex' = currency pairs. 'futures' = commodity/index futures. Other country codes scan that country's equities. Required for screener mode; ignored for technicals/quotes when symbols are tickers like 'NASDAQ:AAPL'.",
            "default": "america"
          },
          "symbols": {
            "title": "Symbols (for technicals/quotes; optional filter for screener)",
            "type": "array",
            "description": "Specific tickers like 'NASDAQ:AAPL', 'NYSE:TSLA', 'BINANCE:BTCUSDT', 'FX:EURUSD'. Free-text names like 'apple' or 'bitcoin' auto-resolve to the primary exchange. Required for 'technicals' and 'quotes' modes. Optional for 'screener' (when set, screener filters to only 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. 'volume' = today's volume. 'change' = % price change. 'Recommend.All' = TradingView gauge score. 'RSI' = relative-strength index. Ignored in technicals/quotes. Default 'market_cap_basic'.",
            "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": 500,
            "type": "integer",
            "description": "Caps total dataset rows AND total PPE billing for the run. Screener mode returns top-N by sortBy. Technicals/quotes return min(maxResults, symbols.length). Hard cap 500 per run to stay polite to TradingView's endpoint.",
            "default": 50
          },
          "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}