What can you do with it?
The /perplexity
command gives you access to real-time web research powered by Perplexity’s AI. You can get current news, analyze market trends, find academic papers, research any topic with up-to-date information, and even process files (PDFs, Word docs, Excel sheets) as part of your research queries.
How to use it?
Basic Command Structure
/perplexity [your research question or topic]
Parameters
Required:
query
- Your research question or topic (e.g., “latest AI developments”, “climate change policy updates”)
Optional:
-
model
- AI model to use: sonar
(default, fast), sonar-pro
(advanced), sonar-deep-research
(comprehensive), sonar-reasoning
(fast reasoning), sonar-reasoning-pro
(premium reasoning)
-
max_tokens
- Maximum response length (default: 1000)
-
temperature
- Response creativity level (0-1, default: 0.7)
-
search_domain_filter
- Include or exclude specific websites (e.g., ["wikipedia.org", "cnn.com"]
or ["-pinterest.com"]
)
-
search_recency_filter
- Time period for results: "day"
, "week"
, "month"
, "year"
-
return_images
- Include images in results (true/false, default: false)
-
return_related_questions
- Include related questions (true/false, default: false)
-
search_context_size
- Amount of search context: "low"
, "medium"
, "high"
-
response_format
- Structure output as JSON schema or regex pattern
-
file_urls
- Array of file URLs to process (supports PDF, DOCX, XLSX, PPTX, CSV)
Sample response:
{
"output": "Research results formatted as markdown with citations [1][2].",
"raw": {
"id": "7a6d3b4c-2ea2-4b7a-9df2-5c6ccbb8c93f",
"model": "sonar",
"created": 1751904325,
"usage": {
"prompt_tokens": 39,
"completion_tokens": 145,
"total_tokens": 184,
"search_context_size": "low"
},
"citations": [
"https://example.com/source1",
"https://example.com/source2"
],
"search_results": [
{
"title": "Example Search Result Title",
"url": "https://example.com/source1",
"date": "2025-01-01",
"last_updated": "2025-01-02"
}
],
"object": "chat.completion",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "Research results formatted as markdown with citations [1][2]."
},
"delta": {
"role": "assistant",
"content": ""
}
}
]
},
"metadata": {
"model": "sonar",
"tokens": {
"input": 39,
"output": 145
},
"usage": {
"prompt_tokens": 39,
"completion_tokens": 145,
"total_tokens": 184
}
}
}
Examples
Basic Research
/perplexity
query: what are the latest developments in quantum computing
Get current information on any topic with real-time web search.
Advanced Research with Filters
/perplexity
query: climate change policy updates
search_domain_filter: reuters.com, bbc.com
search_recency_filter: week
model: sonar-pro
Research specific topics with domain filtering, time constraints, and advanced AI model.
Structured Data Research
/perplexity
query: analyze Tesla's recent stock performance and return as JSON with categories for stock_price, recent_news, and analyst_ratings
response_format: json_schema
json_schema: {
"type": "object",
"properties": {
"stock_price": {
"type": "object",
"properties": {
"current_price": {"type": "number"},
"price_change": {"type": "number"},
"percentage_change": {"type": "number"},
"period": {"type": "string"}
},
"required": ["current_price", "price_change", "percentage_change"]
},
"recent_news": {
"type": "array",
"items": {
"type": "object",
"properties": {
"headline": {"type": "string"},
"summary": {"type": "string"},
"impact": {"type": "string", "enum": ["positive", "negative", "neutral"]},
"date": {"type": "string"}
},
"required": ["headline", "summary", "impact"]
}
},
"analyst_ratings": {
"type": "object",
"properties": {
"consensus": {"type": "string", "enum": ["buy", "hold", "sell"]},
"target_price": {"type": "number"},
"num_analysts": {"type": "integer"},
"upgrades": {"type": "integer"},
"downgrades": {"type": "integer"}
},
"required": ["consensus", "target_price"]
}
},
"required": ["stock_price", "recent_news", "analyst_ratings"]
}
Get structured, organized research results perfect for data analysis or integration with other tools.
See LLM File Type Support for detailed information about file formats supported by Perplexity and other models. Note that Perplexity has no native file support and relies on preprocessors for document handling.
Supported Models
Choose the appropriate model based on your research needs:
Search Models
sonar
(default) - Lightweight search model for quick factual queries and topic summaries
sonar-pro
- Advanced search model with better grounding for complex queries (200k context)
This model can take longer to process. Use only when enhanced accuracy is critical.
sonar-deep-research
- Expert-level research model for comprehensive reports
This model may take 30+ minutes. Use async endpoints for this model.
Reasoning Models
sonar-reasoning
- Fast reasoning model with search capabilities
sonar-reasoning-pro
- Premier reasoning model powered by DeepSeek R1 with Chain of Thought
Offline Model
r1-1776
- Offline chat model (no search) for creative content and traditional LLM tasks