Skip to main content
When interacting with our API, it’s important to understand the different error codes that can occur during a request. These error codes help indicate what went wrong and can guide you in troubleshooting the issue. Below is a list of common error codes returned by the API, along with their descriptions and possible solutions.

❌ Common Error Codes


Error Response Format

Error responses share the same JSON body. Use error_code to branch on the error type in your code, and message for details.

Error Handling Tips

  • Check the Response Body: The error_code and message fields tell you what went wrong and help you pinpoint the issue.
  • Rate Limits: If you encounter a 429 error, avoid sending requests too frequently. Implement exponential backoff to retry requests after waiting for the rate limit to reset.
  • Authentication: A 401 error means your API key is missing or invalid. A 403 error means your plan does not include the requested feature. Check your key and plan.
  • Testing: Always test your API calls in a controlled environment to ensure that the request format and parameters are correct.
📌 Tip: Always handle errors gracefully in your application. Proper error handling ensures that users have a better experience, even when things go wrong!

How to Handle Errors in Your Code

It’s good practice to incorporate error-handling logic in your API requests. Here’s an example in Python for handling different types of errors:

Python Example: