Skip to main content

Perplexity

AI-powered search and research with real-time web access.

Provider: Perplexity AI
Authentication: API Key required
Category: AI & Research
Credit Cost: 3 credits per query

Overview

Perplexity tools provide AI-powered search capabilities that combine real-time web search with large language model reasoning. Get answers grounded in current sources with citations, making it ideal for research, fact-checking, and knowledge synthesis.

Key Features

  • Real-time Web Access: Searches the internet for current information
  • Source Citations: Answers include links to source materials
  • Specialized Modes: Academic papers, arXiv, SEC filings, Wikipedia
  • Domain Filtering: Restrict searches to specific domains
  • Date Filtering: Focus on content from specific time periods

Setup

Get Perplexity API Key

  1. Go to Perplexity API Settings
  2. Click "Generate API Key"
  3. Copy the generated key (starts with pplx-)

Add to Reeva

  1. Dashboard → AccountsAdd Account
  2. Select Perplexity
  3. Paste your API key
  4. Click Save

Available Tools

Perplexity Ask

General-purpose AI question answering with web search.

Tool ID: Perplexity_Ask
Credit Cost: 3 credits

Parameters:

  • question (string, required): What you want Perplexity to answer
    • Length: 5-2000 characters
  • model (string, optional): Model to use
    • Default: "sonar-pro"
  • max_tokens (integer, optional): Maximum tokens to generate
    • Default: 1024
    • Range: 1-8192
  • temperature (number, optional): Sampling temperature
    • Default: 0.2
    • Range: 0-1 (lower = more focused, higher = more creative)
  • system_prompt (string, optional): Custom system guidance
    • Maximum: 4000 characters

Response:

{
"answer": "The James Webb Space Telescope (JWST) is a space telescope...",
"citations": [
{
"url": "https://webb.nasa.gov/",
"title": "James Webb Space Telescope - NASA"
},
{
"url": "https://www.space.com/jwst-discoveries",
"title": "JWST Discoveries - Space.com"
}
],
"model": "sonar-pro",
"usage": {
"prompt_tokens": 45,
"completion_tokens": 256
}
}

Example Usage:

# Python - Basic question
response = client.call_tool(
name="Perplexity_Ask",
arguments={
"question": "What are the latest developments in quantum computing?"
}
)

print(response["answer"])
print("\nSources:")
for citation in response.get("citations", []):
print(f" - {citation['title']}: {citation['url']}")
// TypeScript - With custom system prompt
const response = await client.callTool({
name: "Perplexity_Ask",
arguments: {
question: "Compare React and Vue.js for enterprise applications",
system_prompt: "You are a senior software architect. Provide detailed technical comparisons with pros and cons.",
max_tokens: 2048
}
});
# cURL
curl -X POST https://api.joinreeva.com/mcp/server_YOUR_ID \
-H "Authorization: Bearer mcpk_your_key" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "Perplexity_Ask",
"arguments": {
"question": "What is MCP (Model Context Protocol)?",
"max_tokens": 1500
}
},
"id": 1
}'

Use Cases:

  • General research questions
  • Technical explanations
  • Current events and news
  • Fact-checking and verification
  • Summarizing complex topics

Web search with domain filtering and date constraints.

Tool ID: Perplexity_Grounded_Search
Credit Cost: 3 credits

Parameters:

  • messages (array, required): Chat messages with role and content
    • Include system and user messages as needed
  • model (string, optional): Model to use
    • Default: "sonar-pro"
  • max_tokens (integer, optional): Maximum tokens
    • Default: 1024
  • temperature (number, optional): Sampling temperature
    • Default: 0.2
  • search_domain_filter (array, optional): Allowlist or denylist of domains
    • Maximum: 20 domains
    • Allowlist: ["wikipedia.org", "nasa.gov"]
    • Denylist: ["-reddit.com", "-twitter.com"] (prefix with -)
  • search_after_date_filter (string, optional): Only include content after this date
    • Format: "1/1/2024" or "2024-01-01"
  • search_before_date_filter (string, optional): Only include content before this date
  • search_context_size (integer, optional): Amount of search context to use

Response:

{
"answer": "According to NASA, the JWST has discovered...",
"citations": [
{"url": "https://nasa.gov/jwst", "title": "JWST - NASA"}
],
"model": "sonar-pro"
}

Example Usage:

# Python - Domain-restricted search
response = client.call_tool(
name="Perplexity_Grounded_Search",
arguments={
"messages": [
{"role": "system", "content": "You are a research assistant."},
{"role": "user", "content": "What are the latest JWST discoveries?"}
],
"search_domain_filter": ["nasa.gov", "space.com", "esa.int"],
"search_after_date_filter": "1/1/2024"
}
)
// TypeScript - Exclude certain domains
const response = await client.callTool({
name: "Perplexity_Grounded_Search",
arguments: {
messages: [
{role: "user", content: "What is the current state of AI regulation?"}
],
search_domain_filter: ["-reddit.com", "-twitter.com", "-facebook.com"],
search_after_date_filter: "6/1/2024"
}
});

