Error Handling & Troubleshooting
REST API
Here are the various HTML responses you may receive when using Similarweb REST API:
Code | Description | Solution |
|---|---|---|
401 | Data not found | Double-check the domain name for accuracy. Ensure it is entered correctly and in the proper format (e.g., lowercase for domains and without additional paths like '/sports'). |
403 | Invalid API key / No Credits | Visit the API management page on the Similarweb platform to verify your API key and check the remaining data credits. Ensure your key is correctly entered and your account has sufficient credits. |
429 | Too many requests | Reduce the frequency of your requests to stay within the limits. Consider spacing out your requests or implementing a rate limiter to avoid this error. |
101 | Dates not in range | Refer to the error message for the dates available within your package’s range and adjust your request accordingly. |
102 | Granularity not supported | Review the API documentation to verify the supported granularity levels and adjust your request to match these specifications. |
103 | Country not available | Use the 'Check Capabilities' endpoint to confirm the countries included in your package. Ensure your requests are limited to these countries. |
Batch API
Here are the various HTML responses you may receive when using Similarweb Batch API:
Code | Description | Solution |
|---|---|---|
400 | Bad request | Review and correct the parameters in your request. For the given example, you need to adjust the start date to a month and year that is within the available data range. |
401 | Unauthorized Access | Ensure that your API key is correctly entered and that your account is active. If you continue to experience issues or need assistance with your API key, please reach out to our support team. |
429 | Too Many Requests | Reduce the frequency of your requests to stay within the limits of your account. Consider reviewing your request strategy or upgrade your account for higher limits if necessary. |
500 | Internal error | Implement a retry policy. You can either manually resubmit your request after some time or utilize our 'retry' endpoint to automatically resubmit your request. If the error persists, contact our support team for further assistance. |
On this page
- Error Handling & Troubleshooting