Skip to main content
Parallel is a real-time web search and content extraction platform built for LLMs and AI applications.
ParallelExtractTool calls Parallel’s Extract API, which returns clean, markdown-formatted content from web pages, with optional focused excerpts driven by a search_objective. Pair it with ParallelSearchTool to build a search → extract pipeline.

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

Multiple URLs in a single call:

Invoke with a ToolCall

Invoking with a model-generated ToolCall returns a ToolMessage:

Async usage

Focused excerpts

Drive excerpt selection with a search_objective (or search_queries). Setting full_content=False skips the full markdown body and returns only matched excerpts:

Fetch policy and full-content sizing

Control caching, timeouts, and the per-URL full_content cap independently:
full_content precedence. An explicit FullContentSettings (or dict) on the call always wins over the tool-level max_chars_per_extract. The latter only applies when you pass full_content=True as a plain bool.

Per-URL error handling

Failed URLs are returned as items with error_type set, so partial-success is the default:

Parameters

Required

  • urls: list of URLs to extract.

Optional

  • search_objective: natural-language description that drives excerpt selection.
  • search_queries: list of keyword strings used together with (or in place of) search_objective.
  • excerpts: per-result excerpt settings. Pass ExcerptSettings(max_chars_per_result=…) (or a dict) to control per-result excerpt size; omit for the API default.
  • full_content: True to return full markdown content (sized by the tool-level max_chars_per_extract), False to skip it, or FullContentSettings(max_chars_per_result=…) for fine-grained control.
  • fetch_policy: cache control, e.g. {"max_age_seconds": 86400, "timeout_seconds": 60}.
  • max_chars_total: cap on combined output length across all URLs.
  • client_model / session_id: forwarded to Parallel for downstream attribution.

Chaining

Bind the tool to any tool-calling chat model and drive an agent with create_agent:

Search → extract

Hand ParallelSearchTool and ParallelExtractTool to the same agent. The model uses search to find URLs and extract to drill into the ones it picks.

Response format

API reference

For detailed documentation, head to the ParallelExtractTool API reference or the Parallel Extract reference.