Skip to content

Perplexity

The Perplexity plugin provides web search capabilities through the Perplexity Search API or Perplexity Sonar via OpenRouter.

PropertyValue
TypeWeb search provider (not a model provider)
AuthPERPLEXITY_API_KEY (direct) or OPENROUTER_API_KEY (via OpenRouter)
Config pathplugins.entries.perplexity.config.webSearch.apiKey
  1. Set the API key

    Run the interactive web-search configuration flow:

    Terminal window
    openclaw configure --section web

    Or set the key directly:

    Terminal window
    openclaw config set plugins.entries.perplexity.config.webSearch.apiKey "pplx-xxxxxxxxxxxx"
  2. Start searching

    The agent will automatically use Perplexity for web searches once the key is configured. No additional steps are required.

The plugin auto-selects the transport based on API key prefix:

When your key starts with pplx-, OpenClaw uses the native Perplexity Search API. This transport returns structured results and supports domain, language, and date filters (see filtering options below).

Key prefixTransportFeatures
pplx-Native Perplexity Search APIStructured results, domain/language/date filters
sk-or-OpenRouter (Sonar)AI-synthesized answers with citations

When using the native Perplexity API, searches support the following filters:

FilterDescriptionExample
Country2-letter country codeus, de, jp
LanguageISO 639-1 language codeen, fr, zh
Date rangeRecency windowday, week, month, year
Domain filtersAllowlist or denylist (max 20 domains)example.com
Content budgetToken limits per response / per pagemax_tokens, max_tokens_per_page
Environment variable for daemon processes

If the OpenClaw Gateway runs as a daemon (launchd/systemd), make sure PERPLEXITY_API_KEY is available to that process.

OpenRouter proxy setup

If you prefer to route Perplexity searches through OpenRouter, set an OPENROUTER_API_KEY (prefix sk-or-) instead of a native Perplexity key. OpenClaw will detect the prefix and switch to the Sonar transport automatically.

Perplexity search tool

How the agent invokes Perplexity searches and interprets results.

Configuration reference

Full configuration reference including plugin entries.