{
  "openapi": "3.0.1",
  "info": {
    "title": "StockAnalysis.com Financials & ETF Data Scraper",
    "description": "Pull stock overviews, income statements, balance sheets, cash flow statements, ETF holdings, IPO calendar entries, and exchange stock lists from StockAnalysis.com by ticker, annual or quarterly period.",
    "version": "1.1",
    "x-build-id": "mLFv3TfQXhExJrvbR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vexaloom-labs~stockanalysis-com-financials-and-etf-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vexaloom-labs-stockanalysis-com-financials-and-etf-data-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/vexaloom-labs~stockanalysis-com-financials-and-etf-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-vexaloom-labs-stockanalysis-com-financials-and-etf-data-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/vexaloom-labs~stockanalysis-com-financials-and-etf-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-vexaloom-labs-stockanalysis-com-financials-and-etf-data-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": [
              "stockOverview",
              "financials",
              "statistics",
              "forecast",
              "dividends",
              "priceHistory",
              "etfOverview",
              "ipoCalendar",
              "earningsCalendar",
              "stockList",
              "screener",
              "search"
            ],
            "type": "string",
            "description": "What to collect. Each mode writes its own record type to the dataset.",
            "default": "stockOverview"
          },
          "tickers": {
            "title": "Tickers, exchange pairs, or URLs",
            "type": "array",
            "description": "Symbols for the per-ticker modes. Use AAPL or BRK.B for US listings, TSX:RY or LON:SHEL for other exchanges, or paste stockanalysis.com URLs. Ignored by ipoCalendar, stockList, screener and search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many dataset records. Price history rows, statement periods, screener rows and IPO rows each count as one record.",
            "default": 50
          },
          "financialType": {
            "title": "Statement type",
            "enum": [
              "income-statement",
              "balance-sheet",
              "cash-flow-statement",
              "ratios"
            ],
            "type": "string",
            "description": "Which statement to collect in financials mode.",
            "default": "income-statement"
          },
          "period": {
            "title": "Reporting period",
            "enum": [
              "annual",
              "quarterly"
            ],
            "type": "string",
            "description": "Annual rows include TTM plus five fiscal years; quarterly rows cover up to 20 quarters.",
            "default": "annual"
          },
          "includeTTM": {
            "title": "Include TTM row",
            "type": "boolean",
            "description": "Include the trailing-twelve-month column in annual statements when the site publishes it.",
            "default": true
          },
          "historyRange": {
            "title": "Price history range",
            "enum": [
              "6M",
              "YTD",
              "1Y",
              "5Y"
            ],
            "type": "string",
            "description": "How far back to collect daily prices. Five years is the largest range the public page exposes.",
            "default": "6M"
          },
          "ipoStatus": {
            "title": "IPO status",
            "enum": [
              "upcoming",
              "recent",
              "all"
            ],
            "type": "string",
            "description": "Recent, upcoming, or both. Upcoming deals may not have a scheduled date yet.",
            "default": "all"
          },
          "earningsStatus": {
            "title": "Earnings status",
            "enum": [
              "upcoming",
              "recent",
              "all"
            ],
            "type": "string",
            "description": "Upcoming reports, recent reports, or both. Used by earningsCalendar mode.",
            "default": "upcoming"
          },
          "earningsFrom": {
            "title": "Earnings from date",
            "type": "string",
            "description": "Earliest report date, YYYY-MM-DD. Leave empty for the default window."
          },
          "earningsTo": {
            "title": "Earnings to date",
            "type": "string",
            "description": "Latest report date, YYYY-MM-DD. Leave empty for the default window."
          },
          "stockListType": {
            "title": "Stock list",
            "enum": [
              "all-stocks",
              "mega-cap",
              "large-cap",
              "mid-cap",
              "small-cap",
              "micro-cap",
              "nano-cap",
              "nasdaq",
              "nyse",
              "amex",
              "all-etfs"
            ],
            "type": "string",
            "description": "A preset market-cap tier or exchange list. Ignored when Custom list is set.",
            "default": "large-cap"
          },
          "customList": {
            "title": "Custom list slug or URL",
            "type": "string",
            "description": "Any stockanalysis.com list, e.g. dividend-aristocrats, ai-stocks, canadian-stocks-us, or https://stockanalysis.com/list/dividend-aristocrats/. Overrides the preset list."
          },
          "screenerType": {
            "title": "Universe",
            "enum": [
              "stocks",
              "etfs"
            ],
            "type": "string",
            "description": "Screen US stocks or US ETFs.",
            "default": "stocks"
          },
          "search": {
            "title": "Search text",
            "type": "string",
            "description": "In screener mode: filter by ticker, company name, industry or sector. In search mode: the name or symbol to look up across US and international listings."
          },
          "exchange": {
            "title": "Exchange",
            "enum": [
              "",
              "NASDAQ",
              "NYSE",
              "NYSEAMERICAN",
              "NYSEARCA",
              "BATS",
              "TXSE"
            ],
            "type": "string",
            "description": "Filter the stock universe by exchange.",
            "default": ""
          },
          "sector": {
            "title": "Sector",
            "enum": [
              "",
              "Technology",
              "Financials",
              "Healthcare",
              "Consumer Discretionary",
              "Communication Services",
              "Industrials",
              "Consumer Staples",
              "Energy",
              "Utilities",
              "Real Estate",
              "Materials"
            ],
            "type": "string",
            "description": "Filter the stock universe by sector.",
            "default": ""
          },
          "industry": {
            "title": "Industry",
            "type": "string",
            "description": "Exact industry name, e.g. Semiconductors or Software - Infrastructure."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Exact country name, e.g. United States or Ireland."
          },
          "marketCapMin": {
            "title": "Market cap min (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep companies at or above this market capitalisation."
          },
          "marketCapMax": {
            "title": "Market cap max (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep companies at or below this market capitalisation."
          },
          "peRatioMin": {
            "title": "P/E min",
            "type": "number",
            "description": "Only keep companies at or above this trailing P/E ratio."
          },
          "peRatioMax": {
            "title": "P/E max",
            "type": "number",
            "description": "Only keep companies at or below this trailing P/E ratio."
          },
          "dividendYieldMin": {
            "title": "Dividend yield min (%)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep companies at or above this dividend yield, in percent."
          },
          "dividendYieldMax": {
            "title": "Dividend yield max (%)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep companies at or below this dividend yield, in percent."
          },
          "revenueMin": {
            "title": "Revenue min (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep companies at or above this trailing revenue."
          },
          "revenueMax": {
            "title": "Revenue max (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Only keep companies at or below this trailing revenue."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "marketCap",
              "price",
              "change",
              "volume",
              "peRatio",
              "revenue",
              "netIncome",
              "employees",
              "dividendYield",
              "eps",
              "beta",
              "priceTarget",
              "grossMargin",
              "profitMargin",
              "roe",
              "aum",
              "expenseRatio",
              "holdings"
            ],
            "type": "string",
            "description": "Screener sort column. Use any stockanalysis.com data-point id; these are the most common.",
            "default": "marketCap"
          },
          "sortDirection": {
            "title": "Sort direction",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Descending puts the largest values first.",
            "default": "desc"
          },
          "columns": {
            "title": "Extra screener columns",
            "type": "array",
            "description": "Optional stockanalysis.com data-point ids to add to every screener/stock-list record, e.g. revenueGrowth, shortFloat, roic. The scraper already adds a broad default set.",
            "default": [],
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}