mcpField
P
perplexity-search

perplexity-search

github.com/dotneetProductivity3455 installsUpdated 40w ago
Repository

About perplexity-search

A skill for using the Perplexity API to answer questions, research topics, reason through problems, and retrieve web results. It is for agents that need current information or source material.

Key features

  1. 01Quick answers with perplexity_ask
  2. 02Deep research reports
  3. 03Reasoning with perplexity_reason
  4. 04Web result retrieval

Use cases

  1. 01Checking current news or weather
  2. 02Researching a technical topic
  3. 03Analyzing a complex question
  4. 04Collecting URLs and search snippets

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/dotneet/claude-code-marketplace --skill perplexity-search

After installing, type/perplexity-searchin Claude Code to confirm it loaded.

Bundled filesreferences/api_reference.mdscripts/perplexity_api.py

Details

From the project README

Perplexity Search Skill

A skill for executing real-time web searches and research using the Perplexity API.

Purpose

This skill provides the following capabilities:

  1. perplexity_ask - Answer general questions (using sonar-pro model)
  2. perplexity_research - Deep research and comprehensive reports (using sonar-deep-research model)
  3. perplexity_reason - Advanced reasoning and analysis (using sonar-reasoning-pro model)
  4. perplexity_search - Retrieve web search results

When to Use

Use this skill in the following situations:

  • User needs up-to-date information
  • Received a question requiring web search
  • Asked to perform deep research or investigation
  • Complex analysis or reasoning is required
  • Keywords like "look up", "search for", "latest..." are included

Prerequisites

  • PERPLEXITY_API_KEY environment variable must be set
  • Internet connection must be available

Usage

Basic Usage

Use the scripts/perplexity_api.py script to call the API.

# General questions (ask)
python3 scripts/perplexity_api.py ask "your question"

# Deep research (research)
python3 scripts/perplexity_api.py research "research topic"

# Advanced reasoning (reason)
python3 scripts/perplexity_api.py reason "reasoning task"

# Web search (search)
python3 scripts/perplexity_api.py search "search query" [--max-results 10] [--country JP]
Command Options
ask / research / reason
  • First argument: question, research topic, or reasoning task
  • --strip-thinking: Remove <think>...</think> tags to save context tokens (research/reason only)
search
  • First argument: search query
  • --max-results: Maximum number of results to return (1-20, default: 10)
  • --max-tokens-per-page: Maximum tokens per page (256-2048, default: 1024)
  • --country: ISO code for regional results (e.g., JP, US, GB)

Workflow

Standard Search Flow
  1. Analyze the user's question and select the appropriate tool

    • Simple questions → ask
    • Deep research → research
    • Complex analysis → reason
    • Information gathering → search
  2. Execute the script to call the API

  3. Present results to the user, citing sources when available

Tool Selection Guidelines
Use CaseToolDescription
Current weather, newsaskWhen quick answers are needed
Technical topic researchresearchWhen comprehensive analysis is needed
Complex problem analysisreasonWhen logical reasoning is needed
Collecting sourcessearchWhen URLs or snippets are needed

API Details

For detailed API specifications, see references/api_reference.md.

Troubleshooting

  • API Key Error: Verify the PERPLEXITY_API_KEY environment variable
  • Timeout: Increase PERPLEXITY_TIMEOUT_MS (default: 300000ms)
  • Proxy Issues: Set PERPLEXITY_PROXY or HTTPS_PROXY

Comments

Markdown supported