{
  "openapi": "3.0.1",
  "info": {
    "title": "StockTwits Messages & Sentiment Scraper",
    "description": "StockTwits Messages & Sentiment Scraper extracts StockTwits messages of any ticker or user with bullish / bearish sentiment, likes, replies, price targets and author stats, plus trending symbols and a watchlist sentiment monitor. No login.",
    "version": "1.0",
    "x-build-id": "3KdXeCjjqNG0d3ffN"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/neuro-scraper~stocktwits-messages-sentiment-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-neuro-scraper-stocktwits-messages-sentiment-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/neuro-scraper~stocktwits-messages-sentiment-scraper/runs": {
      "post": {
        "operationId": "runs-sync-neuro-scraper-stocktwits-messages-sentiment-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/neuro-scraper~stocktwits-messages-sentiment-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-neuro-scraper-stocktwits-messages-sentiment-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "symbol",
              "user",
              "trending",
              "trending-symbols",
              "monitor"
            ],
            "type": "string",
            "description": "What to collect. symbol: messages of the symbols (and of the usernames, if given); user: posts of the usernames; trending: the trending message stream; trending-symbols: the 30 trending tickers; monitor: one sentiment snapshot per symbol, compared with the previous run.",
            "default": "symbol"
          },
          "symbols": {
            "title": "Symbols",
            "type": "array",
            "description": "Tickers, one per line (AAPL, TSLA, BTC.X, $NVDA).",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Optional: StockTwits usernames whose posts to collect.",
            "items": {
              "type": "string"
            }
          },
          "maxMessagesPerSymbol": {
            "title": "Max messages per symbol / user",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Messages per symbol or user (30 per page, older pages follow the cursor). In monitor mode: the most messages read per symbol for one snapshot.",
            "default": 100
          },
          "maxItems": {
            "title": "Max rows in total",
            "minimum": 0,
            "maximum": 10000000,
            "type": "integer",
            "description": "Optional: stop the run after this many rows. 0 = no limit.",
            "default": 0
          },
          "includeTrendingSymbols": {
            "title": "Add trending symbols",
            "type": "boolean",
            "description": "Also save the trending tickers (rank, trending score, sector, industry) as rows.",
            "default": false
          },
          "maxTrendingSymbols": {
            "title": "Max trending symbols",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many trending symbols to save (StockTwits lists 30).",
            "default": 30
          },
          "sentimentFilter": {
            "title": "Sentiment",
            "enum": [
              "all",
              "Bullish",
              "Bearish",
              "untagged"
            ],
            "type": "string",
            "description": "Keep all messages, only the ones their author tagged Bullish or Bearish, or only untagged ones.",
            "default": "all"
          },
          "onlyPriceTargets": {
            "title": "Only messages with a price target",
            "type": "boolean",
            "description": "Keep only messages that carry a price target.",
            "default": false
          },
          "computeSentiment": {
            "title": "Computed sentiment",
            "type": "boolean",
            "description": "Also score every message's text as Bullish / Bearish / Neutral with a word list (fills computedSentiment, and sentimentScore for untagged messages).",
            "default": true
          },
          "dateFrom": {
            "title": "Messages from",
            "type": "string",
            "description": "Optional: stop paging at the first message older than this date."
          },
          "beforeMessageId": {
            "title": "Older than message id",
            "type": "integer",
            "description": "Optional: start below this message id (continue an earlier export)."
          },
          "sinceMessageId": {
            "title": "Newer than message id",
            "type": "integer",
            "description": "Optional: only messages newer than this id (incremental runs)."
          },
          "windowMinutes": {
            "title": "Monitor window (minutes)",
            "minimum": 5,
            "maximum": 10080,
            "type": "integer",
            "description": "Monitor mode: the time window of one snapshot.",
            "default": 60
          },
          "thresholds": {
            "title": "Monitor thresholds",
            "type": "object",
            "description": "Monitor mode: {\"sentimentShiftPoints\": 20, \"volumeSpikeRatio\": 2} - a change of at least this many bullish-percent points, or this volume ratio, is a signal.",
            "default": {
              "sentimentShiftPoints": 20,
              "volumeSpikeRatio": 2
            }
          },
          "outputMode": {
            "title": "Monitor output",
            "enum": [
              "signalsOnly",
              "allSnapshots"
            ],
            "type": "string",
            "description": "Monitor mode: save only symbols with a signal, or a snapshot of every symbol.",
            "default": "signalsOnly"
          },
          "emitBaseline": {
            "title": "Save the first snapshot",
            "type": "boolean",
            "description": "Monitor mode: on the first run of a symbol (no previous snapshot), save its baseline row.",
            "default": true
          },
          "topMessages": {
            "title": "Top messages per snapshot",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Monitor mode: the most-liked messages kept in each snapshot.",
            "default": 3
          },
          "monitorId": {
            "title": "Monitor name",
            "type": "string",
            "description": "Monitor mode: the name under which the previous snapshots are kept (one name per watchlist).",
            "default": "default-watchlist"
          },
          "resetState": {
            "title": "Reset monitor",
            "type": "boolean",
            "description": "Monitor mode: forget the previous snapshots of this monitor name.",
            "default": false
          },
          "includeRaw": {
            "title": "Raw record",
            "type": "boolean",
            "description": "Also save the complete original message record in the raw column.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Symbols in parallel",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many symbol / user streams are read at the same time, each with its own session and IP. 3 is fast and polite.",
            "default": 3
          },
          "timeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "How long one request may take before it is retried on a fresh session (3 tries per request).",
            "default": 40
          },
          "continueOnError": {
            "title": "Continue when a symbol fails",
            "type": "boolean",
            "description": "On (default): a symbol whose stream gets no answer is logged and the other symbols go on. Off: after the first failed stream no new symbol is started, rows already saved are kept, and the run ends as FAILED so your integration notices.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxy is the default and recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          },
          "maxMessages": {
            "title": "Max messages (alias)",
            "type": "integer",
            "description": "Same as maxMessagesPerSymbol."
          },
          "maxMessagesPerTarget": {
            "title": "Max per target (alias)",
            "type": "integer",
            "description": "Same as maxMessagesPerSymbol."
          },
          "maxSymbols": {
            "title": "Max symbols (alias)",
            "type": "integer",
            "description": "Same as maxTrendingSymbols."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}