Skip to main content
For AI agents: a documentation index is available at https://docs.parallel.ai/llms.txt. The full text of all docs is at https://docs.parallel.ai/llms-full.txt. You may also fetch any page as Markdown by appending .md to its URL or sending Accept: text/markdown.For Search and Extract, use /v1/search and /v1/extract for all new integrations and agent tool calls. Use /v1beta/search and /v1beta/extract only when maintaining an existing integration that already uses them. The request bodies changed too: on /v1/extract, full_content, fetch_policy and excerpt_settings go inside advanced_settings, and sending the v1beta top-level excerpts, full_content and fetch_policy to /v1/extract returns a 422. Do not substitute /v1 for the documented FindAll or Ingest endpoint paths.
Add Parallel’s search and extract tools to your LangChain applications.
View the complete repository for this integration here

Features

  • Search Tools: ParallelWebSearchTool - Direct access to Parallel’s Search API
  • Extract Tools: ParallelExtractTool - Clean content extraction from web pages
  • Async/Await: Full asynchronous operation support
  • LangChain Integration: Seamless integration with LangChain ecosystem

Installation

Setup

  1. Get your API key from Parallel
  2. Set your API key as an environment variable:

Search API

The Search API provides direct access to Parallel’s web search capabilities, returning structured, compressed excerpts optimized for LLM consumption.

ParallelWebSearchTool

The search tool provides direct access to Parallel’s Search API:

Search API Configuration

turbo mode requires langchain-parallel v0.5.0 or later.

Search with Specific Queries

You can provide specific search queries instead of an objective:

Tool Usage in Agents

The search tool works seamlessly with LangChain agents. Pair it with any LangChain-compatible chat model:

Extract API

The Extract API provides clean content extraction from web pages, returning structured markdown-formatted content optimized for LLM consumption.

ParallelExtractTool

The extract tool extracts clean, structured content from web pages:

Extract with Search Objective and Advanced Options

Focus extraction on specific topics using search objectives, with control over excerpts and fetch policy:

Extract with Search Queries

Extract content relevant to specific search queries:

Content Length Control

Extract API Configuration

Extract Error Handling

The extract tool gracefully handles failed extractions:

Async Extract

Error Handling

Examples

See the docs/ directory for complete working examples:
  • docs/search_tool.ipynb - Search tool examples and tutorials
  • docs/extract_tool.ipynb - Extract tool examples and tutorials
Examples include:
  • Basic synchronous usage
  • Async operations
  • Tool usage in agents