| API | Speed | Use Case |
|---|---|---|
| Search | 1-5s | Quick web lookups, gather sources |
| Extract | 1-5s | Pull content from specific URLs |
| Task | 10s-25min | Deep research with structured output and citations |
| Monitor | Scheduled | Track topics over time, detect changes |
Prerequisites
The following examples require theparallel-web and openai libraries and an API key which can be obtained from Parallel.
Search API
Fast web search for recent information. Returns raw results that your agent synthesizes.Extract API
Pull content from specific URLs in clean markdown format. Handles JavaScript-heavy pages and PDFs.Task API
Deep research with structured output and citations. Use for company enrichment, market research, and analysis tasks.Task Processors
| Processor | Speed | Depth | Use Case |
|---|---|---|---|
lite | ~10s | Surface | Quick facts, simple lookups |
base | ~60s | Standard | Company research, market analysis |
pro | ~5min | Deep | Comprehensive reports |
ultra | ~25min | Exhaustive | Due diligence, academic research |
default_processor at toolkit level.
Output Schema Types
| Type | Description |
|---|---|
{"type": "auto"} | Auto-detect structure from query |
{"type": "text"} | Plain text response |
{"type": "json", "json_schema": {...}} | Structured JSON matching your schema |
"description string" | Auto-generate schema from description |
Monitor API
Track topics over time and detect changes. Run monitors on a schedule to catch new developments.Monitor Frequencies
| Frequency | Value | Use Case |
|---|---|---|
| Hourly | "1h" | Fast-moving markets, breaking news |
| Daily | "1d" | General competitive intel |
| Weekly | "1w" | Industry trends |
| Monthly | "30d" | Quarterly reviews |
Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
api_key | Optional[str] | None | Parallel API key. Falls back to PARALLEL_API_KEY env var. |
enable_search | bool | True | Enable Search API. |
enable_extract | bool | True | Enable Extract API. |
enable_task | bool | False | Enable Task API (deep research). |
enable_monitor | bool | False | Enable Monitor API (web tracking). |
all | bool | False | Enable all tools. Overrides individual flags. |
max_results | int | 10 | Default max results for search. |
max_chars_per_result | int | 10000 | Default max characters per search result. |
mode | Optional[str] | None | Search mode: "turbo", "basic", or "advanced". Uses "advanced" when unset. |
include_domains | Optional[List[str]] | None | Restrict search to these domains. |
exclude_domains | Optional[List[str]] | None | Exclude these domains from search. |
max_age_seconds | Optional[int] | None | Cache age threshold (minimum 600). |
disable_cache_fallback | Optional[bool] | None | Disable cache fallback behavior. |
default_processor | str | "base" | Task API processor tier. |
default_monitor_processor | Literal["lite", "base"] | "lite" | Monitor API processor. |
default_monitor_frequency | str | "1d" | Monitor run frequency. |
default_timeout | int | 1800 | Task result timeout in seconds. |
default_output_schema | Optional[Union[Dict, str]] | None | Schema for structured task output. |
Toolkit Functions
Search and Extract APIs
| Function | Description |
|---|---|
parallel_search | Search the web with natural language objective. Returns URLs, titles, publish dates, and excerpts. Parameters: objective (str), search_queries (list), max_results (int), max_chars_per_result (int). |
parallel_extract | Extract content from URLs. Returns clean markdown with excerpts or full content. Parameters: urls (list), objective (str), search_queries (list), max_chars_per_excerpt (int), full_content (bool), max_chars_for_full_content (int). |
Task API
| Function | Description |
|---|---|
create_task | Create a research task without waiting. Returns run_id for later retrieval. Parameter: query (str). |
get_task_result | Get completed task result. Blocks until done or timeout. Returns structured content and citations. Parameter: run_id (str). |
get_task_status | Check task status without blocking. Returns status, processor, and timestamps. Parameter: run_id (str). |
Monitor API
| Function | Description |
|---|---|
create_monitor | Create a monitor for a query. Returns monitor_id, status, frequency. Parameter: query (str). |
get_monitor | Retrieve monitor configuration. Parameter: monitor_id (str). |
update_monitor | Update frequency or query. Parameters: monitor_id (str), frequency (str), query (str). |
list_monitors | List all monitors with optional filters. Parameters: status (“active”/“cancelled”), monitor_type (“event_stream”/“snapshot”), limit (int). |
get_monitor_events | Get detected changes. Returns events with content and citations. Parameters: monitor_id (str), include_completions (bool), limit (int). |
cancel_monitor | Permanently stop a monitor. Parameter: monitor_id (str). |