# Tavily — how to use (mcp.ai)

Connect your Tavily account and use 5 tools for web scraping straight from your AI agent. Connect with your own API key. Tavily offers search and data retrieval solutions, helping teams quickly locate and filter relevant information from documents, databases, or web sources.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_tavily?ms=1787296020000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `tavily_crawl`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/tavily`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/tavily/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/tavily/crawl` — Tool to perform intelligent graph-based website crawling with parallel path exploration and content extraction. Use when you need to traverse and extract content from multiple pages of a website follo
  - body: { url: string, limit?: integer, format?: string, timeout?: integer, max_depth?: integer, max_breadth?: integer, instructions?: string, select_paths?: string[], exclude_paths?: string[], extract_depth?: string, include_usage?: boolean, allow_external?: boolean, include_images?: boolean, select_domains?: string[], exclude_domains?: string[], include_favicon?: boolean, chunks_per_source?: integer }
- `POST https://api.mcp.ai/api/tavily/extract` — Tool to extract and parse web page content from specified URLs using Tavily's extract endpoint. Use when you need to retrieve clean, structured content from web pages with optional image extraction an
  - body: { urls: string|string[], query?: string, format?: string, timeout?: number, extract_depth?: string, include_usage?: boolean, include_images?: boolean, include_favicon?: boolean, chunks_per_source?: integer }
- `POST https://api.mcp.ai/api/tavily/get/usage` — Tool to retrieve API key and account usage statistics from Tavily. Use when you need to check credit consumption, limits, and per-endpoint usage for search, extract, crawl, map, and research operation
- `POST https://api.mcp.ai/api/tavily/map` — Tool to map a website and discover its pages. Use when you need to scan a website and get a structured list of URLs/pages it contains without extracting full content.
  - body: { url: string, limit?: integer, timeout?: integer, max_depth?: integer, max_breadth?: integer, instructions?: string, select_paths?: string[], exclude_paths?: string[], include_usage?: boolean, allow_external?: boolean, select_domains?: string[], exclude_domains?: string[] }
- `POST https://api.mcp.ai/api/tavily/search` — Use this to perform a web search via the Tavily API; offers controls for search depth, content types, result count, and domain filtering. Requires an active Tavily connection (401 = auth failure). Rat
  - body: { query: string, max_results?: integer, search_depth?: string, include_answer?: boolean, include_images?: boolean, exclude_domains?: string[], include_domains?: string[], include_raw_content?: boolean }

## Example prompts
- "What can I do in Tavily?"
- "Show me a summary of my Tavily account"

## More
- Page: https://mcp.ai/tavily
- Agent spec (llms.txt): https://mcp.ai/tavily/llms.txt
- Postman collection: https://mcp.ai/tavily/postman.json
