{
  "openapi": "3.0.1",
  "info": {
    "title": "Stocktwits Sentiment Scraper — Messages, Bullish %, Trends",
    "description": "Scrape Stocktwits messages with author sentiment, tickers, price at post, likes and public author stats; per-ticker bullish/bearish % with a published formula; the Stocktwits daily sentiment index; and trending tickers with fundamentals. No login.",
    "version": "0.1",
    "x-build-id": "18wgJ0FZ2eeK5TUcr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oswaldocarabano~stocktwits-sentiment-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oswaldocarabano-stocktwits-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/oswaldocarabano~stocktwits-sentiment-scraper/runs": {
      "post": {
        "operationId": "runs-sync-oswaldocarabano-stocktwits-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/oswaldocarabano~stocktwits-sentiment-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-oswaldocarabano-stocktwits-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": {
          "outputType": {
            "title": "What to extract",
            "enum": [
              "message",
              "symbol-sentiment",
              "sentiment-history",
              "trending-symbol"
            ],
            "type": "string",
            "description": "Each run returns one row type. Messages: every message of the tickers, users or feeds you choose. Ticker sentiment: one row per ticker computed from its latest messages with a published formula. Daily sentiment history: the Stocktwits daily sentiment index. Trending tickers: the live trending list with fundamentals.",
            "default": "message"
          },
          "symbols": {
            "title": "Tickers",
            "type": "array",
            "description": "Stocktwits tickers such as AAPL, BRK.B, SPY, BTC.X (crypto ends in .X) or RELIANCE.NSE, with or without $. Ticker links (https://stocktwits.com/symbol/AAPL) work too. Leave empty: messages mode reads the trending stream; ticker-sentiment and history modes use the top 10 trending tickers.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "usernames": {
            "title": "Usernames (messages mode)",
            "type": "array",
            "description": "Public Stocktwits usernames whose messages you want (without @), or profile links. Messages mode only.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Message links (messages mode)",
            "type": "array",
            "description": "Links to single messages (https://stocktwits.com/<user>/message/<id>), ticker pages or profiles. A deleted message returns an error row that is never charged.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "feeds": {
            "title": "Global streams (messages mode)",
            "type": "array",
            "description": "Stocktwits-wide streams: trending (messages on trending tickers), suggested (popular messages) and charts (messages with a chart).",
            "items": {
              "type": "string",
              "enum": [
                "trending",
                "suggested",
                "charts"
              ]
            },
            "default": []
          },
          "messageFilter": {
            "title": "Ticker stream filter",
            "enum": [
              "all",
              "top",
              "links",
              "charts"
            ],
            "type": "string",
            "description": "Which messages of each ticker stream to read (applied by Stocktwits). Also used for the ticker-sentiment window.",
            "default": "all"
          },
          "sentimentFilter": {
            "title": "Sentiment (messages mode)",
            "enum": [
              "any",
              "bullish",
              "bearish",
              "labeled",
              "unlabeled"
            ],
            "type": "string",
            "description": "Keep only messages with this author-chosen sentiment tag. Applied by this actor (Stocktwits has no such filter); with filters on, at most 3,000 messages are scanned per ticker, user or feed.",
            "default": "any"
          },
          "onlyPriceTargets": {
            "title": "Only messages with a price target (messages mode)",
            "type": "boolean",
            "description": "Keep only messages where the author attached a Stocktwits price prediction (target price, date and direction). They are rare (about 1 in 250 messages), so with this on the actor scans up to 3,000 messages per stream. Applied by this actor.",
            "default": false
          },
          "minAuthorFollowers": {
            "title": "Minimum author followers (messages mode)",
            "minimum": 0,
            "maximum": 100000000,
            "type": "integer",
            "description": "Keep only messages whose author has at least this many followers. Applied by this actor."
          },
          "postedWithinHours": {
            "title": "Posted within (hours)",
            "minimum": 1,
            "maximum": 8760,
            "type": "integer",
            "description": "Only messages from the last N hours. Messages mode: older messages are skipped and the stream stops there. Ticker-sentiment mode: this is the time window of the aggregate (together with \"Messages per ticker\"). Empty = no time limit."
          },
          "messagesPerSymbol": {
            "title": "Messages per ticker / stream",
            "minimum": 1,
            "maximum": 3000,
            "type": "integer",
            "description": "Ticker-sentiment mode: the window size, i.e. the latest N messages that feed each aggregate (empty = 200). Messages mode: at most N messages from each ticker, user or stream (empty = no per-stream limit, only Maximum results)."
          },
          "trendingRegion": {
            "title": "Trending list region",
            "enum": [
              "US",
              "IN",
              "CA"
            ],
            "type": "string",
            "description": "Which Stocktwits trending list to read (trending mode, and the default tickers of the ticker modes).",
            "default": "US"
          },
          "trendingAssetClass": {
            "title": "Trending asset class",
            "enum": [
              "any",
              "stocks",
              "etfs",
              "crypto"
            ],
            "type": "string",
            "description": "Keep only trending tickers of this class. Applied by this actor on the 30-ticker trending list.",
            "default": "any"
          },
          "onlyNewSinceLastRun": {
            "title": "Only new since my last run (messages mode)",
            "type": "boolean",
            "description": "Monitoring mode for schedules: remembers what earlier runs with exactly the same input delivered (in a key-value store named stocktwits-sentiment-monitor in your account) and delivers and charges only new messages. The first run delivers everything.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Rows to deliver at most (messages, ticker rows, daily rows or trending tickers). Error rows do not count and are never charged.",
            "default": 50
          },
          "maxConcurrency": {
            "title": "Parallel requests",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Requests in flight at once. Each connection is paced to about 200 requests per minute, below the Stocktwits limit per IP.",
            "default": 4
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. The actor already rotates connections when Stocktwits throttles; set a proxy only if you want to use your own."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}