> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tavily.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your AI agent to the web

> Add Tavily's web search, extraction, crawling, and research to Claude, Codex, Cursor, or any agent in one step, or call the API directly with a free API key.

> **For AI agents:** Use [llms.txt](https://docs.tavily.com/llms.txt) as the documentation index, [agents.md](https://docs.tavily.com/agents.md) as the setup and tool-choice guide, and [llms-full.txt](https://docs.tavily.com/llms-full.txt) for the full text of all docs. Append `.md` to any docs URL to get that page as Markdown.

Onboard your agentConnect your agent to the web with Tavily. Get started for free.

Copy setup prompt

Open the setup prompt in a coding agent

[Get API key](https://app.tavily.com)

Tavily is the web layer for AI agents: real-time **search**, page **extraction**, site **crawling** and **mapping**, and cited **research**, returned as clean, LLM-ready content.

> [tab] Claude & Claude Code
>
> [Add to Claude](https://claude.ai/directory/tavily)
>
> ```bash Claude Code theme={null}
> claude mcp add tavily --transport http https://mcp.tavily.com/mcp/
> ```
>
> **Claude** (claude.ai, Claude Desktop, and Cowork): click **Add to Claude**, then **Connect**, and sign in to Tavily. **Claude Code**: run the command above; Claude Code opens your browser to sign in to Tavily when you start a new session. See the [Claude guide](https://docs.tavily.com/documentation/integrations/claude.md) for the Tavily plugin and organization-wide access.

> [tab] ChatGPT & Codex
>
> [Add to ChatGPT and Codex](https://chatgpt.com/plugins/plugin_asdk_app_69f271663a288191ac98f46bed7cb032?search=tavily)
>
> ```bash Codex theme={null}
> codex mcp add tavily --url https://mcp.tavily.com/mcp/
> codex mcp login tavily
> ```
>
> Click **Add to ChatGPT and Codex** to open the Tavily plugin, then connect it and sign in to Tavily. To use the MCP server in Codex instead, run the commands above. See the [MCP guide](https://docs.tavily.com/documentation/mcp.md) for other options.

> [tab] Cursor
>
> [Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=tavily\&config=eyJ1cmwiOiJodHRwczovL21jcC50YXZpbHkuY29tL21jcC8ifQ==)
>
> ```json mcp.json theme={null}
> {
>   "mcpServers": {
>     "tavily": {
>       "url": "https://mcp.tavily.com/mcp/"
>     }
>   }
> }
> ```
>
> Click **Add to Cursor** and sign in to Tavily when Cursor prompts you, or add the server to `~/.cursor/mcp.json` yourself. For the recommended plugin setup, standalone options, and examples, see the [Cursor guide](https://docs.tavily.com/documentation/integrations/cursor.md).

> [tab] OpenCode
>
> ```bash Terminal theme={null}
> curl -fsSL https://cli.tavily.com/install.sh | bash
> tvly login
> ```
>
> ```json opencode.json theme={null}
> {
>   "$schema": "https://opencode.ai/config.json",
>   "plugin": ["opencode-tavily"]
> }
> ```
>
> Paste the setup prompt into OpenCode to let it set Tavily up, or install the Tavily CLI, sign in, and add the `opencode-tavily` plugin to your `opencode.json`. OpenCode installs the plugin on next launch. See the [OpenCode guide](https://docs.tavily.com/documentation/integrations/opencode.md) for details.

> [!TIP]
>
> No account yet? [Keyless access](https://docs.tavily.com/documentation/keyless.md) lets you call Search and Extract with no API key.

## Make your first API call

Get a free [Tavily API key](https://app.tavily.com) (1,000 API credits every month, no credit card required), install an SDK, and replace `tvly-YOUR_API_KEY` with your key.

```python Python theme={null}
# pip install tavily-python
from tavily import TavilyClient

tavily_client = TavilyClient(api_key="tvly-YOUR_API_KEY")
response = tavily_client.search("Who is Leo Messi?")

print(response)
```

```js JavaScript theme={null}
// npm i @tavily/core
const { tavily } = require("@tavily/core");

const tvly = tavily({ apiKey: "tvly-YOUR_API_KEY" });
const response = await tvly.search("Who is Leo Messi?");

console.log(response);
```

```bash cURL theme={null}
curl -X POST https://api.tavily.com/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer tvly-YOUR_API_KEY" \
  -d '{"query": "Who is Leo Messi?"}'
```

Next, see the [Python](https://docs.tavily.com/sdk/python/quick-start.md) and [JavaScript](https://docs.tavily.com/sdk/javascript/quick-start.md) SDK guides, the [API reference](https://docs.tavily.com/documentation/api-reference/endpoint/search.md), or the [Getting Started notebook](https://colab.research.google.com/drive/1dWGtS3u4ocCLebuaa8Ivz7BkZ_40IgH1) for more advanced Python workflows.

## Coding agents

> [card] [Cursor](https://docs.tavily.com/documentation/integrations/cursor.md)

> [card] [OpenCode](https://docs.tavily.com/documentation/integrations/opencode.md)

> [card] [Claude](https://docs.tavily.com/documentation/integrations/claude.md)

> [card] [Hermes Agent](https://docs.tavily.com/documentation/integrations/hermes-agent.md)

> [card] [Pi](https://docs.tavily.com/documentation/integrations/pi.md)

> [card] [NanoClaw](https://docs.tavily.com/documentation/integrations/nanoclaw.md)

> [card] [OpenClaw](https://docs.tavily.com/documentation/integrations/openclaw.md)

> [card] [Grok Build](https://docs.tavily.com/documentation/integrations/grok-build.md)

> [card] [Any other agent](https://docs.tavily.com/documentation/agent-skills.md)

## Frameworks and platforms

> [card] [LangChain](https://docs.tavily.com/documentation/integrations/langchain.md)

> [card] [OpenAI](https://docs.tavily.com/documentation/integrations/openai.md)

> [card] [Vercel AI SDK](https://docs.tavily.com/documentation/integrations/vercel.md)

> [card] [n8n](https://docs.tavily.com/documentation/integrations/n8n.md)

> [card] [CrewAI](https://docs.tavily.com/documentation/integrations/crewai.md)

> [card] [Mastra](https://docs.tavily.com/documentation/integrations/mastra.md)

Find more in the **Integrations** tab.

## Explore the API

> [card] [Search](https://docs.tavily.com/documentation/api-reference/endpoint/search.md)
>
> Search the web for current, relevant sources.

> [card] [Extract](https://docs.tavily.com/documentation/api-reference/endpoint/extract.md)
>
> Pull clean content from one or more URLs.

> [card] [Research](https://docs.tavily.com/documentation/api-reference/endpoint/research.md)
>
> Get a cited report from multi-source research.

> [card] [Crawl](https://docs.tavily.com/documentation/api-reference/endpoint/crawl.md)
>
> Read many pages across a site.

> [card] [Map](https://docs.tavily.com/documentation/api-reference/endpoint/map.md)
>
> Discover a site's structure.

> [card] [Playground](https://app.tavily.com/playground)
>
> Try the APIs in your browser.

## Need help?

Email [support@tavily.com](mailto:support@tavily.com), ask in the [community](https://community.tavily.com/), or check [Tavily status](https://status.tavily.com/).
