First, we wish you a Happy New Coding Year!
For this new year, we are proud and very excited to launch our API Developer Portal: https://dev.blablacar.com
This portal will help everyone to build innovative mobility solutions, that feature carpooling trips.
It gathers all documentations and guides about integrating with BlaBlaCar, to easily connect with developers and partners and to help develop carpooling. It’s the best way to connect to the BlaBlaCar’s API, which gives access to the trip inventory of BlaBlaCar.
Discover on it how the BlaBlaCar API can easily enhance your app’s user experience and take your innovation further with a wide range of new capabilities.
BlaBlaCar’s API is a standard RESTful API, resources-based (even if we have extended the concept to provide an experience view of resources), with a bit of HATEOAS, and a touch of magic. We support both XML and JSON format, JSON being the default one.
The integration process is very simple:
- Open an account on dev.blablacar.com
- Create your API key on the dashboard
- Test it live on the API Explorer
- Integrate it right away in your project using your favorite language / tool / libraries
New accounts start with a small quota to be able to do some queries right away. Bigger quotas are attributed on demand after a proven successful integration.
What can be done?
The API gives access to our inventory of trips with free seats. You can request for a specific axis on a given date, and add some criterias to narrow the results to your expectations. For example, you can request for trips with more than 1 seat with the “seats=” parameter, or you can ask for all trips which start from Paris next Friday evening.
How to make queries?
You will need to send a GET query to: > https://public-api.blablacar.com/api/v2/trips
and add your queries parameters.
All available parameters are explained on the developer portal.
We are using the awesome open-source API gateway: Kong to serve public-api.blablacar.com and to isolate our backend servers. We plugged it to Cassandra DB, for scalability. The portal itself is hosted by Gelato, another great Mashape tool. Gelato maintain the list of API consumers on our Kong cluster, and their associated API keys (see: Using Gelato with Kong).
We also uses the open-source kong-dashboard tool, to facilitate the administration of Kong, and our usual stack of Grafana / Kibana to monitor the cluster health and follow the http logs.
This configuration allows us to scale and to maintain an updated list of consumers while being efficient in developing new features.
We’d love to work with developers who are willing to integrate carpooling in their service!
Learn more and dive into the developer docs over at dev.blablacar.com