{
  "openapi": "3.0.1",
  "info": {
    "title": "Threads 海巡 - 貼文、個人檔案與關鍵字搜尋",
    "description": "依關鍵字搜尋近期 Meta Threads 公開貼文、收集公開個人檔案中可取得的貼文，或依關鍵字尋找相關帳號。免登入。可匯出貼文、公開可取得的觀看指標、媒體、互動指標與帳號資料。",
    "version": "0.0",
    "x-build-id": "GOQkt5hdPxNJ0cjqo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/futurizerush~meta-threads-scraper-zh-tw/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-futurizerush-meta-threads-scraper-zh-tw",
        "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/futurizerush~meta-threads-scraper-zh-tw/runs": {
      "post": {
        "operationId": "runs-sync-futurizerush-meta-threads-scraper-zh-tw",
        "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/futurizerush~meta-threads-scraper-zh-tw/run-sync": {
      "post": {
        "operationId": "run-sync-futurizerush-meta-threads-scraper-zh-tw",
        "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": "🎯 爬取模式",
            "type": "string",
            "description": "先選一種模式，再填下方對應欄位：\n• 👤 用戶貼文 → 填 👤 用戶名稱 — 抓取你列出帳號的公開貼文。\n• 🔎 搜尋 → 填 🏷️ 關鍵字 — 用關鍵字或標籤做 Threads 海巡，撈出相關公開貼文（可加日期範圍）。\n• 👥 尋找帳號 → 填 🏷️ 關鍵字 — 找出符合關鍵字的帳號（每組關鍵字最多 10 個），含公開簡介、追蹤者數與連結。小撇步：想找在地帳號可以加上地名，例如「台北 餐廳」。",
            "default": "user"
          },
          "usernames": {
            "title": "👤 用戶名稱",
            "minItems": 0,
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "在 👤 用戶貼文 模式為必填（其他模式會忽略）。可填一個或多個 Threads 用戶名稱 — 純名稱（zuck）、加 @（@zuck）、或完整網址（https://threads.com/@zuck 或 https://threads.net/@zuck）都可以。",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "🏷️ 關鍵字",
            "minItems": 0,
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "在 🔎 搜尋 模式（用關鍵字或標籤撈貼文）與 👥 尋找帳號 模式（用關鍵字找帳號）填寫。# 加不加都行，例如「AI」「tech」「台北 餐廳」。在 👤 用戶貼文 模式為選填：用來標記用戶哪些貼文有提到這些詞（keyword_match），不會篩掉任何貼文。",
            "items": {
              "type": "string"
            }
          },
          "max_posts": {
            "title": "📦 最大結果數",
            "minimum": 10,
            "maximum": 10000,
            "type": "integer",
            "description": "每個用戶或每組關鍵字的結果上限。在 👤 用戶貼文 / 🔎 搜尋 模式：10–10000（預設 50；實際結果可能低於上限）。在 👥 尋找帳號 模式：每組關鍵字最多 10 個帳號，與此數值無關 — 想要更多請多加幾組關鍵字。",
            "default": 50
          },
          "search_filter": {
            "title": "🔎 排序方式",
            "enum": [
              "top",
              "recent"
            ],
            "type": "string",
            "description": "僅在 🔎 搜尋 模式使用。「Top」= 最熱門的貼文。「Recent」= 最新符合的貼文優先，涵蓋面較廣（結果較多元；可取得的範圍仍可能含較舊的貼文）。",
            "default": "top"
          },
          "start_date": {
            "title": "📅 開始日期",
            "type": "string",
            "description": "在 🔎 搜尋 模式使用，只保留此日期（含）之後的貼文。支援 YYYY-MM-DD 或相對時間，例如「7 days」「1 month」。其他模式請留空 — 在那裡設日期會直接中止執行並提示。"
          },
          "end_date": {
            "title": "📅 結束日期",
            "type": "string",
            "description": "在 🔎 搜尋 模式使用，只保留此日期（含）之前的貼文。支援 YYYY-MM-DD 或相對時間。其他模式請留空 — 在那裡設日期會直接中止執行並提示。"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}