perplexity-search — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited perplexity-search (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use the Perplexity API for AI-powered web search and research. Perplexity's Sonar models combine large language models with real-time web search to provide accurate, cited answers.
PERPLEXITY_API_KEY environment variable setcurl -s https://api.perplexity.ai/chat/completions \
-H "Authorization: Bearer $PERPLEXITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sonar",
"messages": [
{"role": "user", "content": "What are the latest React 19 features?"}
]
}' | jq '.choices[0].message.content'| Model | Best For | Context |
|---|---|---|
sonar | General web search, quick answers | 128K |
sonar-pro | Complex research, multi-step reasoning | 200K |
sonar-reasoning | Deep analysis with chain-of-thought | 128K |
sonar-reasoning-pro | Most thorough research and reasoning | 128K |
sonar-deep-research | Comprehensive multi-source deep dives | 128K |
import requests
import os
def perplexity_search(query: str, model: str = "sonar") -> dict:
"""Search the web using Perplexity API."""
response = requests.post(
"https://api.perplexity.ai/chat/completions",
headers={
"Authorization": f"Bearer {os.environ['PERPLEXITY_API_KEY']}",
"Content-Type": "application/json",
},
json={
"model": model,
"messages": [{"role": "user", "content": query}],
},
)
data = response.json()
return {
"answer": data["choices"][0]["message"]["content"],
"citations": data.get("citations", []),
}
result = perplexity_search("What are the best practices for Next.js 15 App Router?")
print(result["answer"])
for i, url in enumerate(result["citations"], 1):
print(f"[{i}] {url}")import OpenAI from "openai";
const perplexity = new OpenAI({
apiKey: process.env.PERPLEXITY_API_KEY,
baseURL: "https://api.perplexity.ai",
});
async function search(query: string, model = "sonar") {
const response = await perplexity.chat.completions.create({
model,
messages: [{ role: "user", content: query }],
});
return {
answer: response.choices[0].message.content,
citations: (response as any).citations ?? [],
};
}response = requests.post(
"https://api.perplexity.ai/chat/completions",
headers={
"Authorization": f"Bearer {os.environ['PERPLEXITY_API_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "sonar-pro",
"messages": [
{
"role": "system",
"content": "You are a technical researcher. Provide detailed, accurate answers with specific version numbers and code examples."
},
{
"role": "user",
"content": "Compare Bun vs Deno vs Node.js performance benchmarks in 2025"
}
],
# Filter to specific domains
"search_domain_filter": ["github.com", "stackoverflow.com", "dev.to"],
# Only recent results
"search_recency_filter": "month", # day, week, month
# Temperature for response generation
"temperature": 0.2,
# Return related follow-up questions
"return_related_questions": True,
},
)import requests
import json
response = requests.post(
"https://api.perplexity.ai/chat/completions",
headers={
"Authorization": f"Bearer {os.environ['PERPLEXITY_API_KEY']}",
"Content-Type": "application/json",
},
json={
"model": "sonar",
"messages": [{"role": "user", "content": "Latest TypeScript 5.5 features"}],
"stream": True,
},
stream=True,
)
for line in response.iter_lines():
if line:
data = line.decode("utf-8").removeprefix("data: ")
if data == "[DONE]":
break
chunk = json.loads(data)
content = chunk["choices"][0]["delta"].get("content", "")
if content:
print(content, end="", flush=True)result = perplexity_search(
"What are the main competitors to Stripe for payment processing? "
"Compare pricing, features, and market share as of 2025.",
model="sonar-pro"
)result = perplexity_search(
"What are the security best practices for JWT token handling "
"in Node.js applications? Include recent CVEs and vulnerabilities.",
model="sonar-reasoning"
)result = perplexity_search(
"What is the current market size for AI code assistants? "
"Include growth projections and key players.",
model="sonar-deep-research"
)result = perplexity_search(
"Is it true that React Server Components eliminate the need "
"for getServerSideProps in Next.js? Explain with citations.",
model="sonar"
)For direct Claude Code integration, use the official Perplexity MCP server:
# Install via Homebrew
brew install perplexityai/tap/pplx-mcp
# Or via Go
go install github.com/perplexityai/modelcontextprotocol/cmd/pplx-mcp@latestAdd to Claude Code MCP config:
{
"mcpServers": {
"perplexity": {
"command": "pplx-mcp",
"env": {
"PERPLEXITY_API_KEY": "pplx-..."
}
}
}
}Source: Perplexity API Docs, perplexityai/modelcontextprotocol
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.