
NewsData.io API returns various HTTP response codes depending on the request. Below are all the HTTP response codes:
| Response Code | Result | Description |
|---|---|---|
| 200 | Successful operation | This error code is returned when the API request is successful. |
| 400 | Parameter missing | This error code is returned when the API request is malformed or contains invalid parameters. For example, if you forget to include the apikey parameter in your request, the API will return a 400 Bad Request error or parameter missing. |
| 401 | Unauthorized | This error code is returned when the API key is invalid or missing. Make sure you have a valid API key and that it is included in the request. |
| 403 | CORS policy failed. IP/Domain restricted | This error can occur when the client making the API request is trying to access a resource on a different domain or IP address, and the server has not been configured to allow cross-origin resource sharing (CORS) from that domain or IP. |
| 409 | Parameter duplicate | This error code can occur when a parameter is passed to the API with a duplicate value. To avoid this error, ensure that all parameters passed have unique values, and only include each parameter once in your request. |
| 415 | Unsupported type | This error code can occur when the API is unable to process a request because the request is in a format that is not supported by the API. |
| 422 | Unprocessable entity | This error in Newsdata.io API can occur when the API is unable to process a request due to a semantic error in the request, typically indicating that the request is well-formed, but the server is unable to understand or fulfill it. |
| 429 | Too many requests | This error code is returned when you have exceeded the rate limit for your plan. You will need to wait for the rate limit to reset before making further requests. |
| 500 | Internal server error | This error code is returned when there is an unexpected error on the server. This is usually a temporary issue and you should try your request again later. |
Was this page helpful?