{
  "openapi": "3.0.1",
  "info": {
    "title": "Stocktwits Scraper - Messages, Sentiment & Trending",
    "description": "Scrape Stocktwits message streams with bull/bear sentiment labels, bodies, likes, replies, cashtags and author stats for any symbol. Trending symbols, user profiles and full reply threads. Incremental monitoring, resume and MCP export.",
    "version": "0.1",
    "x-build-id": "leTLqamBd7z4G9cnp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/abotapi~stocktwits-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-abotapi-stocktwits-com-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/abotapi~stocktwits-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-abotapi-stocktwits-com-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/abotapi~stocktwits-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-abotapi-stocktwits-com-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": [
              "symbols",
              "trending",
              "users",
              "threads",
              "url",
              "trending-messages",
              "symbol",
              "user",
              "trending-symbols"
            ],
            "type": "string",
            "description": "Symbols reads the message stream of one or more tickers. Trending returns the current trending symbols. Users reads a profile and its recent messages. Threads reads the full reply thread of specific messages. URL mode reads the Stocktwits pages you paste. Trending messages returns the site-wide trending message stream. The values symbol, user and trending-symbols are accepted as aliases of symbols, users and trending.",
            "default": "symbols"
          },
          "symbols": {
            "title": "Symbols (tickers)",
            "type": "array",
            "description": "Symbols mode: one ticker per line, with or without the $ prefix. Share classes (BRK.A, BRK.B, BRK.C) and crypto tickers (BTC.X) keep their dotted suffix; foreign exchange suffixes such as .TO, .HK or .L (VOD.L) are not supported and are skipped with a warning. Each symbol's message stream is walked from newest to oldest. Multi-value supported.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Stream order",
            "enum": [
              "all",
              "top"
            ],
            "type": "string",
            "description": "Symbols mode: All returns the newest messages first. Top returns the stream ordered by engagement, matching the site's Top view.",
            "default": "all"
          },
          "usernames": {
            "title": "Usernames",
            "type": "array",
            "description": "Users mode: one Stocktwits username per line, with or without the @ prefix. Returns the profile record plus the user's recent messages. Multi-value supported.",
            "items": {
              "type": "string"
            }
          },
          "messageUrls": {
            "title": "Message links or IDs",
            "type": "array",
            "description": "Threads mode: one message per line, as a full link (stocktwits.com/user/message/123456) or a bare numeric message ID. Returns the message and its full reply thread. Multi-value supported.",
            "default": [
              "https://stocktwits.com/Franking71/message/666335354",
              "https://stocktwits.com/StocktwitsNews/message/666343730"
            ],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Stocktwits links",
            "type": "array",
            "description": "URL mode: Stocktwits pages to read, one per line. Symbol pages (stocktwits.com/symbol/AAPL, also ?filter=top, the /sentiment and /news sub-pages, a dotted share-class ticker like /symbol/BRK.B, and crypto like /symbol/BTC.X) are walked as message streams, profile pages as user reads, message links (stocktwits.com/<user>/message/<id>) as reply threads, /topic/<name> pages as topic streams, and /sentiment/trending (or /markets/trending) returns the trending symbols. The /sentiment and /news sub-pages and /markets/trending read the same data as their parent page (the symbol stream, the trending list), so they stay in the example list but not in the default. Unsupported links are skipped with a warning. Multi-value supported.",
            "default": [
              "https://stocktwits.com/symbol/AAPL",
              "https://stocktwits.com/symbol/AAPL?filter=top",
              "https://www.stocktwits.com/symbol/TSLA",
              "https://stocktwits.com/symbol/BTC.X",
              "https://stocktwits.com/symbol/BRK.B",
              "https://stocktwits.com/Franking71",
              "https://stocktwits.com/Franking71/message/666335354",
              "https://stocktwits.com/sentiment/trending",
              "https://stocktwits.com/topic/earnings"
            ],
            "items": {
              "type": "string"
            }
          },
          "sentiment": {
            "title": "Sentiment filter",
            "enum": [
              "all",
              "bullish",
              "bearish",
              "none"
            ],
            "type": "string",
            "description": "Keep only messages with a chosen crowd sentiment. All keeps every message; the other values keep only messages the authors tagged Bullish or Bearish. Untagged messages are labelled None. Applies to every mode that returns messages.",
            "default": "all"
          },
          "onlyPriceTargets": {
            "title": "Only messages with a price target",
            "type": "boolean",
            "description": "Keep only messages that carry a structured price target (priceTarget, date and starting price). Messages without one are skipped before they reach the dataset, so they are never billed. Scanning stops after 100 pages per target when targets are rare.",
            "default": false
          },
          "fetchReplies": {
            "title": "Fetch reply threads",
            "type": "boolean",
            "description": "For each returned message, also read its full reply thread and return every public reply as its own record. Adds a surcharge billed per thread read: one event for the read itself plus one per started block of 10 replies returned (see the Reply threads section of the README). Turning this on can be slow and heavy on large, talkative symbols: each thread is one extra read per message.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many records (0 = no limit; the run then stops when the streams run out). Large, active symbol streams never run out on their own. Defaults to 20. Capped at 100000.",
            "default": 20
          },
          "maxMessages": {
            "title": "Max messages per target",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap on messages taken from each symbol, user, link or the trending stream. Leave empty for no per-target cap (only the Max items total and its even split apply). To take N messages from each of several targets, set this to N and raise Max items (or use 0) so the total does not cut it short."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. The prefilled default works on every Apify plan."
          },
          "resumeFromRunId": {
            "title": "Resume from a previous run",
            "type": "string",
            "description": "Paste a previous run ID or dataset ID to continue a large pull without returning messages already collected there."
          },
          "incrementalMode": {
            "title": "Incremental changes for scheduled runs",
            "type": "boolean",
            "description": "Turn this on for daily or recurring monitoring. The first run returns every matching record as NEW. Later runs normally return only NEW, UPDATED and REAPPEARED records. A record counts as UPDATED when its content changed: message text, sentiment, symbols and cashtags tagged, author name or identity, or a profile or symbol detail. These never trigger UPDATED on their own, though they stay in the output with their live values: likes, replies count, reshares, mentioned users, author followers, symbol watchlist count, trending rank, sentiment and volume change, and live quote numbers. Add more names in Ignore fields when detecting changes. Turn on Emit unchanged or Emit expired only when you also want those rows returned (and billed). State is kept separately for each input setup; use State key to name or deliberately share a monitoring campaign.",
            "default": false
          },
          "stateKey": {
            "title": "State key (optional, incremental mode only)",
            "type": "string",
            "description": "Optional. Name this monitoring campaign to keep its state stable, or deliberately share state across differently configured runs. Leave empty to let the actor derive a key automatically from the mode and input settings."
          },
          "emitUnchanged": {
            "title": "Emit unchanged records (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return records that have not changed since the last run, marked UNCHANGED. This returns, and bills, extra rows you already have.",
            "default": false
          },
          "emitExpired": {
            "title": "Emit expired records (incremental mode only)",
            "type": "boolean",
            "description": "Off by default. Turn on to also return records that were present in a previous run but are no longer found, marked EXPIRED. Only produced once a run has fully scanned the tracked input without stopping early.",
            "default": false
          },
          "ignoreFieldsForChanges": {
            "title": "Ignore fields when detecting changes (incremental mode only)",
            "type": "array",
            "description": "Optional. Field names to exclude from UPDATED change detection, on top of the built-in list (likes, repliesCount, reshares, mentionedUsers, authorFollowers, watchlistCount, trendingRank, sentimentChange, volumeChange and the live quote fields). Use a top-level name such as sourceLabel, or a dotted path such as symbols.exchange to ignore a nested field inside every element of a list. Ignored fields stay in the output; they only stop triggering UPDATED and stop appearing in changedFields.",
            "items": {
              "type": "string"
            }
          },
          "mcpConnectors": {
            "title": "Pipe results into your apps (optional)",
            "type": "array",
            "description": "Optionally send results into the apps you already use, via Model Context Protocol (MCP) connectors. Authorize one under Apify, Settings, API & Integrations, then select it here. Notion gets a rich page-per-item export; other connectors get a best-effort write or digest. Leave empty to skip; never changes the dataset output.",
            "items": {
              "type": "string"
            }
          },
          "notionParentPageUrl": {
            "title": "Notion parent page (Notion connector only)",
            "type": "string",
            "description": "URL or id of the Notion page under which item pages are created. Required to enable the Notion export; ignored by other connectors."
          },
          "maxNotifyListings": {
            "title": "Max items to export per connector",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Cap on items written to each connector per run. Does not affect the dataset.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}