{
  "openapi": "3.0.1",
  "info": {
    "title": "TradingView Scraper",
    "description": "Scrape TradingView's public scanner & symbol APIs with screen stocks / crypto / forex / futures, fetch ticker overviews, and run preset top-gainer / top-loser / most-active screens. Pure HTTP, no auth, no proxy.",
    "version": "1.0",
    "x-build-id": "Fx62yoEu7TqbQZGT0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~tradingview-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-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/crawlerbros~tradingview-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-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/crawlerbros~tradingview-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-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": "Mode",
            "enum": [
              "screenStocks",
              "screenCrypto",
              "screenForex",
              "screenFutures",
              "screenCommodities",
              "screenETFs",
              "screenBonds",
              "screenIndices",
              "byTicker",
              "searchSymbol",
              "topGainers",
              "topLosers",
              "mostActive",
              "byUrl"
            ],
            "type": "string",
            "description": "What to scrape from TradingView.",
            "default": "screenStocks"
          },
          "market": {
            "title": "Market / country",
            "enum": [
              "america",
              "uk",
              "canada",
              "germany",
              "france",
              "italy",
              "spain",
              "switzerland",
              "netherlands",
              "sweden",
              "norway",
              "denmark",
              "finland",
              "belgium",
              "austria",
              "poland",
              "russia",
              "turkey",
              "greece",
              "japan",
              "china",
              "hongkong",
              "korea",
              "taiwan",
              "india",
              "indonesia",
              "malaysia",
              "philippines",
              "singapore",
              "thailand",
              "vietnam",
              "australia",
              "newzealand",
              "brazil",
              "mexico",
              "argentina",
              "chile",
              "colombia",
              "peru",
              "venezuela",
              "saudiarabia",
              "uae",
              "israel",
              "egypt",
              "southafrica",
              "nigeria",
              "kenya"
            ],
            "type": "string",
            "description": "Country code for the stock scanner (mode=screenStocks / topGainers / topLosers / mostActive). For non-stock modes the market is implied by the mode.",
            "default": "america"
          },
          "tickers": {
            "title": "Tickers (mode=byTicker)",
            "type": "array",
            "description": "Symbols in `EXCHANGE:TICKER` form (e.g. `NASDAQ:AAPL`, `NYSE:JPM`). Plain `AAPL` is auto-prefixed with the market's primary exchange.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Symbol search query (mode=searchSymbol)",
            "type": "string",
            "description": "Free-text symbol-search query — returns the typeahead suggestions you'd see in the TradingView search box.",
            "default": "AAPL"
          },
          "url": {
            "title": "TradingView URL (mode=byUrl)",
            "type": "string",
            "description": "Any tradingview.com URL — `/symbols/EXCHANGE-TICKER/`, `/markets/<market>/`, etc. Auto-routes."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "market_cap_basic_desc",
              "market_cap_basic_asc",
              "volume_desc",
              "volume_asc",
              "change_desc",
              "change_asc",
              "Perf.W_desc",
              "Perf.W_asc",
              "Perf.1M_desc",
              "Perf.1M_asc",
              "Perf.YTD_desc",
              "Perf.YTD_asc",
              "Perf.Y_desc",
              "Perf.Y_asc",
              "RSI_desc",
              "RSI_asc",
              "price_earnings_ttm_asc",
              "price_earnings_ttm_desc",
              "dividends_yield_current_desc",
              "dividends_yield_current_asc",
              "name_asc",
              "name_desc"
            ],
            "type": "string",
            "description": "Column to sort the screener by.",
            "default": "market_cap_basic_desc"
          },
          "minMarketCap": {
            "title": "Min market cap (USD)",
            "minimum": 0,
            "maximum": 10000000000000,
            "type": "integer",
            "description": "Drop stocks with market cap below this value (e.g. 1_000_000_000 for large caps only)."
          },
          "maxMarketCap": {
            "title": "Max market cap (USD)",
            "minimum": 0,
            "maximum": 10000000000000,
            "type": "integer",
            "description": "Drop stocks with market cap above this value."
          },
          "minVolume": {
            "title": "Min daily volume",
            "minimum": 0,
            "maximum": 100000000000,
            "type": "integer",
            "description": "Drop symbols with daily volume below this value."
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Drop symbols with last price below this value."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "maximum": 1000000,
            "type": "number",
            "description": "Drop symbols with last price above this value."
          },
          "sectors": {
            "title": "Sector filter (mode=screenStocks)",
            "type": "array",
            "description": "Restrict to specific sectors (e.g. `Technology Services`, `Finance`, `Health Technology`). Empty = all sectors.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "containsKeyword": {
            "title": "Symbol or name contains",
            "type": "string",
            "description": "Substring filter (case-insensitive) against the symbol or company description."
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Hard cap on emitted records (1-2000).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}