{
  "openapi": "3.0.1",
  "info": {
    "title": "Stock Data Scraper — Stats, Financials, History & IPOs",
    "description": "Scrape stock data from StockAnalysis.com, no login: 100+ key statistics, quote overview, company profile, income statement, balance sheet, cash flow and ratios (annual or quarterly), daily price history, dividends, plus earnings and IPO calendars. US, Canadian and global tickers and ETFs.",
    "version": "0.1",
    "x-build-id": "daaoiV0irOXra9Aph"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yugenox~stockanalysis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yugenox-stockanalysis-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/yugenox~stockanalysis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-yugenox-stockanalysis-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/yugenox~stockanalysis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-yugenox-stockanalysis-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",
        "properties": {
          "tickers": {
            "title": "📈 Tickers",
            "type": "array",
            "description": "Stock or ETF symbols, one per line: AAPL, MSFT, BRK.B, SPY. For markets outside the US use EXCHANGE:SYMBOL as shown on stockanalysis.com (TSX:RY, LON:SHEL, ASX:BHP). StockAnalysis stock page URLs work too.",
            "items": {
              "type": "string"
            }
          },
          "sections": {
            "title": "Data per ticker",
            "type": "array",
            "description": "Which pages to read for every ticker. Each row in the dataset is one item (one statistics row, one fiscal period, one daily price, one dividend). ETFs have overview, price history and dividends.",
            "items": {
              "type": "string",
              "enum": [
                "overview",
                "statistics",
                "profile",
                "income-statement",
                "balance-sheet",
                "cash-flow-statement",
                "ratios",
                "history",
                "dividends"
              ],
              "enumTitles": [
                "Overview & quote (price, market cap, P/E, dividend, analyst target)",
                "Key statistics (100+ metrics: valuation, margins, short interest, ownership…)",
                "Company profile (sector, industry, employees, CEO, executives, CIK, ISIN)",
                "Income statement",
                "Balance sheet",
                "Cash flow statement",
                "Financial ratios",
                "Daily price history (OHLCV, about 6 months)",
                "Dividend history"
              ]
            },
            "default": [
              "overview",
              "statistics"
            ]
          },
          "period": {
            "title": "Statements period",
            "enum": [
              "annual",
              "quarterly"
            ],
            "type": "string",
            "description": "Annual: the trailing twelve months + the last 5 fiscal years. Quarterly: the last 20 quarters. Applies to the income statement, balance sheet, cash flow and ratios.",
            "default": "annual"
          },
          "historyLimit": {
            "title": "Price history: days per ticker",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Newest daily prices to keep per ticker. 0 = everything the page shows (about 6 months of trading days).",
            "default": 0
          },
          "calendars": {
            "title": "📅 Calendars",
            "type": "array",
            "description": "Market-wide lists, no tickers needed: the earnings calendar (date, before open / after close, EPS and revenue estimates, market cap), upcoming IPOs (date, price range, shares, deal size) and the 200 most recent IPOs (IPO price, current price, return).",
            "items": {
              "type": "string",
              "enum": [
                "earnings-calendar",
                "ipo-calendar",
                "recent-ipos"
              ],
              "enumTitles": [
                "Earnings calendar",
                "Upcoming IPOs",
                "Recent IPOs"
              ]
            }
          },
          "calendarFrom": {
            "title": "Calendar from",
            "type": "string",
            "description": "Only calendar entries on or after this date. If both dates are empty, the earnings calendar covers the next 7 days and the IPO lists are returned in full."
          },
          "calendarTo": {
            "title": "Calendar to",
            "type": "string",
            "description": "Only calendar entries on or before this date (the earnings calendar reaches about 6 weeks ahead)."
          },
          "minMarketCap": {
            "title": "Minimum market cap (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only calendar entries of companies at least this large, e.g. 10000000000 for $10B+. Entries without a market cap are left out when this is set."
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 0,
            "maximum": 500000,
            "type": "integer",
            "description": "Maximum number of rows for the whole run (tickers first, then calendars). 0 = no limit.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy (datacenter) is the default and comes with every Apify plan. If StockAnalysis refuses datacenter IPs for a while, the run switches to residential proxies when your account has them.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}