{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads 輿情爬蟲 — 個股情緒、熱門話題、繁中量化研究專用",
    "description": "用 Threads 做台股 / 加密 / 港股輿情監控？這隻 Actor 為量化研究員、券商分析師、AI 投顧、財經創作者設計：批量監控 100 個 ticker（台積電、輝達、聯發科、特斯拉、比特幣…），完整討論串 + 留言、ISO 時間戳、互動數據（讚、回覆、轉發、引用、觀看）直接進 pandas / BI / sentiment model。相對日期 7 天 / 1 個月排程友善。每筆 $0.005，比 RavenPack / Bloomberg sentiment 便宜兩個數量級。不用登入、不用 Threads API token。",
    "version": "1.0",
    "x-build-id": "KpYC7uLOWU1ajFqsZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/claude_code_reviewer~threads-stock-sentiment/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-claude_code_reviewer-threads-stock-sentiment",
        "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/claude_code_reviewer~threads-stock-sentiment/runs": {
      "post": {
        "operationId": "runs-sync-claude_code_reviewer-threads-stock-sentiment",
        "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/claude_code_reviewer~threads-stock-sentiment/run-sync": {
      "post": {
        "operationId": "run-sync-claude_code_reviewer-threads-stock-sentiment",
        "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": {
          "mode": {
            "title": "🎯 模式",
            "enum": [
              "search",
              "hashtag",
              "user",
              "post",
              "feed"
            ],
            "type": "string",
            "description": "要抓什麼?選一個模式,下面對應的欄位填一下就好。**多數 fintech use case 用「🔎 關鍵字搜尋」最直觀**(直接餵 ticker / 公司名),其他模式視需求。",
            "default": "search"
          },
          "usernames": {
            "title": "👤 帳號列表",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Threads 純帳號(不用加 @ 也不用貼網址)。財經 KOL / 券商 / 分析師抓他們的貼文時用這個欄位。例如:財經 M 平方、產業隊長、股癌。",
            "items": {
              "type": "string"
            }
          },
          "bulkUsernames": {
            "title": "📋 批量貼帳號",
            "type": "string",
            "description": "**一行一個帳號**,按 Enter 換行。**不要加引號、不要用逗號分隔。** 直接從你的監測名單 Excel 複製一整欄貼進來最快。執行時會自動併進上面的「帳號列表」。"
          },
          "keywords": {
            "title": "🏷️ 個股 / 關鍵字 / 標籤",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "個股名稱、ticker、產業關鍵字、或 hashtag。例如:台積電、輝達、聯發科、#AI概念股、特斯拉、比特幣。⚠️ **一個概念一個關鍵字** — Threads 搜尋會把整串當一個詞匹配,複合詞像「台積電法說」會回 0 筆,要拆成「台積電」和「法說」分別跑。",
            "items": {
              "type": "string"
            }
          },
          "bulkKeywords": {
            "title": "📋 批量貼個股 / 關鍵字",
            "type": "string",
            "description": "**一行一個個股 / 關鍵字 / hashtag**,按 Enter 換行。**不要加引號、不要用逗號分隔。** 範例:\n\n```\n台積電\n鴻海\n聯發科\n輝達\n特斯拉\n#AI概念股\n#半導體\n```\n\n直接從你的觀察清單 Google Sheet 複製貼上最快。執行時會自動併進上面的「個股 / 關鍵字」欄位。"
          },
          "searchSort": {
            "title": "🔀 搜尋排序",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "關鍵字搜尋的排序方式,只有「搜尋」模式會吃這個設定。",
            "default": "top"
          },
          "dateFrom": {
            "title": "📅 起始日期",
            "type": "string",
            "description": "最早的貼文日期。可填 YYYY-MM-DD 絕對日期,或相對表示法:「7 days」、「1 month」、「2 weeks」。"
          },
          "dateTo": {
            "title": "📅 結束日期",
            "type": "string",
            "description": "最晚的貼文日期。格式同起始日期。"
          },
          "postUrls": {
            "title": "💬 貼文網址",
            "uniqueItems": true,
            "type": "array",
            "description": "Threads 貼文完整網址,會一併抓留言。例如:https://www.threads.com/@user/post/ABC123。",
            "items": {
              "type": "string"
            }
          },
          "feedUrls": {
            "title": "📰 動態 feed 網址",
            "uniqueItems": true,
            "type": "array",
            "description": "Threads 自訂 feed 網址。例如:https://www.threads.com/custom_feed/18113589370710265。",
            "items": {
              "type": "string"
            }
          },
          "maxPosts": {
            "title": "📊 最多抓幾篇",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "每個來源最多抓幾篇貼文。越多費用越高 (每筆 $0.005)。捲動次數會自動算,不用手動調。",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}