Use Cases:

  • Research from trusted sources only
  • Exclude social media from results
  • Time-bound research
  • Domain-specific investigations

Domain Filter Tips:

  • Use allowlist for authoritative sources
  • Use denylist (prefix -) to exclude unreliable sources
  • Cannot mix allowlist and denylist in same request
  • Maximum 20 domains per request

Search arXiv preprints and research papers.

Tool ID: Perplexity_Arxiv_Search
Credit Cost: 3 credits

Parameters:

  • query (string, required): Research question to search on arXiv
  • model (string, optional): Model to use
    • Default: "sonar-pro"
  • max_tokens (integer, optional): Maximum tokens
    • Default: 1024
  • temperature (number, optional): Sampling temperature
    • Default: 0.2
  • search_after_date_filter (string, optional): Papers after this date
  • search_before_date_filter (string, optional): Papers before this date
  • search_context_size (integer, optional): Amount of context to use

Response:

{
"answer": "Recent arXiv papers on diffusion models show...",
"citations": [
{
"url": "https://arxiv.org/abs/2301.12345",
"title": "Advances in Diffusion Models for Image Generation"
}
]
}

Example Usage:

# Python - Search recent ML papers
response = client.call_tool(
name="Perplexity_Arxiv_Search",
arguments={
"query": "State of the art in large language model reasoning",
"search_after_date_filter": "1/1/2024"
}
)

print("Research Summary:")
print(response["answer"])
// TypeScript - Physics research
const response = await client.callTool({
name: "Perplexity_Arxiv_Search",
arguments: {
query: "Quantum error correction recent advances",
max_tokens: 2048
}
});

Use Cases:

  • Literature reviews
  • Finding recent papers
  • Understanding research trends
  • Technical deep dives
  • Pre-print discovery

Search Academic Papers

Search scholarly and peer-reviewed publications.

Tool ID: perplexity_Search_Academic_Papers
Credit Cost: 3 credits

Parameters:

  • query (string, required): Academic or scholarly research question
  • model (string, optional): Model to use
    • Default: "sonar-pro"
  • max_tokens (integer, optional): Maximum tokens
    • Default: 1024
  • temperature (number, optional): Sampling temperature
    • Default: 0.2
  • search_after_date_filter (string, optional): Papers after this date
  • search_before_date_filter (string, optional): Papers before this date

Response:

{
"answer": "Peer-reviewed research indicates that...",
"citations": [
{
"url": "https://doi.org/10.1234/example",
"title": "Journal Article Title"
}
]
}

Example Usage:

# Python - Academic research
response = client.call_tool(
name="perplexity_Search_Academic_Papers",
arguments={
"query": "What is the effectiveness of cognitive behavioral therapy for anxiety?",
"search_after_date_filter": "1/1/2020"
}
)
// TypeScript - Medical research
const response = await client.callTool({
name: "perplexity_Search_Academic_Papers",
arguments: {
query: "Latest clinical trials on mRNA vaccines",
max_tokens: 2048
}
});

Use Cases:

  • Medical and clinical research
  • Social science studies
  • Peer-reviewed evidence
  • Systematic reviews
  • Academic citations

Difference from arXiv Search:

  • Academic Papers: Broader scholarly sources including journals
  • arXiv Search: Specifically arXiv preprints (CS, physics, math, etc.)

Search Financial Data

Search SEC filings and official financial documents.

Tool ID: perplexity_Search_Financial_Data
Credit Cost: 3 credits

Parameters:

  • query (string, required): Financial question or SEC filings request
  • model (string, optional): Model to use
    • Default: "sonar-pro"
  • max_tokens (integer, optional): Maximum tokens
    • Default: 1024
  • temperature (number, optional): Sampling temperature
    • Default: 0.2
  • search_after_date_filter (string, optional): Filings after this date
  • search_before_date_filter (string, optional): Filings before this date

Response:

{
"answer": "According to Apple Inc.'s latest 10-K filing...",
"citations": [
{
"url": "https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=0000320193",
"title": "Apple Inc. SEC Filings"
}
]
}

Example Usage:

# Python - Analyze company filings
response = client.call_tool(
name="perplexity_Search_Financial_Data",
arguments={
"query": "What are the key risk factors in Tesla's latest 10-K?",
"search_after_date_filter": "1/1/2024"
}
)
// TypeScript - Financial research
const response = await client.callTool({
name: "perplexity_Search_Financial_Data",
arguments: {
query: "Compare revenue growth of FAANG companies in latest quarterly reports"
}
});

SEC Filing Types:

FilingDescription
10-KAnnual report
10-QQuarterly report
8-KCurrent report (material events)
S-1IPO registration
DEF 14AProxy statement

Use Cases:

  • Company financial analysis
  • Risk factor assessment
  • Earnings and revenue research
  • Regulatory compliance tracking
  • Investment research

Search and summarize Wikipedia articles.

Tool ID: Perplexity_Wikipedia_Search
Credit Cost: 3 credits

