Tavily CLI

raw JSON →
0.1.2 verified Sat May 09 auth: no python

CLI and agent tools for the Tavily API — search, extract, crawl, map, and research from the command line. Current version 0.1.2, requires Python >=3.10. Active development on GitHub.

pip install tavily-cli
error tavily.errors.AuthenticationError: API key is missing or invalid
cause TAVILY_API_KEY not set or incorrect
fix
Set TAVILY_API_KEY environment variable with a valid key from https://app.tavily.com.
error tavily.errors.RateLimitError: API rate limit exceeded
cause Too many requests in short time
fix
Wait and retry or upgrade your Tavily plan.
error AttributeError: module 'tavily' has no attribute 'TavilyClient'
cause Importing from wrong module (tavily_cli instead of tavily)
fix
Install 'tavily-python' and use: from tavily import TavilyClient
breaking API key required for all endpoints. Missing key raises AuthenticationError.
fix Set TAVILY_API_KEY environment variable or pass api_key directly.
gotcha Search results are truncated to 5 by default; no warning if more results exist.
fix Pass max_results=N to search() to get more results.
deprecated Function 'crawl' is deprecated in favor of 'extract' in v0.1.2.
fix Replace client.crawl() with client.extract().

Initialize client with API key from environment and run a search.

import os
from tavily import TavilyClient

client = TavilyClient(api_key=os.environ.get('TAVILY_API_KEY', ''))
result = client.search(query="Python typing best practices")
print(result)