{
  "openapi": "3.0.1",
  "info": {
    "title": "亞洲社群輿情監控｜連登、PTT、HardwareZone、Telegram 品牌聲量聚合",
    "description": "一站監控亞洲論壇與社群的品牌聲量：香港連登、台灣 PTT、新加坡 HardwareZone、Telegram。輸入品牌關鍵字自動跨平台抓取、去重、輕量情緒分析，支援競品聲量比較（share of voice）與增量抓取，按去重提及計費。品牌危機預警、市場研究、社群口碑監測必備。",
    "version": "1.0",
    "x-build-id": "XLJf46Zf2tXubgF27"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/claude_code_reviewer~asia-social-listening/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-claude_code_reviewer-asia-social-listening",
        "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~asia-social-listening/runs": {
      "post": {
        "operationId": "runs-sync-claude_code_reviewer-asia-social-listening",
        "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~asia-social-listening/run-sync": {
      "post": {
        "operationId": "run-sync-claude_code_reviewer-asia-social-listening",
        "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": [
          "brandKeyword"
        ],
        "properties": {
          "brandKeyword": {
            "title": "🎯 品牌關鍵字",
            "type": "string",
            "description": "要監控的品牌或關鍵字（必填），例如「誠品」。所有選定平台都會用這個詞搜尋/過濾。"
          },
          "competitorBrands": {
            "title": "🥊 競品品牌",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "（選填）競品品牌/關鍵字，各自也會跑一輪抓取，輸出的 brand_matched／is_competitor 欄位可用來比較聲量（share of voice）。",
            "items": {
              "type": "string"
            }
          },
          "searchAliases": {
            "title": "🔤 主品牌別名",
            "maxItems": 10,
            "uniqueItems": true,
            "type": "array",
            "description": "（選填）主品牌的額外搜法：英文名、簡稱、常見錯拼等。只套用在主品牌（brandKeyword），不套用在競品。同一則貼文被主詞和別名都搜到時，以主詞為準（matched_alias 為 null）。",
            "items": {
              "type": "string"
            }
          },
          "platforms": {
            "title": "📡 監控平台",
            "uniqueItems": true,
            "type": "array",
            "description": "要監控哪些平台？連登／Threads 是全站真搜尋；PTT／HardwareZone／Telegram 是板塊/頻道內關鍵字過濾（需要下面對應的目標清單）。",
            "items": {
              "type": "string",
              "enum": [
                "lihkg",
                "ptt",
                "hardwarezone",
                "telegram"
              ],
              "enumTitles": [
                "連登 LIHKG（香港・真搜尋）",
                "PTT（台灣・板內標題過濾）",
                "HardwareZone（新加坡・板內標題過濾）",
                "Telegram（頻道內文過濾）"
              ]
            },
            "default": [
              "lihkg",
              "ptt",
              "hardwarezone",
              "telegram"
            ]
          },
          "pttBoards": {
            "title": "📋 PTT 看板",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "監控平台含 PTT 時適用。要在哪些看板內做標題關鍵字過濾，例如 Gossiping（八卦板）、Stock（股票板）。18+ 看板會自動處理 over18 cookie。",
            "items": {
              "type": "string"
            }
          },
          "hwzForums": {
            "title": "📋 HardwareZone 板塊 ID",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "監控平台含 HardwareZone 時適用。HardwareZone 板塊 ID（數字），例如 16（Eat-Drink-Man-Woman／EDMW 吹水板）。",
            "items": {
              "type": "string"
            }
          },
          "telegramChannels": {
            "title": "📋 Telegram 頻道",
            "maxItems": 20,
            "uniqueItems": true,
            "type": "array",
            "description": "監控平台含 Telegram 時適用（必填，否則會自動跳過 Telegram 並警告）。填頻道帳號（不含 @），例如 durov。只能抓公開頻道。",
            "items": {
              "type": "string"
            }
          },
          "lookbackDays": {
            "title": "📅 回溯天數",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "只抓最近幾天內的內容（依發文/最後回覆時間判斷，會提早停止翻頁以節省成本）。",
            "default": 7
          },
          "maxMentionsPerPlatform": {
            "title": "📊 每平台每品牌上限",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "每個平台、每個品牌（含競品）最多抓幾筆 mention（含主品牌別名合併後的上限）。上限 1000。",
            "default": 100
          },
          "sentimentAnalysis": {
            "title": "🙂 情緒分析",
            "type": "boolean",
            "description": "開啟後為每筆 mention 加上 sentiment／sentiment_score。用輕量繁中/英文關鍵字詞表判斷，不是 AI 模型（見 README 說明）。關閉則兩欄位皆為 null。",
            "default": true
          },
          "deduplication": {
            "title": "🧹 跨平台去重",
            "type": "boolean",
            "description": "開啟後會標記同一篇貼文（同平台同 ID）及跨平台轉貼/重複內容（正規化文字相同）為 is_duplicate，只有非重複的 mention 會被計費。",
            "default": true
          },
          "deltaMode": {
            "title": "🆕 增量模式",
            "type": "boolean",
            "description": "開啟後只回傳「上次執行之後」的新 mention（用品牌專屬的命名 KV store 記錄已見過的 mention_id，跨 run 比對）。適合排程監控，避免重複看到舊資料。",
            "default": false
          },
          "proxyConfiguration": {
            "title": "🌐 Proxy（預設開啟 Apify datacenter proxy）",
            "type": "object",
            "description": "預設走 Apify datacenter proxy：不用 proxy 時會跟平台上其他 run 共用出口 IP，容易被個別平台限流。五個平台的回應都不大，proxy 流量費可忽略。自備 proxy 或本機測試才關掉。",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}