跳轉到主要內容
Perplexity Plugin 透過 Perplexity Search API 或經由 OpenRouter 使用 Perplexity Sonar,提供網頁搜尋功能。
本頁是 Perplexity provider 設定。如需 Perplexity tool(代理如何使用它),請參閱 Perplexity tool
屬性
類型網頁搜尋供應器(不是模型供應器)
驗證PERPLEXITY_API_KEY(直接)或 OPENROUTER_API_KEY(透過 OpenRouter)
設定路徑plugins.entries.perplexity.config.webSearch.apiKey

開始使用

1

設定 API 金鑰

執行互動式網頁搜尋設定流程:
openclaw configure --section web
或直接設定金鑰:
openclaw config set plugins.entries.perplexity.config.webSearch.apiKey "pplx-xxxxxxxxxxxx"
2

開始搜尋

金鑰設定完成後,代理會自動使用 Perplexity 進行網頁搜尋。不需要其他步驟。

搜尋模式

Plugin 會根據 API 金鑰前綴自動選擇傳輸方式:
當你的金鑰以 pplx- 開頭時,OpenClaw 會使用原生 Perplexity Search API。此傳輸方式會傳回結構化結果,並支援網域、語言與日期篩選器(請參閱下方的篩選選項)。
金鑰前綴傳輸方式功能
pplx-原生 Perplexity Search API結構化結果、網域/語言/日期篩選器
sk-or-OpenRouter (Sonar)帶有引用來源的 AI 綜合答案

原生 API 篩選

篩選選項僅在使用原生 Perplexity API(pplx- 金鑰)時可用。OpenRouter/Sonar 搜尋不支援這些參數。
使用原生 Perplexity API 時,搜尋支援下列篩選器:
篩選器說明範例
國家2 個字母的國家代碼us, de, jp
語言ISO 639-1 語言代碼en, fr, zh
日期範圍近期時間範圍day, week, month, year
網域篩選器允許清單或封鎖清單(最多 20 個網域)example.com
內容預算每次回應 / 每頁的 Token 限制max_tokens, max_tokens_per_page

進階設定

如果 OpenClaw Gateway 以 daemon(launchd/systemd)方式執行,請確認該程序可使用 PERPLEXITY_API_KEY
只在 ~/.profile 中設定的金鑰,不會對 launchd/systemd daemon 可見,除非明確匯入該環境。請在 ~/.openclaw/.env 中設定金鑰,或透過 env.shellEnv 設定,以確保 Gateway 程序能讀取它。
如果你偏好透過 OpenRouter 路由 Perplexity 搜尋,請設定 OPENROUTER_API_KEY(前綴 sk-or-),而不是原生 Perplexity 金鑰。OpenClaw 會偵測此前綴,並自動切換到 Sonar 傳輸方式。
如果你已經有 OpenRouter 帳戶,並想在多個供應器之間整合帳單,OpenRouter 傳輸方式會很有用。

相關

Perplexity search tool

代理如何叫用 Perplexity 搜尋並解讀結果。

設定參考

包含 Plugin entries 的完整設定參考。