{
  "openapi": "3.0.1",
  "info": {
    "title": "StockTwits Messages & Sentiment Scraper",
    "description": "Scrape public StockTwits messages for any ticker, crypto coin or user, no login: text, Bullish/Bearish sentiment, cashtags, likes, replies, price at post time and author stats. Date range, replies, daily sentiment aggregates and only-new mode. Error rows are free.",
    "version": "0.2",
    "x-build-id": "NZhoQ6J80qGRVYqRT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataji~stocktwits-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataji-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/dataji~stocktwits-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dataji-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/dataji~stocktwits-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dataji-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",
        "properties": {
          "symbols": {
            "title": "Tickers",
            "type": "array",
            "description": "Stock, ETF or crypto tickers whose message streams you want, one per line: AAPL, $TSLA, BRK.B, BTC.X (StockTwits writes crypto with .X), or symbol links such as https://stocktwits.com/symbol/NVDA. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "cryptoSymbols": {
            "title": "Crypto tickers",
            "type": "array",
            "description": "Plain crypto tickers such as BTC, ETH or SOL. The actor adds StockTwits' .X suffix for you (BTC becomes BTC.X). A plain BTC in Tickers is a different instrument on StockTwits (an ETF).",
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Users",
            "type": "array",
            "description": "StockTwits users whose own messages you want: Stocktwits, @Stocktwits or https://stocktwits.com/Stocktwits.",
            "items": {
              "type": "string"
            }
          },
          "messageUrls": {
            "title": "Message links",
            "type": "array",
            "description": "Single messages to scrape together with their replies: https://stocktwits.com/<user>/message/<id>, or just the message id.",
            "items": {
              "type": "string"
            }
          },
          "maxMessagesPerTarget": {
            "title": "Max messages per ticker, user or link",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop each ticker or user stream after this many messages that pass your filters (newest first). Replies fetched with 'Include replies' come on top. For a message link this caps the message plus its replies.",
            "default": 200
          },
          "dateFrom": {
            "title": "Messages from",
            "type": "string",
            "description": "Only messages posted on or after this moment (UTC): 2026-11-01, 2026-11-01T14:30:00Z, or relative like '7 days' or '12 hours'. Logged-out StockTwits shows about the last 12 months."
          },
          "dateTo": {
            "title": "Messages to",
            "type": "string",
            "description": "Only messages posted on or before this moment (UTC). A plain date includes the whole day. The actor jumps straight to this date instead of paging through newer messages."
          },
          "sentimentFilter": {
            "title": "Sentiment",
            "enum": [
              "all",
              "bullish",
              "bearish",
              "labeled"
            ],
            "type": "string",
            "description": "Keep all messages, only those the author tagged Bullish or Bearish, or only tagged ones (either label). Most messages carry no label.",
            "default": "all"
          },
          "onlyWithPriceTarget": {
            "title": "Only messages with a price target",
            "type": "boolean",
            "description": "Keep only messages in which the author set a price target (a price and a date, with Bullish or Bearish direction; see the priceTarget fields). Other messages are skipped and not charged. Price targets are rare (a few per 1,000 messages), so each ticker or user stream stops after reading 5,000 messages; use 'Messages to' to look further back.",
            "default": false
          },
          "includeReplies": {
            "title": "Include replies",
            "type": "boolean",
            "description": "For messages that have replies, also fetch the replies (up to 100 per message) and add them as rows right after the message. Replies are charged like messages.",
            "default": false
          },
          "dailyAggregates": {
            "title": "Daily sentiment aggregates",
            "type": "boolean",
            "description": "Add one row per ticker per day (UTC) with message, Bullish and Bearish counts, Bullish share, unique authors and the other tickers mentioned most, counted from the messages this run reads. Only whole days are returned: today, and the oldest day when the run stopped inside it, are left out (see 'Include partial days'). Sizing: busy tickers such as AAPL, TSLA or NVDA get hundreds to thousands of messages a day, so for whole days set 'Max messages' well above days x daily messages, or set 'Messages from' to a plain date (it starts at midnight UTC).",
            "default": false
          },
          "includePartialDays": {
            "title": "Include partial days",
            "type": "boolean",
            "description": "Also return the days this run did not read completely (today, and the oldest day when the run stopped at 'Max messages' or the visible history ended inside it), marked isPartialDay: true. Their counts are lower than the full day's. Each row is charged like any other aggregate row.",
            "default": false
          },
          "onlyNewMessages": {
            "title": "Only new messages",
            "type": "boolean",
            "description": "For scheduled runs: remember the newest message per ticker and user (in the key-value store 'stocktwits-seen' of your account) and next time return only messages posted after it.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many tickers, users or links are read at the same time, each through its own proxy IP.",
            "default": 3
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "US residential Apify Proxy is used by default. On 18 Nov 2026 StockTwits refused datacenter IPs (HTTP 403) for 3 of 5 targets, while residential IPs got all of them.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "US"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}