1
2
3
4
from tavily import TavilyClient
tavily_client = TavilyClient(api_key="tvly-YOUR_API_KEY")
response = tavily_client.search("Who is Leo Messi?")
print(response)
1
2
3
4
const { tavily } = require('@tavily/core');
const tvly = tavily({ apiKey: "tvly-YOUR_API_KEY" });
tvly.search("Who is Leo Messi?")
.then(results => console.log(results));
1
2
3
curl -X POST 'https://api.tavily.com/search' \
-H 'Content-Type: application/json' \
-d '{"api_key": "tvly-YOUR_API_KEY", "query": "Who is Leo Messi?"}'