AgentSkillsCN

parallel-ai

一款利用Parallel AI API进行网络搜索、数据提取与研究的工具。适用于需要网络搜索、从URL提取数据、丰富公司数据,或分析市场趋势的场景。无需SDK,即可直接通过API访问Search、Extract、Task与Deep Research功能。

SKILL.md
--- frontmatter
name: parallel-ai
description: Tool for web search, data extraction, and research using Parallel AI APIs. Use when you need to search the web, extract data from URLs, enrich company data, or analyze markets. Provides direct API access to Search, Extract, Task, and Deep Research without SDK.

Parallel AI Research Tool

4 APIs for research: Search (web), Extract (URLs), Task (structured data), Deep Research (analysis)

Setup

API Key: https://platform.parallel.ai Store in: .env.local as PARALLEL_API_KEY=your-key

Load API key (Windows/Git Bash compatible):

bash
API_KEY=$(grep "^PARALLEL_API_KEY=" .env.local | cut -d= -f2)

Usage in curl:

bash
curl -s -X POST "https://api.parallel.ai/v1beta/search" \
  -H "x-api-key: $API_KEY" \
  -H "Content-Type: application/json" \
  -H "parallel-beta: search-extract-2025-10-10" \
  -d '{"objective": "your query"}'

The 4 APIs at a Glance

APIPurposeSpeedCostUse For
SearchWeb search + excerpts5-60s$0.01Quick lookups
ExtractScrape specific URLs5-30s$0.01Pricing, data
TaskStructured enrichment1-25m$0.01-0.30Companies, data
Deep ResearchMulti-source analysis5-25m$0.10-0.30Markets, reports

Processors (Pick One)

ProcessorSpeedCost/1KWhen
lite5-60s$5Simple Q&A
base15-100s$10Quick data
core1-5m$25Detailed
pro3-9m$100Analysis
ultra5-25m$300Deep

Endpoint URLs

code
POST https://api.parallel.ai/v1beta/search       (web search)
POST https://api.parallel.ai/v1beta/extract      (URL scraping)
POST https://api.parallel.ai/v1beta/tasks/runs   (research tasks)
GET  https://api.parallel.ai/v1beta/tasks/runs/{id}  (check status)

Required Headers (All Requests)

code
x-api-key: your-api-key
Content-Type: application/json
parallel-beta: search-extract-2025-10-10     (only Search/Extract)

Minimal Examples

Search: {"objective": "your question"}

Extract: {"url": "https://...", "objective": "what to extract"}

Task: {"input": "company name", "processor": "core"}

Task Status: GET /v1beta/tasks/runs/{task_id}

Task Polling Loop

code
Create task → get id
Poll every 2-5s: GET /v1beta/tasks/runs/{id}
Status: "running" → keep polling
Status: "completed" → use result
Status: "failed" → check error

Limits & Errors

  • Rate limit: 2,000 req/min → HTTP 429 (wait, retry)
  • Invalid key: HTTP 401
  • Bad request: HTTP 400 (check parameters)
  • Server error: HTTP 500/503 (retry)

See api-reference.md for complete endpoint docs See quick-reference.md for troubleshooting See research-workflows.md for real examples