{
  "openapi": "3.0.1",
  "info": {
    "title": "TradingView Stock Screener API - Filter Stocks and ETFs",
    "description": "Screen stocks and ETFs by market, market cap, P/E, sector, performance and volume. One typed JSON row per listing with quote, daily change and your selected statistics, for research pipelines, dashboards and watchlists. You pay per delivered row; an empty screen costs nothing.",
    "version": "0.1",
    "x-build-id": "ONsfvJhrZv508Dx7D"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s-r~tradingview-screener/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s-r-tradingview-screener",
        "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/s-r~tradingview-screener/runs": {
      "post": {
        "operationId": "runs-sync-s-r-tradingview-screener",
        "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/s-r~tradingview-screener/run-sync": {
      "post": {
        "operationId": "run-sync-s-r-tradingview-screener",
        "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",
        "properties": {
          "market": {
            "title": "Market",
            "enum": [
              "america",
              "netherlands",
              "uk",
              "brazil",
              "germany",
              "france",
              "japan",
              "china",
              "india",
              "korea",
              "australia",
              "canada",
              "hongkong",
              "global"
            ],
            "type": "string",
            "description": "Listing market, not company domicile. global searches all supported source markets.",
            "default": "america"
          },
          "instrument_type": {
            "title": "Instrument type",
            "enum": [
              "stocks",
              "etfs",
              "all"
            ],
            "type": "string",
            "description": "Stocks include depositary receipts. ETFs exclude other fund types.",
            "default": "stocks"
          },
          "filters": {
            "title": "Filters",
            "type": "array",
            "description": "AND conditions using native column names. Market cap is USD; close uses each instrument's raw quote unit. Sector labels are exact English source values.",
            "default": []
          },
          "columns": {
            "title": "Columns",
            "type": "array",
            "description": "Native source columns. Identity, quote, type and currency metadata are always added; optional output fields appear only when selected.",
            "default": [
              "name",
              "description",
              "close",
              "currency",
              "change",
              "volume",
              "market_cap_basic",
              "price_earnings_ttm",
              "sector",
              "Perf.1M"
            ],
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "title": "Limit",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum instrument rows in this call. Non-paying Apify users and BASIC API plans are capped at 10 before retrieval.",
            "default": 100
          },
          "offset": {
            "title": "Offset",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Zero-based source position. Continue using summary.next_offset with the same filters and sort.",
            "default": 0
          },
          "sort_by": {
            "title": "Sort by",
            "enum": [
              "name",
              "description",
              "type",
              "subtype",
              "exchange",
              "market",
              "close",
              "currency",
              "change",
              "change_abs",
              "volume",
              "market_cap_basic",
              "price_earnings_ttm",
              "sector",
              "industry",
              "country",
              "Perf.W",
              "Perf.1M",
              "Perf.3M",
              "Perf.6M",
              "Perf.Y",
              "Perf.YTD",
              "average_volume_10d_calc",
              "relative_volume_10d_calc",
              "earnings_per_share_basic_ttm",
              "earnings_per_share_diluted_ttm",
              "dividends_yield_current",
              "price_52_week_high",
              "price_52_week_low",
              "Recommend.All",
              "RSI",
              "AnalystRating",
              "update_mode",
              "time",
              "pricescale",
              "minmov",
              "fractional",
              "is_primary",
              "fundamental_currency_code",
              "aum",
              "expense_ratio",
              "etf_holdings_count",
              "nav_total_return.3Y",
              "asset_class.tr",
              "focus.tr"
            ],
            "type": "string",
            "description": "Native scalar column. Omitted defaults to market_cap_basic for stocks/all or volume for ETFs. Use name asc for repeatable walks."
          },
          "sort_order": {
            "title": "Sort order",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Ascending or descending source sort order.",
            "default": "desc"
          },
          "symbols": {
            "title": "Symbols",
            "type": "array",
            "description": "Full EXCHANGE:TICKER identifiers. Omitted or empty means no symbol restriction; market and filters still apply.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "primary_only": {
            "title": "Primary only",
            "type": "boolean",
            "description": "Require the source primary-listing flag. False retains secondary listings in the selected market.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}