{
  "openapi": "3.0.1",
  "info": {
    "title": "Finnhub Stock Market Data",
    "description": "Pull real-time stock quotes, historical OHLCV candles, company profiles, financial metrics, earnings calendars, company news, and symbol lookups for any publicly traded stock, cryptocurrency, or forex pair -- all powered by the [Finnhub](https://finnhub.io/) financial data API.",
    "version": "2.6",
    "x-build-id": "dDJmSXmGD9s6tfe9B"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~finnhub-stock-data/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-finnhub-stock-data",
        "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/ryanclinton~finnhub-stock-data/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-finnhub-stock-data",
        "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/ryanclinton~finnhub-stock-data/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-finnhub-stock-data",
        "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": {
          "apiKey": {
            "title": "Finnhub API Key",
            "type": "string",
            "description": "Free API key from finnhub.io (sign up at https://finnhub.io/register)"
          },
          "mode": {
            "title": "Data Mode",
            "enum": [
              "quote",
              "candles",
              "profile",
              "news",
              "search",
              "earnings",
              "metrics",
              "snapshot",
              "monitor",
              "command-center",
              "compare-watchlists"
            ],
            "type": "string",
            "description": "What data to retrieve",
            "default": "quote"
          },
          "symbols": {
            "title": "Stock Symbols",
            "maxItems": 200,
            "type": "array",
            "description": "Stock ticker symbols (e.g. AAPL, MSFT, TSLA). For crypto use format BINANCE:BTCUSDT",
            "default": [
              "AAPL",
              "MSFT",
              "GOOGL"
            ],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Search term for symbol lookup (search mode only)"
          },
          "resolution": {
            "title": "Candle Resolution",
            "enum": [
              "1",
              "5",
              "15",
              "30",
              "60",
              "D",
              "W",
              "M"
            ],
            "type": "string",
            "description": "Time resolution for candles",
            "default": "D"
          },
          "daysBack": {
            "title": "Days Back",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "Number of days of historical data for candles/news",
            "default": 30
          },
          "outputProfile": {
            "title": "Output Profile",
            "enum": [
              "minimal",
              "standard",
              "full"
            ],
            "type": "string",
            "description": "How much detail per record. 'standard' (default) returns all data + intelligence; 'full' also includes the confidence object and extraction timestamps; 'minimal' returns only the symbol, the one-line summary, and the headline classification for each record.",
            "default": "standard"
          },
          "enablePeerComparison": {
            "title": "Peer comparison (metrics / snapshot)",
            "type": "boolean",
            "description": "Benchmark each symbol against its Finnhub peers: market-cap and P/E ranks plus a descriptive valuation-vs-peers position. Adds up to ~7 extra Finnhub calls per symbol (peers list + each peer's metrics), so it consumes more of your free-tier rate budget. Off by default.",
            "default": false
          },
          "screen": {
            "title": "Screen criteria (metrics / snapshot)",
            "type": "object",
            "description": "Tag each of YOUR symbols with whether it matches these criteria (this screens the symbols you supply; it does not discover new symbols from a universe). Keys: marketCapTier (mega/large/mid/small/micro/nano), peMax, peMin, betaMax, dividendMin. Non-matching symbols stay in the output with screen.match=false."
          },
          "watchlistName": {
            "title": "Watchlist name (monitor / command-center)",
            "type": "string",
            "description": "Names the cross-run state store for monitor and command-center modes. Each name is an independent watchlist: run the same name on a schedule and the actor diffs each run against the last, emitting state transitions, event lifecycle, attention, drift, and accumulated memory. The first run for a name captures a baseline (every symbol is NEW). Defaults to 'default'.",
            "default": "default"
          },
          "watchlists": {
            "title": "Watchlists to compare (compare-watchlists mode)",
            "type": "array",
            "description": "Two or more watchlist names to rank by health. Each must have been run in monitor or command-center mode first (this mode reads stored state and makes no Finnhub calls). Returns the strongest watchlist plus improving/deteriorating lists.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}