Skip to main content

Base URL

The base URL for all requests to the Tavily API is:
https://api.tavily.com

Authentication

All Tavily endpoints are authenticated using API keys. Get your free API key.
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?"}'

Endpoints

Project Tracking

You can optionally attach a Project ID to your API requests to organize and track usage by project. This is useful when a single API key is used across multiple projects or applications. To attach a project to your request, add the X-Project-ID header:
curl -X POST https://api.tavily.com/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer tvly-YOUR_API_KEY" \
  -H "X-Project-ID: your-project-id" \
  -d '{"query": "Who is Leo Messi?"}'
Key features:
  • An API key can be associated with multiple projects
  • Filter requests by project in the /logs endpoint and platform usage dashboard
  • Helps organize and track where requests originate from
When using the SDKs, you can specify a project using the project_id parameter when instantiating the client, or by setting the TAVILY_PROJECT environment variable.