Skip to main content
Parallel is a real-time web search and content extraction platform built for LLMs and AI applications.
ParallelSearchTool calls Parallel’s Search API, which collapses the traditional search → scrape → extract pipeline into one call and returns structured, LLM-optimized excerpts.
ParallelSearchTool is the canonical class name. The earlier ParallelWebSearchTool continues to work as an alias for the same class. Looking for a BaseRetriever to drop into a RAG chain instead? See ParallelSearchRetriever.

Overview

Integration details

Setup

The integration lives in the langchain-parallel package.

Credentials

Head to Parallel to sign up and generate an API key. Set PARALLEL_API_KEY in your environment:

Instantiation

Invocation

Invoke directly with args

The tool requires search_queries (one or more keyword strings). Pair it with an objective for richer relevance ranking, and add domain filtering, fetch policies, and other settings as needed.
mode="basic" is the lower-latency setting; mode="advanced" runs a higher-quality search.

Invoke with a ToolCall

Invoking with a model-generated ToolCall returns a ToolMessage:

Async usage

Parameters

Required

  • search_queries: list of keyword strings (3-6 words each works best).

Optional

  • objective: natural-language description of the retrieval goal.
  • max_results: number of results to return (default 10).
  • excerpts: per-result excerpt settings, e.g. {"max_chars_per_result": 1500}.
  • mode: "basic" (lower latency) or "advanced" (higher quality).
  • source_policy: domain filtering. Accepts a SourcePolicy pydantic model or a raw dict with include_domains / exclude_domains / after_date.
  • fetch_policy: cache control, e.g. {"max_age_seconds": 86400, "timeout_seconds": 60}.
  • max_chars_total: cap on combined excerpt length across all results.
  • client_model / session_id / location: forwarded to Parallel for downstream attribution and personalization.
  • include_metadata: include client-side timing in the response (default True).
  • timeout: per-request timeout in seconds.

SourcePolicy pydantic model

SourcePolicy mirrors the API’s include_domains / exclude_domains / after_date. Use it for type safety; raw dicts are also accepted.

Chaining

Bind the tool to any tool-calling chat model and drive an agent with create_agent:
ChatParallel itself does not support tool calling. Use it as a research assistant inside a chain, or use the Parallel search/extract tools alongside another tool-calling model.

Response format

API reference

For detailed documentation, head to the ParallelSearchTool API reference or the Parallel Search reference.