Skip to main content

Tavily Search Tool

Tavily provides AI-optimized web search, content extraction, and website crawling capabilities for your agents.

Installation

Environment Variables

Get your API key at tavily.com.

Quick Start

1

Simple Usage

2

With Configuration

Adjust agent instructions, tool options, and provider settings for production — see the Configuration section below.

Using Tavily Directly

You can also use the Tavily SDK directly with AI SDK’s generateText:

Tool Options

tavilySearch

tavilyExtract

Extract content from specific URLs:

tavilyCrawl

Crawl websites starting from a base URL:

tavilyMap

Map website structure:

Examples

Research Agent

News Agent

Content Extraction Agent

Response Format

Search Response

Extract Response

Crawl Response

Best Practices

  1. Use appropriate search depth: Use basic for quick searches, advanced for comprehensive research
  2. Filter by domain: Use includeDomains to focus on authoritative sources
  3. Time-sensitive queries: Use timeRange for news or recent information
  4. Rate limiting: Tavily has rate limits; implement appropriate delays for batch operations
  5. Error handling: Always handle potential API errors gracefully

Pricing

Tavily offers:
  • Free tier: 1,000 searches/month
  • Paid plans: Higher limits and advanced features
See tavily.com/pricing for details.

Tavily CLI Usage

Command-line interface for Tavily

Tools Registry

Overview of all available tools

Exa Search

Alternative semantic search tool