searchwebextraction

Parallel gives AI agents best-in-class tools to search and extract context from the web. Web results returned by Parallel are compressed for optimal token efficiency at inference time.

Installation

pnpm install @parallel-web/ai-sdk-tools
# Add to your .env file
PARALLEL_API_KEY=your_api_key_here

Usage

import { generateText, gateway, stepCountIs } from 'ai';
import { searchTool, extractTool } from '@parallel-web/ai-sdk-tools';
const { text } = await generateText({
model: gateway('google/gemini-3-pro-preview'),
prompt: 'When was Vercel Ship AI?',
tools: {
webSearch: searchTool,
webExtract: extractTool,
},
stopWhen: stepCountIs(3),
});
console.log(text);