Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

BlaBlaCar Client Api

Project description

BlaBlaCar API Client Python Library

PyPI version

Easily search for trips!


Works on both 2.7.x and 3.x python.

pip install blablacar-api


from blablacarapi import BlaBlaCarApi

# initialize API
api = BlaBlaCarApi(api_key="__your_api_key_here__")

# fetch trips from London to Paris
trips = api.trips(frm="London", to="Paris")

# after fetching you have:
# trips.trips
# trips.top_trips
# trips.pager
# trips.facets
# trips.savings
# trips.distance
# trips.duration
# trips.recommended_price

# iterate over the trips
for trip in trips.trips:
	print("%s: %s -> %s" % (trip.departure_date, trip.departure_place['address'], trip.arrival_place['address']))
	# fetch data for one trip using trip id
	single_trip = api.trip(trip.permanent_id)

# paging
trips.pager.has_next() # True or False # returns 2 if the current page is 1
trips.pager.has_previous() # True or False
trips.pager.previous() # returns False if the current page is 1, and it returns 1 if current page is 2


api = BlaBlaCarApi(api_key="__your_blablacar_api_key_here__", locale="en_GB", currency="en_GB")


If you want to debug your code using the data regarding the API call.

# initialize with debug=True
api = BlaBlaCarApi(api_key="...", debug=True)

# after every API call the client library will automatically print all the data to standard output

# and you can always have all debug data in your code
debug_data =

Official documentation

For more information visit official documentation:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for BlaBlaCar-API, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size BlaBlaCar_API-0.2.3-py2.py3-none-any.whl (8.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size BlaBlaCar API-0.2.3.tar.gz (6.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page