{
  "openapi": "3.0.1",
  "info": {
    "title": "Stocktwits Scraper",
    "description": "Scrape Stocktwits for live stock & crypto messages, bullish/bearish sentiment, price targets, and trending symbols. Extract trader chatter and market mood — no API key. Export JSON/CSV for sentiment analysis, dashboards, and trading research.",
    "version": "1.1",
    "x-build-id": "rOOoe8GVdeQrLUYtu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/insights_data~stocktwits-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-insights_data-stocktwits-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/insights_data~stocktwits-scraper/runs": {
      "post": {
        "operationId": "runs-sync-insights_data-stocktwits-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/insights_data~stocktwits-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-insights_data-stocktwits-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": "🎯 Scraping mode",
            "enum": [
              "symbol",
              "user",
              "trending",
              "trending-symbols"
            ],
            "type": "string",
            "description": "What to scrape:<br>📈 <strong>symbol</strong> — messages for one or more stock/crypto tickers<br>👤 <strong>user</strong> — the public post history of one or more Stocktwits users<br>🔥 <strong>trending</strong> — the site-wide trending-messages feed<br>📊 <strong>trending-symbols</strong> — today's ranked trending tickers with AI summaries",
            "default": "symbol"
          },
          "symbols": {
            "title": "📈 Stock / crypto symbols",
            "type": "array",
            "description": "✨ One ticker per line, bulk-paste supported. Used in <strong>symbol</strong> mode. e.g. <code>AAPL</code>, <code>TSLA</code>. Crypto tickers need their own <code>.X</code> suffix — <code>BTC.X</code>, <code>ETH.X</code> (a bare <code>BTC</code> resolves to a different, non-crypto instrument, so it is never guessed for you). A leading <code>$</code> is stripped automatically.",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "👤 Stocktwits usernames",
            "type": "array",
            "description": "One username per line (no <code>@</code>), bulk-paste supported. Used in <strong>user</strong> mode.",
            "items": {
              "type": "string"
            }
          },
          "maxMessages": {
            "title": "🔢 Max messages / symbols",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many messages per symbol/user (or total, for trending & trending-symbols modes). <code>0</code> = unlimited, up to Stocktwits' own API limits. Start low (20-50) to test before scaling up.",
            "default": 20
          },
          "sentimentFilter": {
            "title": "💭 Sentiment filter",
            "enum": [
              "",
              "Bullish",
              "Bearish",
              "None"
            ],
            "type": "string",
            "description": "Only keep messages with this user-tagged sentiment. Leave on \"Any\" to keep everything. Roughly 30-50% of messages carry a sentiment tag at all.",
            "default": ""
          },
          "minLikes": {
            "title": "👍 Minimum likes",
            "minimum": 0,
            "type": "integer",
            "description": "Drop messages with fewer likes than this. Handy for surfacing only the higher-engagement posts.",
            "default": 0
          },
          "assetClassFilter": {
            "title": "🏷️ Asset class filter",
            "enum": [
              "",
              "STOCKS",
              "CRYPTO"
            ],
            "type": "string",
            "description": "Only keep messages about stocks or only about crypto, based on whether a message's symbols end in <code>.X</code>.",
            "default": ""
          },
          "filter": {
            "title": "🧵 Stream content filter",
            "enum": [
              "all",
              "top",
              "links",
              "charts",
              "videos"
            ],
            "type": "string",
            "description": "Narrow a symbol/user/trending stream to a specific content type before it's even paged through.",
            "default": "all"
          },
          "includeTrendingSymbolDetails": {
            "title": "🧠 Enrich with trending context",
            "type": "boolean",
            "description": "Tag every message with its primary symbol's current trending-list standing (rank, score, AI summary) — one extra request per run, shared across every target, not one per message.",
            "default": false
          },
          "onlyNewMessages": {
            "title": "🚦 Monitor mode — only new messages",
            "type": "boolean",
            "description": "Turn ON to only fetch messages newer than the last time this Actor ran with the same 'Monitor checkpoint name' below. Perfect for a scheduled run that checks in every few hours without re-scraping what it already saw.",
            "default": false
          },
          "monitorStoreName": {
            "title": "🗂️ Monitor checkpoint name",
            "type": "string",
            "description": "Name of the checkpoint that remembers the last-seen message per target between runs. Use a different name to track separate watchlists independently.",
            "default": "stocktwits-monitor"
          },
          "onlyPriceTargets": {
            "title": "🎯 Only messages with a price target",
            "type": "boolean",
            "description": "When ON, only messages carrying a Stocktwits Predict™ price-target prediction are saved. Every message is still scanned either way (there's no server-side filter for this) — it only changes what gets pushed to your dataset.",
            "default": false
          },
          "sinceId": {
            "title": "⏩ Resume after message ID",
            "type": "integer",
            "description": "Advanced: manually resume a single-target run forward from a specific message ID instead of starting from the newest message. Leave empty for normal use."
          },
          "maxId": {
            "title": "⏪ Resume before message ID",
            "type": "integer",
            "description": "Advanced: manually resume a single-target run backward (older messages) from a specific message ID. Leave empty for normal use."
          },
          "includeRawData": {
            "title": "🧩 Include raw API data",
            "type": "boolean",
            "description": "Attach the raw decoded message/symbol object to every record, verbatim — handy for power users and debugging, or if a field isn't mapped yet.",
            "default": false
          },
          "legacyKeyAliases": {
            "title": "🔤 Include snake_case key aliases",
            "type": "boolean",
            "description": "Also emit snake_case aliases (message_id, price_target, user_id, ...) alongside the primary camelCase keys, for pipelines expecting either style.",
            "default": true
          },
          "includeMeta": {
            "title": "📋 Include per-target progress records",
            "type": "boolean",
            "description": "Emit one bookkeeping record per target (recordType \"meta\") with scan counts and pagination status — visible in its own dataset view.",
            "default": true
          },
          "concurrency": {
            "title": "🧵 Targets in parallel",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "How many symbols/usernames are paginated at the same time.",
            "default": 5
          },
          "httpMaxConcurrency": {
            "title": "🌐 Global in-flight requests",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Hard cap on how many HTTP requests are ever in flight at once, across every target combined.",
            "default": 4
          },
          "requestDelaySecs": {
            "title": "🐢 Minimum delay between requests (seconds)",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "A polite minimum pace shared across every concurrent request. Raise this if you see a lot of retry/backoff activity in the log.",
            "default": 0.34
          },
          "maxRetries": {
            "title": "🔁 Max retries per request",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many times one failed/blocked request is retried (with backoff) before it's given up on. The residential proxy tier always gets at least 3 attempts.",
            "default": 3
          },
          "requestTimeoutSecs": {
            "title": "⏱️ Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "How long to wait for a single response before treating it as failed.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "🛡️ Proxy configuration",
            "type": "object",
            "description": "🚦 Default is NO proxy — the Actor talks to Stocktwits directly. If a request ever gets rejected or blocked, it automatically escalates step-by-step: 🚫 no proxy → 🖥️ datacenter proxy → 🏠 residential proxy (retrying up to 3× on residential), then sticks with residential for the rest of the run. Every escalation is logged clearly. Force a tier yourself here if you already know what you need.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}