name: perplexity-search description: 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. metadata: openclaw: emoji: 🔍 requires: env: - PERPLEXITY_API_KEY primaryEnv: PERPLEXITY_API_KEY
Search the web using Perplexity's Search API for ranked, real-time results.
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
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
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 resultsThe 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"
}
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
Perplexity Search API: $5 per 1,000 requests
Track your usage at: https://perplexity.ai/account/api
小葱技能站7w4.net每天更新,海量AI技能等你发现。
这是一款质量良好的搜索增强工具,操作简单且安全可靠。它能快速获取实时网络搜索结果,支持按时间筛选和结果数量控制。文档清晰明了,安装配置方便,安全性方面表现突出——API 密钥不会泄露,搜索结果会自动清理危险字符防止攻击。唯一的遗憾是功能比较专一,仅能实现网络搜索,没有提供更多高级用法,且需要用户自行申请 API 密钥并承担调用费用。总体而言,适合需要获取实时信息且愿意配置 API 的用户使用。