開發者:API、MCP、CLI

三種介面都只讀、讀同一份資料,每條結果都帶有網站對應頁面的連結。公開 API、CLI 和本地 MCP 免登入;遠端 MCP 需要用 Google 或 X 帳號登入後使用(免費)。使用時請註明出處 bestjapanbuy.com(見使用條款)。

公開 API

構建時生成的靜態 JSON,基礎地址 https://bestjapanbuy.com/api/v1/。資料更新至 2026-10-24(dataVersion 2026.10.24)。

介面內容
GET /api/v1/meta.json
開啟
資料更新日期和版本號(dataVersion)、匯率、稅率、免稅規則版本、“值不值”判斷標準
GET /api/v1/categories.json
開啟
品類列表及專屬屬性定義、品牌表
GET /api/v1/products/{品類}.json
示例
某品類全部型號(含價格、評價、相容性和值不值結論)
GET /api/v1/product/{型號id}.json
示例
單個型號完整資訊
GET /api/v1/stores.json
開啟
門店、車站、連鎖品牌
GET /api/v1/rules.json
開啟
相容性規則(目的地、檢查項、規則)和免稅規則
GET /search-index.json
開啟
站內搜尋索引

每個物件都包含頁面連結(url)、來源(source)和日期欄位;響應中的 attribution 說明署名要求。另有 Markdown 版本:/p/{型號id}.md、/q/{slug}.md,以及 /llms.txt、/llms-full.txt(全部型號的價格和各地結論)。

curl https://bestjapanbuy.com/api/v1/products/rice-cooker.json

MCP 服務

遠端版(Streamable HTTP):https://mcp.bestjapanbuy.com/mcp。需要登入:第一次新增時,AI 工具會開啟瀏覽器,你在 bestjapanbuy.com 用 Google 或 X 帳號登入並點“授權”即可,之後工具會自動續期。已授權的工具可以在 我的 頁面檢視和撤銷。

Claude Code

claude mcp add --transport http bestjapanbuy https://mcp.bestjapanbuy.com/mcp

新增後在 Claude Code 裡執行 /mcp,選擇 bestjapanbuy → Authenticate,瀏覽器會開啟登入和授權頁面。

Claude Desktop、claude.ai

在“設定 → 連接器”中新增自定義連接器,填入 https://mcp.bestjapanbuy.com/mcp,點“連接”後按提示登入授權。

Cursor

在 ~/.cursor/mcp.json(或專案的 .cursor/mcp.json)中新增,儲存後在 MCP 設定裡點 Connect / Login:

{
  "mcpServers": {
    "bestjapanbuy": {
      "url": "https://mcp.bestjapanbuy.com/mcp"
    }
  }
}

本地版(免登入)

npx -y https://bestjapanbuy.com/cli/bestjapanbuy-latest.tgz mcp

本地版以 stdio 執行,讀取公開 API,不需要登入。可用環境變數 BESTJAPANBUY_API 指定其他 API 地址。Claude Desktop 的 claude_desktop_config.json 寫法:

{
  "mcpServers": {
    "bestjapanbuy": {
      "command": "npx",
      "args": [
        "-y",
        "https://bestjapanbuy.com/cli/bestjapanbuy-latest.tgz",
        "mcp"
      ]
    }
  }
}

授權細節(給自己寫客戶端的開發者)

  • 按 MCP 授權規範實現:OAuth 2.1 授權碼 + PKCE(S256),resource 參數必須是 https://mcp.bestjapanbuy.com/mcp。
  • 未帶憑證的請求返回 401,WWW-Authenticate 中的 resource_metadata 指向 Protected Resource Metadata:https://mcp.bestjapanbuy.com/.well-known/oauth-protected-resource/mcp。
  • 授權伺服器 https://bestjapanbuy.com/auth,後設資料 https://bestjapanbuy.com/.well-known/oauth-authorization-server/auth。客戶端身份支援 Client ID Metadata Documents,也保留動態客戶端註冊(/auth/oauth2/register)相容舊客戶端。
  • access token 為 JWT,有效期 10 分鐘,用 refresh token 續期;撤銷授權後 refresh token 立即失效。
  • 限流:登入使用者每人每分鐘 120 次;未登入或憑證無效的請求按 IP 每分鐘 60 次。

工具列表

工具輸入輸出
search_products品類、版本、價格區間、品牌、專屬屬性、關鍵詞型號列表(含價格、值不值、頁面連結)
get_product型號id 或型號字串(容錯匹配)完整資訊
compare_products2–3個型號id並排規格和差異
check_compatibility型號id 或品類、目的地國家/地區電壓、插頭、登機等逐項結論
worth_it型號id,可選匯率日本到手價、中國大陸價、結論和計算過程
find_stores經緯度或車站名、可選品類最近門店列表及導航連結
calc_tax_refund價格、是否含稅、匯率、購買日期免稅價、退稅額、人民幣、適用規則
get_tax_free_rules購買日期當時適用的免稅規則和流程

CLI

命令 bestjapanbuy,短別名 bjb。需要 Node.js 18 及以上,預設輸出中文表格,加 --json 輸出 JSON。CLI 暫未發布到 npm 倉庫,安裝包放在我們的網站上:https://bestjapanbuy.com/cli/bestjapanbuy-latest.tgz,隨網站每次部署更新。

不安裝、直接執行:

npx -y https://bestjapanbuy.com/cli/bestjapanbuy-latest.tgz search rice-cooker --version overseas --budget 60000
npx -y https://bestjapanbuy.com/cli/bestjapanbuy-latest.tgz show NW-YQH10
npx -y https://bestjapanbuy.com/cli/bestjapanbuy-latest.tgz compat hair-dryer --to CN
npx -y https://bestjapanbuy.com/cli/bestjapanbuy-latest.tgz refund 63600 --fx 0.0425
npx -y https://bestjapanbuy.com/cli/bestjapanbuy-latest.tgz mcp   # 啟動本地 MCP 服務(stdio)

常用的話可以全域性安裝,之後直接用 bjb:

npm install -g https://bestjapanbuy.com/cli/bestjapanbuy-latest.tgz
bjb search rice-cooker --version overseas --budget 60000
bjb show NW-YQH10
bjb compare NW-YQH10 JPK-W10W
bjb worth NW-YQH10
bjb stores --near shinjuku

使用條款摘要

  • 免費使用,需註明出處“BestJapanBuy(bestjapanbuy.com)”並儘量連結到對應頁面。
  • 服務端有訪問頻率限制,請快取結果、合理請求。遠端 MCP 按帳號限流,請不要共享或轉售授權。
  • 價格僅供參考,以店鋪為準;第三方評分不得標為你或我們的評分。

完整使用條款