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:
Use the Parallel search and extract tools with a tool-calling model. For synthesized research answers, see the Parallel Responses API.

Use Parallel Search over MCP

For agent loops that should call Parallel without the langchain-parallel package, connect to Parallel’s hosted MCP server with MCPAdapter. The server exposes web_search and web_fetch (plus other tools). Without a Parallel API key, those tools are available at lower rate limits in fast mode. You still need credentials for your chat model.
This path requires langchain[mcp]>=1.4.0.
The agent can call web_search, then web_fetch on a result URL, and use the returned excerpts and links in its answer. To raise rate limits or unlock web_research, authenticate with a Parallel API key. Pass a FastMCP Client with a bearer token into MCPAdapter:
For connection details, tool arguments, and override headers, see Parallel MCP and LangChain MCP. Prefer ParallelSearchTool above when you want typed Search API parameters in process.

Response format

API reference

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