Errors Code
Last updated: April 2, 2025
When using the Tavily API, you may encounter various HTTP errors code. These errors indicate issues with the request and can help diagnose problems quickly. Below is a guide to common HTTP errors and how to resolve them.
400 Bad Request
Error Message: 400 Bad Request
Cause: This error occurs when the request parameters are incorrect or invalid. For example, specifying a topic that is not supported.
Solution:
Check that all required parameters are included in the request.
Verify that the values provided match the expected format.
401 Unauthorized
Error Message: 401 Unauthorized: missing or invalid API key
Cause: This error occurs when the API key is missing, incorrect, or expired.
Solution:
Ensure that you have included a valid API key in your request.
Check if your API key has expired or been revoked.
If you're unsure, generate a new API key from your Tavily Dashboard.
432 Plan Limit Exceeded
Error Message: This request exceeds your plan's set usage limit. Please upgrade your plan or contact support@tavily.com.
Cause: Your request goes beyond the limits set by your subscription plan.
Solution:
Upgrade your plan to increase your usage limits via the Tavily Dashboard.
433 Pay-As-You-Go Limit Exceeded
Error Message: This request exceeds the pay-as-you-go limit. You can increase your limit on the Tavily dashboard
Cause: Your request exceeds your current pay-as-you-go usage limit.
Solution:
Increase your limit via the Tavily dashboard.
429 Too Many Requests
Error Message: 429 Your request has been blocked due to excessive requests. Please reduce rate of requests.
Cause: This error occurs when you send too many requests in a short period, exceeding the allowed rate limit.
Solution:
Reduce the frequency of your requests.
Implement rate limiting or exponential backoff in your application.
500 Internal Server Error
Error Message: 500 Internal Server Error
Cause: This error indicates an issue on Tavily’s servers.
Solution:
Retry the request after a few minutes.
If the issue persists, contact support@tavily.com for further assistance.
Best Practices to Avoid Errors
Always validate request parameters before sending.
Monitor your API usage to avoid exceeding limits.
Implement error handling and retries in your application.
Keep your API key secure and up to date.