What does the 40101 error mean?
When using the DataForSEO SERP API, you may receive a task with the 40101 status code and the following message:
{
"status_code": 40101,
"status_message": "Internal SE Server Error."
}
This error indicates that the search engine returned an error while processing the request. Below, we explain what causes the 40101 Internal SE Server Error, how DataForSEO handles such requests, and why they may still have an associated cost even though no results are returned.
What causes the 40101 error?
The 40101 Internal SE Server Error means that the request was successfully submitted to the search engine, but the search engine returned an error while processing it.
When this happens, DataForSEO automatically retries the request several times. If the search engine continues to return the same error after these attempts, the task is completed with the following status:
{
"status_code": 40101,
"status_message": "Internal SE Server Error.",
"result_count": 0,
"result": null
}
As a result, the task may contain no SERP data even though the request itself was successfully submitted and processed.
Why is a request with the 40101 error still billable?
A 40101 response does not mean that the request failed to reach the search engine.
Instead, it indicates that the request was successfully submitted for processing, and DataForSEO used the necessary infrastructure and processing resources to retrieve the requested SERP data. This also includes the automatic retry attempts performed when the search engine initially returns an error.
If the search engine continues to return an error after these attempts and the expected results cannot be retrieved, the request is still billable because processing resources have already been used.
Example of an API response returning the 40101 error
{
"version": "0.1.20260717",
"status_code": 20000,
"status_message": "Ok.",
"time": "22.3177 sec.",
"cost": 0.002,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "07231252-7652-0139-0000-301b3ccdda6f",
"status_code": 40101,
"status_message": "Internal SE Server Error.",
"time": "22.2466 sec.",
"cost": 0.002,
"result_count": 0,
"path": [
"v3",
"serp",
"google",
"organic",
"live",
"advanced"
],
"data": {
"api": "serp",
"function": "live",
"se": "google",
"se_type": "organic",
"keyword": "affordable car insurance policy",
"device": "mobile",
"os": "ios",
"location_code": "2840",
"language_code": "en",
"load_async_ai_overview": true
},
"result": null
}
]
}
Why does the overall response show a 20000 status code?
The status codes and messages provided in the response body refer to different levels of the API response. The status_code and status_message parameters indicated after the version in the response describe the status of your API call, while the status_code and status_message provided in the array of tasks describe the status of a particular task, e.g. retrieving Organic Google SERP data.
That is why, you may see that the top-level statuses return:
{
"status_code": 20000,
"status_message": "Ok."
}
while the individual task returns:
{
"status_code": 40101,
"status_message": "Internal SE Server Error."
}
Here’s what they mean here:
20000at the top level indicates that the API request itself was successfully accepted and processed by DataForSEO.40101provided in the array oftasksindicates that the search engine still returned an error after system retries.
We recommend checking the status_code and status_message of each individual task in addition to the top-level response status when handling API responses.
Refer to the Errors endpoint of our documentation to get the full list of DataForSEO’s internal status codes and messages.