{
  "openapi": "3.0.1",
  "info": {
    "title": "Stock Screener (TradingView Scanner)",
    "description": "Stock screener built on TradingView's market scanner, across 58 country markets: filter by market cap, P/E, change, volume and more, by exchange list or ticker watchlist. One quote record per symbol: price, change, volume, valuation metrics. No account needed. Fresh every run.",
    "version": "0.1",
    "x-build-id": "B8ZpQqFcV1q6xTZsW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~tradingview-screener/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-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/automatic~tradingview-screener/runs": {
      "post": {
        "operationId": "runs-sync-automatic-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/automatic~tradingview-screener/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-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",
              "argentina",
              "australia",
              "austria",
              "bahrain",
              "belgium",
              "brazil",
              "canada",
              "chile",
              "china",
              "colombia",
              "czech",
              "denmark",
              "egypt",
              "estonia",
              "finland",
              "france",
              "germany",
              "greece",
              "hongkong",
              "hungary",
              "iceland",
              "india",
              "indonesia",
              "ireland",
              "israel",
              "japan",
              "kenya",
              "korea",
              "kuwait",
              "latvia",
              "lithuania",
              "luxembourg",
              "malaysia",
              "mexico",
              "morocco",
              "netherlands",
              "newzealand",
              "nigeria",
              "norway",
              "pakistan",
              "peru",
              "philippines",
              "poland",
              "portugal",
              "qatar",
              "russia",
              "singapore",
              "spain",
              "srilanka",
              "sweden",
              "switzerland",
              "taiwan",
              "thailand",
              "tunisia",
              "turkey",
              "uk",
              "vietnam"
            ],
            "type": "string",
            "description": "Scanner market slug; 'america' is the all-US-exchanges aggregate. Unknown slugs are rejected.",
            "default": "america"
          },
          "filters": {
            "title": "Metric filters",
            "maxItems": 25,
            "type": "array",
            "description": "Server-side scanner filters, ANDed: metric thresholds like {\"field\": \"market_cap_basic\", \"operation\": \"greater\", \"value\": 1000000000} or {\"field\": \"sector\", \"operation\": \"equal\", \"value\": \"Electronic Technology\"}. Supported operations: equal, greater, less, in_range (value = [lo, hi] pair of two numbers or two strings).",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "title": "Metric field",
                  "type": "string",
                  "description": "TradingView scanner field id, e.g. market_cap_basic, price_earnings_ttm, change, volume, sector, Perf.W."
                },
                "operation": {
                  "title": "Operation",
                  "type": "string",
                  "description": "Comparison operation: equal, greater, less or in_range.",
                  "enum": [
                    "equal",
                    "greater",
                    "less",
                    "in_range"
                  ]
                }
              },
              "required": [
                "field",
                "operation",
                "value"
              ],
              "additionalProperties": true
            },
            "default": []
          },
          "exchanges": {
            "title": "Exchanges",
            "maxItems": 50,
            "type": "array",
            "description": "Restrict to these exchange codes (e.g. [\"NYSE\", \"NASDAQ\", \"OTC\"]) — applied as one server-side exchange filter. Sugar for filters; compose with metric filters.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "symbols": {
            "title": "Symbol watchlist",
            "maxItems": 200,
            "type": "array",
            "description": "EXCHANGE:TICKER pairs (e.g. [\"NASDAQ:AAPL\", \"NYSE:JPM\"]) — quotes for exactly these symbols (a bare \"AAPL\" matches nothing). Composes with filters and exchanges.",
            "items": {
              "type": "string",
              "minLength": 3
            },
            "default": []
          },
          "extraColumns": {
            "title": "Extra metric columns",
            "maxItems": 50,
            "type": "array",
            "description": "Additional TradingView scanner column ids (e.g. [\"Perf.W\", \"total_revenue_ttm\"]) whose raw values ride in each record's metrics object. The default quote fields are always included; unknown column ids come back as null.",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "default": []
          },
          "sortBy": {
            "title": "Sort field",
            "type": "string",
            "description": "TradingView field id the server sorts by before the maxResults cap (default market_cap_basic — deterministic-ish pages; ties can flip, rows are de-duplicated by ticker).",
            "default": "market_cap_basic"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "description": "Direction of the server-side sort.",
            "default": "desc"
          },
          "maxResults": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on emitted quote records after the filter run (fetched in pages of 1000; boundary duplicates from server-side sort ties are de-duplicated).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}