Status Codes
Just Serp API uses standard HTTP response codes to indicate the success or failure of an API request.
Success Codes
| Code | Meaning | Credit Charge |
|---|---|---|
200 | Success. The request was successful and the data is returned. | Yes |
Error Codes
No credits are charged for these status codes.
| Code | Meaning | Description |
|---|---|---|
400 | Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 | Unauthorized | No valid API key provided. |
402 | Insufficient Credits | Your account has run out of credits. |
403 | Forbidden | The API key doesn't have permissions for this resource. |
404 | Not Found | The requested resource doesn't exist. |
429 | Too Many Requests | You have hit your rate limit. |
500 | Server Error | Something went wrong on our end. |
503 | Service Unavailable | The server is currently unable to handle the request. |
Handling Errors
When an error occurs, the API returns a JSON object containing an error message to help you diagnose the issue:
json
{
"error": {
"code": 401,
"message": "Invalid API Key provided."
}
}We recommend implementing retry logic for 5xx errors with exponential backoff.
