LEJ PP Search
Perplexity-Powered Search for Claude Code
This plugin intercepts Claude Code's built-in WebSearch and prompts Claude to call Perplexity with curl. A separate hook saves recognized responses as Markdown in your project.
Current compatibility (November 11, 2026): Version 2.4.0 calls Perplexity's Agent API (POST /v1/agent with effort and input). Perplexity retired Sonar Chat Completions on September 27, 2026; older versions of this plugin get 403 agent_api_migration_required on every search. The redirect hook treats a key as configured when PERPLEXITY_API_KEY is set in the environment, or in ~/.claude/settings.json under env or legacy environmentVariables. It does not print that key. The save hook reads Claude Code's Bash stdout object (and a plain string) and the Agent API's typed output array. See Troubleshooting before configuring a key.
The difference matters more than you'd think. When Claude searches for "React 19 new features," it's looking to validate what it learned during training. But if React 19 changed something since then? Claude's search might miss it entirely because it wasn't looking for contradictions. Perplexity has no preconceptions - it just finds what's actually out there right now.
What's Inside
How It Works
When you ask Claude to search for something:
- Plugin blocks the built-in WebSearch via a pre-tool hook
- Claude calls Perplexity directly via curl using your API key
- You get results with actual inline citations
No MCP server. Just direct API calls using your Perplexity key stored in ~/.claude/settings.json. This keeps things simple and avoids the complexity of managing another background process. The curl approach also means you can see exactly what's being sent and received if you ever need to debug.
The hook intercepts WebSearch calls before they execute and checks for a nonempty configured key. It does not validate that key or make the search itself: it blocks WebSearch with instructions for Claude to run curl. A later API failure is separate from the redirect hook.
Setup
Prerequisites
Use macOS or Linux with Claude Code, Git, Bash, curl, jq, and Python 3 available on the PATH inherited by Claude Code. The Python helpers use the standard library; there is no package install or MCP server to start. Check your terminal:
claude --version
git --version
bash --version
curl --version
jq --version
python3 --version
Install any missing prerequisite with your platform's package manager, then restart Claude Code so its hooks inherit the updated PATH.
Install and verify
Run these commands in your terminal, outside a Claude Code session:
claude plugin marketplace add justfinethanku/LEJ-Perplexity-Powered-Search-for-Claude
claude plugin install lej-pp-search@lej-marketplace --scope user
claude plugin list --json
The list should contain lej-pp-search@lej-marketplace, "scope": "user", and "enabled": true. This confirms installation only; it does not test the API or saving. See the Claude Code plugin command reference for other installation scopes.
Inside an interactive Claude Code session, the equivalent commands are:
/plugin marketplace add justfinethanku/LEJ-Perplexity-Powered-Search-for-Claude
/plugin install lej-pp-search@lej-marketplace
Start a new Claude Code session after installation. Run /lej-pp-search:help to confirm the plugin's commands are available.
Key setup
Obtain an API key from the Perplexity API console. API billing is separate from a consumer subscription; check current API pricing before making requests. Installation and local validation do not require a key or make paid API requests.
The setup command makes one small fast Agent API request to verify a key:
/lej-pp-search:setup
Claude Code loads this structure in ~/.claude/settings.json: