Available Tools
Search
Find URLs, facts, and recent news with ranked search results
Ask
Get quick AI-answered questions with citations using Sonar Pro
Research
Conduct deep multi-source investigation with Sonar Deep Research
Reason
Analyze complex problems with step-by-step logic and reasoning
Tool Comparison
| Tool | Model | Speed | Best For | Returns |
|---|---|---|---|---|
| search | Search API | Fast | Finding URLs, verifying facts, recent news | Raw search results with titles, URLs, snippets |
| ask | sonar-pro | Fast | Quick questions, summaries, explanations | AI-generated text with citations |
| research | sonar-deep-research | Slow (30s+) | Literature reviews, comprehensive overviews | In-depth analysis with many citations |
| reason | sonar-reasoning-pro | Medium | Math, logic, comparisons, complex arguments | Reasoned response with chain-of-thought |
When to Use Each Tool
Use perplexity_search when...
Use perplexity_search when...
- You need to find specific URLs or websites
- You want raw search results without AI interpretation
- You’re checking for recent news or events
- You need to verify facts across multiple sources
- You want to discover available sources on a topic
Use perplexity_ask when...
Use perplexity_ask when...
- You need a quick factual answer
- You want a summary or explanation
- You’re asking general Q&A questions
- Speed and cost efficiency are priorities
- You need citations for your answer
Use perplexity_research when...
Use perplexity_research when...
- You need comprehensive, multi-source analysis
- You’re conducting literature reviews
- You want thorough investigative research
- Quality and depth matter more than speed
- You can wait 30+ seconds for results
Use perplexity_reason when...
Use perplexity_reason when...
- You’re solving math or logic problems
- You need step-by-step reasoning
- You’re comparing multiple options
- You’re analyzing complex arguments
- You want to see the AI’s thinking process
Common Patterns
Search Refinement Flow
Start withperplexity_search to discover sources, then use perplexity_ask for synthesized answers:
Research to Reasoning Flow
Useperplexity_research for broad context, then perplexity_reason for specific analysis:
Advanced Features
Search Filters
Bothperplexity_ask and perplexity_reason support advanced filtering:
Token Optimization
Forperplexity_research and perplexity_reason, use strip_thinking to reduce token usage:
Best Practices
Choose the Right Tool
Use the comparison table above to select the optimal tool for your task
Use Filters Wisely
Apply recency and domain filters to get more relevant results faster
Optimize Tokens
Enable
strip_thinking when you don’t need to see the reasoning processHandle Timeouts
Set
PERPLEXITY_TIMEOUT_MS higher for deep research queriesError Handling
All tools are read-only and safe to use, but can fail due to:- Invalid API Key: Ensure
PERPLEXITY_API_KEYis set correctly - Network Issues: Check connectivity and proxy settings
- Timeouts: Research queries may exceed default timeout (increase
PERPLEXITY_TIMEOUT_MS) - Invalid Messages: Ensure messages array has proper
roleandcontentfields
All tools are idempotent within a short time window but results may change as web content updates.
Next Steps
Search Tool
Learn about web search parameters and response formats
Ask Tool
Explore Sonar Pro for quick AI-answered questions
Research Tool
Discover deep research capabilities with Sonar Deep Research
Reason Tool
Master advanced reasoning with Sonar Reasoning Pro