Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use Perplexity API for web-grounded AI search and research. Use when user needs up-to-date information, multi-step reasoning with web citations, exhaustive research with source references, factual queries with current events, or competitive analysis. Default when user mentions Perplexity, needs current information, or requires source citations.
.claude/skills/sundial-org-perplexity-4/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -18% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 130% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 64% | 0% |
This skill provides access to the Perplexity API for web-grounded AI search and research. It combines the power of large language models with real-time web search, providing accurate, up-to-date answers with source citations.
Use Perplexity when:
Use built-in web search when:
Choose the right model based on task complexity:
Use for simple, factual queries where speed matters.
sonar - Default search model with web access. Best for most queries.sonar-pro - Advanced search with deeper understanding.Use for complex, multi-step tasks requiring logical thinking.
sonar-reasoning - Complex reasoning with web search.sonar-reasoning-pro - Advanced reasoning with deeper content understanding.Use for comprehensive, in-depth research across multiple sources.
sonar-research - Comprehensive research with in-depth analysis.sonar-research-pro - Advanced research with exhaustive analysis and detailed reports.bash# Simple query (uses sonar by default) scripts/perplexity_search.sh "What is the capital of Germany?" # With custom model scripts/perplexity_search.sh "Latest AI developments" -m sonar-pro # Markdown format with citations scripts/perplexity_search.sh "Tesla stock analysis" -f markdown
bash# Deep research with comprehensive analysis scripts/perplexity_search.sh "Market analysis for electric vehicles in 2025" \ -m sonar-research-pro -c high -f markdown # Pro search mode (multi-step reasoning) scripts/perplexity_search.sh "Compare AI models performance benchmarks" \ -m sonar-reasoning-pro -p pro -f markdown # With custom system prompt scripts/perplexity_search.sh "Analyze tech trends" \ -s "You are a technology analyst. Focus on business implications and market trends."
Control how much web information is retrieved:
Available for sonar-pro and reasoning models. Controls multi-step tool usage:
The skill requires Perplexity API key via environment variable:
bashexport PERPLEXITY_API_KEY="your-key-here"
To set it permanently (add to ~/.bashrc or ~/.zshrc):
bashecho 'export PERPLEXITY_API_KEY="your-key-here"' >> ~/.bashrc source ~/.bashrc
Note: Do not store API key in Clawdbot config. The skill only reads from environment variable to avoid config conflicts.
The script uses bash and curl. Both are typically pre-installed on Linux systems.
bashscripts/perplexity_search.sh "Latest news about AI regulation in Europe" -m sonar
bashscripts/perplexity_search.sh "Compare iPhone 15 vs Samsung Galaxy S24 features" \ -m sonar-reasoning-pro -c high -f markdown
bashscripts/perplexity_search.sh "Electric vehicle market forecast 2025-2030" \ -m sonar-research-pro -c high -p pro -f markdown
bashscripts/perplexity_search.sh "Latest Python frameworks for web development 2025" \ -m sonar-reasoning -c medium
Perplexity API is not free. Be mindful of usage costs:
Use reasoning/research models judiciously. Default to sonar for most queries.
bashscripts/perplexity_search.sh --list-models
Error: PERPLEXITY_API_KEY environment variable not set
Error: curl command not found
apt install curl or equivalent for your systemError: Unexpected API response
Note: This skill uses external API calls. Be mindful of rate limits and costs. The API key should never be committed to version control or shared publicly.
Other measured skills in the registry, with their headline benchmark lift.