360 Secure SkillHub
360 安全技能中心

Perplexity Deep Search

封装 Perplexity API 的 shell 脚本,支持 search(sonar-pro 快速事实)、reason(sonar-reasoning-pro 复杂分析)、research(sonar-deep-research 深度报告)三种模式,可用 --recency、--domains、--lang、--json 参数过滤与输出原始 JSON,密钥取自环境变量或本地文件。

ericsantos
ericsantos
热度 96.41
最近更新 2026-05-11 15:51:03
分类:搜索依赖:代码执行 / 第三方 API / 读写文件应用场景:研究 / 报告撰写 / 摘要总结

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add perplexity-deep-search
Metadata
name
perplexity
description
Deep search via Perplexity API. Three modes: search (quick facts), reason (complex analysis), research (in-depth reports). Returns AI-grounded answers with citations.
homepage
https://docs.perplexity.ai
metadata
{"clawdbot":{"emoji":"🔮","requires":{"bins":["curl","jq"]},"primaryEnv":"PERPLEXITY_API_KEY"}}

Perplexity Deep Search

AI-powered web search with three modes for different depth levels.

Quick Start

# Quick search (sonar) - facts, summaries, current events
{baseDir}/scripts/search.sh "latest AI news"

# Reasoning (sonar-reasoning-pro) - complex analysis, multi-step
{baseDir}/scripts/search.sh --mode reason "compare React vs Vue for enterprise apps"

# Deep Research (sonar-deep-research) - full reports, exhaustive analysis
{baseDir}/scripts/search.sh --mode research "market analysis of AI in healthcare 2025"

Modes

Mode Model Best For Cost
search (default) sonar-pro Quick facts, summaries, current events Low
reason sonar-reasoning-pro Complex analysis, comparisons, problem-solving Medium
research sonar-deep-research In-depth reports, market analysis, literature reviews High

Options

Flag Description Default
--mode search, reason, research search
--recency hour, day, week, month —
--domains Comma-separated domain filter —
--lang Language code (pt, en, es, etc.) —
--json Raw JSON output off

Examples

# Search with recency filter
{baseDir}/scripts/search.sh --recency week "OpenAI latest announcements"

# Search restricted to specific domains
{baseDir}/scripts/search.sh --domains "arxiv.org,nature.com" "transformer architecture advances"

# Search in Portuguese
{baseDir}/scripts/search.sh --lang pt "inteligência artificial no Brasil"

# Deep research with JSON output
{baseDir}/scripts/search.sh --mode research --json "enterprise AI adoption trends"

API Key

Set PERPLEXITY_API_KEY env var, or store it in a file:

mkdir -p ~/.config/perplexity
echo "your_key_here" > ~/.config/perplexity/api_key
chmod 600 ~/.config/perplexity/api_key

The script checks the env var first, then falls back to the file.

Pricing Reference

  • Search (sonar-pro): ~$0.01/query
  • Reasoning (sonar-reasoning-pro): ~$0.02/query
  • Deep Research (sonar-deep-research): ~$0.40/query (uses many searches + reasoning)

Use search for everyday queries. Reserve research for when you truly need exhaustive analysis.