⚠️ Search V2 - Errors management

The API’s errors codes are the same as HTTP’s error codes.
You may check with CURL requests, like below:

curl -i https://public-api.blablacar.com/api/v2/trips

In this example, the API key is missing, so it fails with:

HTTP/1.1 401 Unauthorized

curl -i https://public-api.blablacar.com/api/v2/trips?key=test

In this example, the API key is wrong and it returns:

HTTP/1.1 403 Forbidden

Possibles error codes:

  • 400 Bad Request

Solution: check the parameters of the query and their formats

  • 404 Not Found

in the case of a business error, you may receive a detailed error message like the following example:

{
  "error": {
    "code": "x",
    "developper-message": "trip.not_found",
    "message": "The ride you are looking for does not exist",
    "support-link": "https://www.blablacar.co.uk/contact"
  }
}

NB: in this case, the quota is still consumed as the query is considered valid

  • 429 Quota exceeded

There are quota limitations for each account.
The first tier is limited to 1000 queries / Day (and 100 / min).

You can check the remaining and consumed quota for your account with the HTTP response headers of API queries: 

curl -i https://public-api.blablacar.com/api/v2/trips
X-RateLimit-Limit-day: 1000
X-RateLimit-Remaining-day: 985
X-RateLimit-Limit-hour: 100
X-RateLimit-Remaining-hour: 97

 

 

Was this article helpful?
0 out of 0 found this helpful
Didn't find what you're looking for? Contact us