← 返回
开发者工具 Key 中文

Perplexity Search Skill

Search the web using Perplexity's Search API for ranked, real-time web results with advanced filtering. Use when you need to search for current information, market research, trending topics, or when Brave Search is unavailable. Supports recency filtering (day/week/month/year) and returns structured results with titles, URLs, and snippets.
{"status": "success", "content": "您好!请问有什么问题或需要帮助的地方吗?无论是生活疑惑、知识查询,还是创意灵感,我都很乐意协助您。请随时告诉我~"}
m4vf14
开发者工具 clawhub v1.0.0 1 版本 99432.4 Key: 需要
★ 2
Stars
📥 3,113
下载
💾 74
安装
1
版本
#latest

概述

Perplexity Search

Search the web using Perplexity's Search API for ranked, real-time results.

Quick Start

Basic search:

python3 {baseDir}/scripts/search.py "your search query"

With options:

# Get 10 results
python3 {baseDir}/scripts/search.py "AI trends 2024" --count 10

# Filter by recency
python3 {baseDir}/scripts/search.py "recent AI news" --recency week

# Get raw JSON output
python3 {baseDir}/scripts/search.py "market research" --json

API Key Setup

The script requires a PERPLEXITY_API_KEY environment variable.

Option 1: Set in OpenClaw config (recommended)

Add to ~/.openclaw/openclaw.json:

{
  "skills": {
    "perplexity-search": {
      "env": {
        "PERPLEXITY_API_KEY": "your-api-key-here"
      }
    }
  }
}

Option 2: Environment variable

export PERPLEXITY_API_KEY="your-api-key-here"

Get your API key from: https://perplexity.ai/account/api

Parameters

  • query - Search query string (required)
  • --count N - Number of results (1-10, default: 5)
  • --recency FILTER - Recency filter: day, week, month, or year
  • --json - Output raw JSON instead of formatted results

Response Format

The API returns:

{
  "results": [
    {
      "title": "Article title",
      "url": "https://example.com/article",
      "snippet": "Brief excerpt from the page...",
      "date": "2024-01-15",
      "last_updated": "2024-02-01"
    }
  ],
  "id": "search-request-id"
}

Use Cases

Market Research:

python3 {baseDir}/scripts/search.py "golf coaching Instagram trends" --count 10

Recent News:

python3 {baseDir}/scripts/search.py "AI regulation updates" --recency week

Competitive Analysis:

python3 {baseDir}/scripts/search.py "AI golf training apps" --count 10

Pricing

Perplexity Search API: $5 per 1,000 requests

Track your usage at: https://perplexity.ai/account/api

Security

  • API key loaded from environment only - never hardcoded
  • Output sanitization prevents terminal injection
  • Error messages don't expose sensitive information
  • 30-second timeout prevents hanging requests
  • Input validation on all parameters

Notes

  • Results are ranked by relevance
  • Includes real-time web data
  • Supports filtering by recency
  • Returns structured JSON or formatted text
  • Rate limits apply based on your Perplexity plan

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-28 13:25 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,734
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 667 📥 323,821
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 66 📥 179,859