← 回儀表板

讓 Claude/ChatGPT 讀你的粉專數據

它們打的是你自己的 API,不是 Windsor。
公開網址:https://niandidi.zeabur.app

API Key 狀態: 尚未設定 — 請到 Zeabur → Variables 新增 DASHBOARD_API_KEY(一串長隨機字),AI 才能連。

Meta Token: 已有 META_ACCESS_TOKEN(AI 用這組系統 Token 抓粉專)

ChatGPT(Custom GPT Actions)

  1. 打開 ChatGPT → Explore GPTs → Create
  2. Configure → Actions → Import from URL,貼上:
    https://niandidi.zeabur.app/openapi.json
  3. Authentication 選 API Key,Auth Type 選 API Key
  4. Header 名稱填 X-API-Key,值填你的 DASHBOARD_API_KEY
  5. Instructions 可貼:
你是 nian.didi 內容分析助理。先用 listPages 取得粉專,再用 getReport 拉指定日期的 FB/IG 貼文。
重點看 views、completion_rate(百分比)、avg_watch_seconds、retention_3s_rate、likes、comments、shares、saved。
completion_rate 若來源是 estimated_from_avg_watch,請標明這是估算。IG Reels 常沒有官方完播,改看平均觀看與前 3 秒留存。

Claude(自訂連接器 / MCP)

  1. Claude.ai → Settings → Connectors → Add custom connector(名稱可填 nian.didi)
  2. MCP URL 填:https://niandidi.zeabur.app/mcp
  3. 授權選 Bearer token 或 API Key,值同樣是 DASHBOARD_API_KEY
  4. 若介面不支援 MCP,改在對話請 Claude 使用工具呼叫同一個 REST: https://niandidi.zeabur.app/api/v1/report

自己測試

curl "https://niandidi.zeabur.app/api/v1/pages" -H "X-API-Key: 你的金鑰"

curl "https://niandidi.zeabur.app/api/v1/report?since=2026-08-01&until=2026-08-19&platform=all" ^
  -H "X-API-Key: 你的金鑰"

完播率能拿到什麼