{
  "openapi": "3.0.1",
  "info": {
    "title": "StockTwits Ticker Sentiment & Trending Symbol Feed",
    "description": "Reads StockTwits' public message stream for any ticker or user, the market-wide trending-symbols list with trend summaries, and ticker search, including each post's self-tagged sentiment.",
    "version": "1.0",
    "x-build-id": "e7mFmdFkY1PvZoBtw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dataspryva~stocktwits-ticker-sentiment-and-trending-symbol/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dataspryva-stocktwits-ticker-sentiment-and-trending-symbol",
        "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/dataspryva~stocktwits-ticker-sentiment-and-trending-symbol/runs": {
      "post": {
        "operationId": "runs-sync-dataspryva-stocktwits-ticker-sentiment-and-trending-symbol",
        "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/dataspryva~stocktwits-ticker-sentiment-and-trending-symbol/run-sync": {
      "post": {
        "operationId": "run-sync-dataspryva-stocktwits-ticker-sentiment-and-trending-symbol",
        "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": [
              "symbolMessages",
              "userMessages",
              "trendingSymbols",
              "marketMessages",
              "symbolSentiment",
              "symbolOverview",
              "priceHistory",
              "search",
              "conversation",
              "trendingMessages",
              "symbolSearch"
            ],
            "type": "string",
            "description": "What to fetch from StockTwits.",
            "default": "symbolMessages"
          },
          "symbols": {
            "title": "Tickers (mode=symbolMessages / symbolSentiment / symbolOverview / priceHistory)",
            "type": "array",
            "description": "Tickers to fetch, e.g. AAPL, TSLA, BTC.X, BRK.B, SHOP.TSX. Accepts $cashtags and StockTwits symbol URLs. Use .X for crypto.",
            "items": {
              "type": "string"
            },
            "default": [
              "AAPL"
            ]
          },
          "usernames": {
            "title": "Usernames (mode=userMessages)",
            "type": "array",
            "description": "StockTwits usernames without @, or profile URLs, e.g. KirRoyalTrader, https://stocktwits.com/Fibonaccino.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchQueries": {
            "title": "Search queries (mode=search)",
            "type": "array",
            "description": "Company names, tickers, or trader names to search for, e.g. tesla, apple, TraderLion.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "searchType": {
            "title": "Search type (mode=search)",
            "enum": [
              "all",
              "symbols",
              "users"
            ],
            "type": "string",
            "description": "What to return from each query.",
            "default": "all"
          },
          "streamFilter": {
            "title": "Message sort (mode=symbolMessages)",
            "enum": [
              "all",
              "top",
              "trending"
            ],
            "type": "string",
            "description": "All = newest first, Top = StockTwits ranking, Trending = curated high-engagement posts for the ticker (up to 100).",
            "default": "all"
          },
          "contentFilter": {
            "title": "Content filter (message modes)",
            "enum": [
              "all",
              "links",
              "charts",
              "videos"
            ],
            "type": "string",
            "description": "Keep only messages with this attachment. Videos are rare; All keeps every message.",
            "default": "all"
          },
          "sentimentFilter": {
            "title": "Sentiment filter (message modes)",
            "enum": [
              "any",
              "bullish",
              "bearish",
              "tagged"
            ],
            "type": "string",
            "description": "Keep posts by the author's self-tagged sentiment. Most posts are untagged; Any keeps all.",
            "default": "any"
          },
          "onlyPriceTargets": {
            "title": "Only price predictions (message modes)",
            "type": "boolean",
            "description": "Keep only messages where the author attached a StockTwits price prediction (price target).",
            "default": false
          },
          "feedType": {
            "title": "Market feed (mode=marketMessages)",
            "enum": [
              "trending",
              "suggested",
              "all"
            ],
            "type": "string",
            "description": "Trending = market-wide trending posts; Suggested = posts from StockTwits' curated suggested traders; All = public market-wide firehose (deep, chronological).",
            "default": "trending"
          },
          "trendingAssetClass": {
            "title": "Asset class (mode=trendingSymbols)",
            "enum": [
              "all",
              "stocks",
              "etf",
              "crypto",
              "adr",
              "commodity"
            ],
            "type": "string",
            "description": "Which trending instruments to keep. All includes stocks, ETFs, crypto, ADRs, commodities, and other classes.",
            "default": "all"
          },
          "sentimentRange": {
            "title": "Sentiment range (mode=symbolSentiment)",
            "enum": [
              "now",
              "1D",
              "1W",
              "1M",
              "3M",
              "6M",
              "1Y",
              "5Y",
              "ALL"
            ],
            "type": "string",
            "description": "Now = current sentiment across 15m, 24h, now, 1D–ALL. Other values return the daily/intraday history for that window.",
            "default": "now"
          },
          "chartZoom": {
            "title": "Price history window (mode=priceHistory)",
            "enum": [
              "1D",
              "1W",
              "1M",
              "3M",
              "6M",
              "YTD",
              "1Y",
              "5Y",
              "ALL"
            ],
            "type": "string",
            "description": "Intraday windows use 5-minute (1D) or 30-minute (1W) bars; other windows use daily/weekly bars.",
            "default": "1M"
          },
          "includeUserProfile": {
            "title": "Include trader profile (mode=userMessages)",
            "type": "boolean",
            "description": "Add one profile record per username before that trader's posts.",
            "default": false
          },
          "includeRelatedSymbols": {
            "title": "Include related tickers (mode=symbolOverview)",
            "type": "boolean",
            "description": "Add StockTwits' related-industry tickers to each symbol record.",
            "default": false
          },
          "newerThanMessageId": {
            "title": "Newer than message ID (message modes)",
            "minimum": 0,
            "type": "integer",
            "description": "Only keep messages with an ID greater than this. Useful for incremental scheduled runs."
          },
          "olderThanMessageId": {
            "title": "Older than message ID (message modes)",
            "minimum": 0,
            "type": "integer",
            "description": "Start from messages at or below this ID and page further back."
          },
          "messageIds": {
            "title": "Message IDs (mode=conversation)",
            "type": "array",
            "description": "Message IDs or StockTwits message URLs whose parent + reply thread should be fetched.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "maxItems": {
            "title": "Max records",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Per ticker/username/query/thread for target modes; total for trending and market feeds; max points or bars for history modes.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}