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 This error occurs when the requested data cannot be found, which may be due to a faulty or incorrectly entered domain (e.g., 'fsdfsdfdsf.com' or 'CNN.COM' instead of 'cnn.com'). | 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 This error is triggered when the API key used is invalid or your account has run out of data 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 This error is returned when your account exceeds the permissible limit of requests per second. | 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 This error indicates that the requested granularity level is not supported by the AP | Refer to the error message for the dates available within your package’s range and adjust your request accordingly. |
102 | Granularity not supported This error indicates an unexpected issue on our server. It's a server-side problem. | Review the API documentation to verify the supported granularity levels and adjust your request to match these specifications. |
103 | Country not available Occurs when you request data for a country not included in your package (e.g., requesting data for Germany when your package only supports the United States). | 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 This error occurs when certain parameters in your request are incorrect or missing. It's a client-side issue that requires manual correction. | 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. Example: Request failed due to invalid start/end date. Historical data for monthly granularity is available as of 2020-07. You have requested 2019-12. Please pick a later date. |
401 | Unauthorized Access This error signifies that your API key is invalid or your Similarweb account is not active. | 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 This error is returned when your account exceeds the limit of allowed pending 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 This error indicates an unexpected issue on our server. It's a server-side problem. | 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. |
What made this section unhelpful for you?
On this page
- Error Handling & Troubleshooting