{
  "openapi": "3.0.1",
  "info": {
    "title": "Meta Threads 爬蟲 — 貼文、用戶、標籤與關鍵字一次搞定",
    "description": "一個 Actor 搞定五種模式：用戶主頁、標籤話題、關鍵字搜尋、單篇貼文（含留言）、自訂動態。批量貼上 100 個帳號、支援相對日期（「7 天」、「1 個月」）、完整互動數據（讚、回覆、轉發、分享、觀看、引用）、ISO 時間戳、媒體網址。不用登入、不用 API token。每筆結果 $0.005。",
    "version": "1.0",
    "x-build-id": "PPTEf0B0Dfu9O2yZO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/claude_code_reviewer~threads-feed-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-claude_code_reviewer-threads-feed-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/claude_code_reviewer~threads-feed-scraper/runs": {
      "post": {
        "operationId": "runs-sync-claude_code_reviewer-threads-feed-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/claude_code_reviewer~threads-feed-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-claude_code_reviewer-threads-feed-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": {
          "mode": {
            "title": "🎯 模式",
            "enum": [
              "user",
              "hashtag",
              "search",
              "post",
              "feed"
            ],
            "type": "string",
            "description": "要抓什麼?選一個模式,下面對應的欄位填一下就好。",
            "default": "user"
          },
          "usernames": {
            "title": "👤 帳號列表",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "Threads 純帳號(不用加 @ 也不用貼網址)。例如:ponbu、zuck。用戶模式用這個欄位。",
            "items": {
              "type": "string"
            }
          },
          "bulkUsernames": {
            "title": "📋 批量貼帳號",
            "type": "string",
            "description": "**一行一個帳號**,按 Enter 換行。**不要加引號、不要用逗號分隔。** 範例:\n\n```\nponbu\nzuck\nmosseri\n```\n\n直接從 Google Sheet / Excel 複製一整欄貼進來最快。執行時會自動併進上面的「帳號列表」。"
          },
          "keywords": {
            "title": "🏷️ 關鍵字 / 標籤",
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "搜尋模式的關鍵字,或標籤模式的 hashtag(開頭 # 可有可無)。例如:AI news、#寵物友善、台積電。",
            "items": {
              "type": "string"
            }
          },
          "bulkKeywords": {
            "title": "📋 批量貼關鍵字",
            "type": "string",
            "description": "**一行一個關鍵字或 hashtag**,按 Enter 換行。**不要加引號、不要用逗號分隔。** 範例:\n\n```\n台積電\n護國神山\n#AI\n```\n\n執行時會自動併進上面的「關鍵字 / 標籤」。"
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}