Parameters:

  • query (string, required): Question to answer using Wikipedia sources
  • model (string, optional): Model to use
    • Default: "sonar-pro"
  • max_tokens (integer, optional): Maximum tokens
    • Default: 1024
  • temperature (number, optional): Sampling temperature
    • Default: 0.2
  • search_after_date_filter (string, optional): Content after this date
  • search_before_date_filter (string, optional): Content before this date

Response:

{
"answer": "The James Webb Space Telescope, according to Wikipedia...",
"citations": [
{
"url": "https://en.wikipedia.org/wiki/James_Webb_Space_Telescope",
"title": "James Webb Space Telescope - Wikipedia"
}
]
}

Example Usage:

# Python - Encyclopedia lookup
response = client.call_tool(
name="Perplexity_Wikipedia_Search",
arguments={
"query": "What is the history of the Turing Award?"
}
)
// TypeScript - Historical research
const response = await client.callTool({
name: "Perplexity_Wikipedia_Search",
arguments: {
query: "Timeline of major events in World War II",
max_tokens: 2048
}
});

Use Cases:

  • Encyclopedia lookups
  • Historical information
  • General knowledge queries
  • Background research
  • Quick fact-finding

Common Patterns

Research Pipeline

# Multi-source research workflow
def comprehensive_research(topic):
# Step 1: General overview
overview = client.call_tool(
name="Perplexity_Ask",
arguments={
"question": f"Give me a comprehensive overview of {topic}",
"max_tokens": 2000
}
)

# Step 2: Academic sources
academic = client.call_tool(
name="perplexity_Search_Academic_Papers",
arguments={
"query": f"Recent peer-reviewed research on {topic}",
"search_after_date_filter": "1/1/2023"
}
)

# Step 3: arXiv preprints
arxiv = client.call_tool(
name="Perplexity_Arxiv_Search",
arguments={
"query": f"Latest research papers on {topic}",
"search_after_date_filter": "1/1/2024"
}
)

return {
"overview": overview["answer"],
"academic_research": academic["answer"],
"latest_preprints": arxiv["answer"],
"all_citations": (
overview.get("citations", []) +
academic.get("citations", []) +
arxiv.get("citations", [])
)
}

Financial Analysis

# Analyze company financials
def analyze_company(ticker):
# Get financial data
financials = client.call_tool(
name="perplexity_Search_Financial_Data",
arguments={
"query": f"Summarize {ticker} latest 10-K filing key metrics and risk factors",
"max_tokens": 2000
}
)

# Get recent news (excluding social media)
news = client.call_tool(
name="Perplexity_Grounded_Search",
arguments={
"messages": [
{"role": "user", "content": f"What is the latest news about {ticker}?"}
],
"search_domain_filter": ["-twitter.com", "-reddit.com"],
"search_after_date_filter": "1/1/2024"
}
)

return {
"financial_summary": financials["answer"],
"recent_news": news["answer"]
}

Fact-Checking

# Verify claims with trusted sources
def fact_check(claim):
# Check Wikipedia
wiki = client.call_tool(
name="Perplexity_Wikipedia_Search",
arguments={"query": claim}
)

# Check academic sources
academic = client.call_tool(
name="perplexity_Search_Academic_Papers",
arguments={"query": claim}
)

# Check trusted news sources
news = client.call_tool(
name="Perplexity_Grounded_Search",
arguments={
"messages": [{"role": "user", "content": claim}],
"search_domain_filter": [
"reuters.com", "apnews.com", "bbc.com", "npr.org"
]
}
)

return {
"wikipedia": wiki["answer"],
"academic": academic["answer"],
"news": news["answer"]
}

Best Practices

Query Formulation

  • Be specific and clear in your questions
  • Include context for better answers
  • Use appropriate specialized search for domain-specific queries
  • Frame questions to get actionable answers

Model Settings

  • Lower temperature (0.1-0.3) for factual queries
  • Higher temperature (0.5-0.7) for creative tasks
  • Increase max_tokens for comprehensive answers
  • Use system_prompt to guide response format

Source Selection

  • Use domain filters for authoritative sources
  • Exclude social media for fact-based research
  • Use date filters for current information
  • Match tool to research type (academic, financial, etc.)

Cost Management

  • Each query costs 3 credits
  • Combine related questions when possible
  • Use appropriate max_tokens limits
  • Cache results for repeated queries

Troubleshooting

"No relevant results" Error

Cause: Query too narrow or no matching content

Solutions:

  • Broaden your search query
  • Remove date filters temporarily
  • Try different phrasing
  • Use a less restrictive domain filter

Incomplete Answers

Cause: max_tokens limit reached

Solutions:

  • Increase max_tokens parameter
  • Ask more focused questions
  • Break complex queries into parts

Irrelevant Citations

Cause: Query matches tangential content

Solutions:

  • Be more specific in your question
  • Use domain filters to restrict sources
  • Add context in system prompt
  • Use specialized search tools

Rate Limiting

Cause: Too many requests

Solutions:

  • Add delays between requests
  • Batch related queries
  • Check Perplexity API limits
  • Monitor usage in dashboard

See Also