Search API

Trips

Allow access to car sharing trips on BlaBlaCar. The results are identical to those obtained for a similar search on the associated website. Follow the links: each trip result includes a "links" to get more details on this specific trip. There are 3 links and you should use them instead of trying to reconstruct them.

Search

Open in API Explorer
GET /api/v2/trips

Search for trips on BlaBlaCar’s database.

Example Request

Format:
curl --request GET \
  --url 'https://public-api.blablacar.com/api/v2/trips?fn=Paris&tn=London&locale=en_GB&_format=json&cur=EUR&fc=48.756%257C7.268&tc=48.756%257C7.268&db=2016-09-05&de=2016-09-07&hb=7&he=14&page=1&seats=1&photo=1&fields=user%252Ctrips&sort=trip_price&order=desc&limit=50&radius=10' \
  --header 'accept: application/json' \
  --header 'key: YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://public-api.blablacar.com/api/v2/trips?fn=Paris&tn=London&locale=en_GB&_format=json&cur=EUR&fc=48.756%257C7.268&tc=48.756%257C7.268&db=2016-09-05&de=2016-09-07&hb=7&he=14&page=1&seats=1&photo=1&fields=user%252Ctrips&sort=trip_price&order=desc&limit=50&radius=10")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["key"] = 'YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "public-api.blablacar.com",
  "port": null,
  "path": "/api/v2/trips?fn=Paris&tn=London&locale=en_GB&_format=json&cur=EUR&fc=48.756%257C7.268&tc=48.756%257C7.268&db=2016-09-05&de=2016-09-07&hb=7&he=14&page=1&seats=1&photo=1&fields=user%252Ctrips&sort=trip_price&order=desc&limit=50&radius=10",
  "headers": {
    "accept": "application/json",
    "key": "YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("public-api.blablacar.com")

headers = {
    'accept': "application/json",
    'key': "YOUR API KEY HERE"
    }

conn.request("GET", "/api/v2/trips?fn=Paris&tn=London&locale=en_GB&_format=json&cur=EUR&fc=48.756%257C7.268&tc=48.756%257C7.268&db=2016-09-05&de=2016-09-07&hb=7&he=14&page=1&seats=1&photo=1&fields=user%252Ctrips&sort=trip_price&order=desc&limit=50&radius=10", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://public-api.blablacar.com/api/v2/trips?fn=Paris&tn=London&locale=en_GB&_format=json&cur=EUR&fc=48.756%257C7.268&tc=48.756%257C7.268&db=2016-09-05&de=2016-09-07&hb=7&he=14&page=1&seats=1&photo=1&fields=user%252Ctrips&sort=trip_price&order=desc&limit=50&radius=10",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "key: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://public-api.blablacar.com/api/v2/trips?fn=Paris&tn=London&locale=en_GB&_format=json&cur=EUR&fc=48.756%257C7.268&tc=48.756%257C7.268&db=2016-09-05&de=2016-09-07&hb=7&he=14&page=1&seats=1&photo=1&fields=user%252Ctrips&sort=trip_price&order=desc&limit=50&radius=10"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("key", "YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Query Parameters

Name Type Required Description Example
fn String Optional

From Name: the departure place name

Paris
tn String Optional

To Name: the arrival place name

London
locale String Required

Available locales and their possible currencies are detailed here)

en_GB
_format String Required

"json" or "xml"

json
cur String Required

Select the currency you want, depending on the requested locale. For example, with the "en_GB" locale, use GBP to get prices in British Pounds

EUR
fc String Optional

From Coordinate, as: "float|float", will be prefered to the "fn" parameter if both are presents

48.756%7C7.268
tc String Optional

To Coordinate, as: "float|float", will be prefered to the "tn" parameter if both are presents

48.756%7C7.268
db String (date-time) Optional

Date Begin, can mean one of the two following:

  • exact date of the requested search if no "de" parameter is present
  • begin of the period of the requested search, if there is also a "de" parameter

Format: "YYYY-MM-DD" or "YYYY-MM-DD HH:mm:ss"

2016-09-05
de String (date) Optional

Date End: end of the range of the requested search

Format: "YYYY-MM-DD" or "YYYY-MM-DD HH:mm:ss"

2016-09-07
hb Integer Optional

Hour Begin: hour of the earliest departure time. must be >= 0 and < 24

7
he Integer Optional

Hour End: hour of the earliest departure time. must be > 0 and <= 24 and > hb

14
page Integer Optional

Number of the requested page of result, if there is more than 1 page

1
seats Integer Optional

number of requested available seats

1
photo Boolean (integer) Optional

Limit results to trips with or without driver pictures

1
fields String Optional

Limit the response to the mentioned fields of the return values

user%2Ctrips
sort String Optional

Sorting parameter of the query. Possible values are:

  • “trip_date” or
  • ”trip_price”
trip_price
order String Optional

Order of the sorting. Only used in combination with “sort”. Possible values are:

  • “asc” or
  • “desc”
desc
limit Integer Optional

Maximum number of results requested. May results in slower and bigger queries. Must be < 100

50
radius String Optional

Maximum radius of the search, in km Default is 10% of the length of the trip

10

Responses

200 Success Trips Search response
{
  "links": {
  "links": { ... }
Object
    "_self": "http://api.blablacar.com/api/v2/trips"
String

direct URL of this query on the API

  },
  "pager": {
  "pager": { ... }
Object
    "page": 1,
Integer
    "pages": 178,
Integer
    "total": 1777,
Integer
    "limit": 10
Integer
  },
  trips: [
Array
    {
    { ... }
Object

Trip

      "links": {
      "links": { ... }
Object
        "_self": "https://public-api.blablacar.com/api/v2/trips/1234567890-foo-bar",
String

direct URL of this object on the API

        "_front": "https://www.blablacar.co.uk/trip-foo-bar-1234567890",
String

Direct URL of this object on the front website

        "_threads": "https://public-api.blablacar.com/api/v2/trips/1234567890-foo-bar/threads"
String

Direct URL of the associated "threads" object, on the API

      },
      "frequency": "foo",
String

"UNIQUE" or "REGULAR"

      "departure_date": "06/09/2016 12:40:00",
String
      "departure_place": {
      "departure_place": { ... }
Object
        "city_name": "Paris",
String
        "address": "Paris",
String
        "latitude": 48.856614,
Number
        "longitude": 2.3522219,
Number
        "country_code": "FR"
String
      },
      "arrival_place": {
      "arrival_place": { ... }
Object
        "items": "foo",
String

Array Items

        "city_name": "Paris",
String
        "address": "Paris",
String
        "latitude": 48.856614,
Number
        "longitude": 2.3522219,
Number
        "country_code": "FR"
String
      },
      "price": {
      "price": { ... }
Object
        "value": 12,
Integer
        "currency": "GBP",
String
        "symbol": "£",
String
        "string_value": "£12",
String
        "price_color": "GREEN"
String
      },
      "price_with_commission": {
      "price_with_commission": { ... }
Object
        "value": 12,
Integer
        "currency": "GBP",
String
        "symbol": "£",
String
        "string_value": "£12",
String
        "price_color": "GREEN"
String
      },
      "seats_left": 42,
Integer
      "seats": 42,
Integer
      "duration": {
      "duration": { ... }
Object
        "value": 10198,
Integer
        "unity": "s"
String
      },
      "distance": {
      "distance": { ... }
Object
        "value": 10198,
Integer
        "unity": "s"
String
      },
      "permanent_id": "123456789-paris-rennes",
String
      "car": {
      "car": { ... }
Object
        "model": "XSARA",
String
        "make": "CITROEN",
String
        "comfort": "Normal",
String

Possible values: "Luxury", "Comfortable", "Normal"

        "comfort_nb_star": 2
Integer
      },
      "viaggio_rosa": true,
Boolean (Literals)

Is this a women only trip?

      "is_comfort": true,
Boolean (Literals)

Is this a "max 2 in the back seats" trip?

      "freeway": true,
Boolean (Literals)

Will the trip use an highway?

      "booking_mode": "auto",
String
  • "auto": the passenger books his seat online automatically or
  • "manual": the passenger makes a booking request to the driver (he has to accept it)
      "booking_type": "online",
String
  • "no_booking": the trip is offered without a booking system: passengers contact drivers to request a seat (and pays in cash in the car)
  • "online": the passenger will pay all the trip on the website or on the apps
  • "onboard": the passenger books the seat online but pays the driver cash in the car
      "locations_to_display": [
    "Tourcoing",
    "Paris",
    "Angers"
  ]
Array

What are at are the stopovers that the driver will do before / after this trip?

    }
  ]
  top_trips: [
Array
    {
    { ... }
Object

Trip

      "links": {
      "links": { ... }
Object
        "_self": "https://public-api.blablacar.com/api/v2/trips/1234567890-foo-bar",
String

direct URL of this object on the API

        "_front": "https://www.blablacar.co.uk/trip-foo-bar-1234567890",
String

Direct URL of this object on the front website

        "_threads": "https://public-api.blablacar.com/api/v2/trips/1234567890-foo-bar/threads"
String

Direct URL of the associated "threads" object, on the API

      },
      "frequency": "foo",
String

"UNIQUE" or "REGULAR"

      "departure_date": "06/09/2016 12:40:00",
String
      "departure_place": {
      "departure_place": { ... }
Object
        "city_name": "Paris",
String
        "address": "Paris",
String
        "latitude": 48.856614,
Number
        "longitude": 2.3522219,
Number
        "country_code": "FR"
String
      },
      "arrival_place": {
      "arrival_place": { ... }
Object
        "items": "foo",
String

Array Items

        "city_name": "Paris",
String
        "address": "Paris",
String
        "latitude": 48.856614,
Number
        "longitude": 2.3522219,
Number
        "country_code": "FR"
String
      },
      "price": {
      "price": { ... }
Object
        "value": 12,
Integer
        "currency": "GBP",
String
        "symbol": "£",
String
        "string_value": "£12",
String
        "price_color": "GREEN"
String
      },
      "price_with_commission": {
      "price_with_commission": { ... }
Object
        "value": 12,
Integer
        "currency": "GBP",
String
        "symbol": "£",
String
        "string_value": "£12",
String
        "price_color": "GREEN"
String
      },
      "seats_left": 42,
Integer
      "seats": 42,
Integer
      "duration": {
      "duration": { ... }
Object
        "value": 10198,
Integer
        "unity": "s"
String
      },
      "distance": {
      "distance": { ... }
Object
        "value": 10198,
Integer
        "unity": "s"
String
      },
      "permanent_id": "123456789-paris-rennes",
String
      "car": {
      "car": { ... }
Object
        "model": "XSARA",
String
        "make": "CITROEN",
String
        "comfort": "Normal",
String

Possible values: "Luxury", "Comfortable", "Normal"

        "comfort_nb_star": 2
Integer
      },
      "viaggio_rosa": true,
Boolean (Literals)

Is this a women only trip?

      "is_comfort": true,
Boolean (Literals)

Is this a "max 2 in the back seats" trip?

      "freeway": true,
Boolean (Literals)

Will the trip use an highway?

      "booking_mode": "auto",
String
  • "auto": the passenger books his seat online automatically or
  • "manual": the passenger makes a booking request to the driver (he has to accept it)
      "booking_type": "online",
String
  • "no_booking": the trip is offered without a booking system: passengers contact drivers to request a seat (and pays in cash in the car)
  • "online": the passenger will pay all the trip on the website or on the apps
  • "onboard": the passenger books the seat online but pays the driver cash in the car
      "locations_to_display": [
    "Tourcoing",
    "Paris",
    "Angers"
  ]
Array

What are at are the stopovers that the driver will do before / after this trip?

    }
  ]
  facets: [
Array
    {
    { ... }
Object

Facet

      "name": "seats",
String

Name of this property. May be "seats", "date", "hour", "price", "photo", "experience" or "car_comfort"

      "type": "checkbox",
String

Type of this value, may be "checkbox", "radio" or "custom"

      items: [
Array
        {
        { ... }
Object

Items

          "value": 1,
Integer
          "count": 118,
Integer
          "is_selected": false
Boolean
        }
      ]
    }
  ]
  "distance": 297,
Integer

Distance in km of the requested axis, if possible

  "duration": 10198,
Integer

Default duration of the requested axis, if possible

  "recommended_price": "21",
String

Default price of the requested axis, if possible

  "savings": "63"
String

Default savings possible on this axis

}

Trip Details

Open in API Explorer
GET /api/v2/trips/{Trip_ID}

Get the details of a specific trip

Example Request

Format:
curl --request GET \
  --url 'https://public-api.blablacar.com/api/v2/trips/123456789-paris-angers?locale=en_GB&_format=json' \
  --header 'accept: application/json' \
  --header 'key: YOUR API KEY HERE'
require 'uri'
require 'net/http'

url = URI("https://public-api.blablacar.com/api/v2/trips/123456789-paris-angers?locale=en_GB&_format=json")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'
request["key"] = 'YOUR API KEY HERE'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "public-api.blablacar.com",
  "port": null,
  "path": "/api/v2/trips/123456789-paris-angers?locale=en_GB&_format=json",
  "headers": {
    "accept": "application/json",
    "key": "YOUR API KEY HERE"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("public-api.blablacar.com")

headers = {
    'accept': "application/json",
    'key': "YOUR API KEY HERE"
    }

conn.request("GET", "/api/v2/trips/123456789-paris-angers?locale=en_GB&_format=json", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://public-api.blablacar.com/api/v2/trips/123456789-paris-angers?locale=en_GB&_format=json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "key: YOUR API KEY HERE"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://public-api.blablacar.com/api/v2/trips/123456789-paris-angers?locale=en_GB&_format=json"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")
	req.Header.Add("key", "YOUR API KEY HERE")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
Trip_ID String Required

Identifier of the requested trip

123456789-paris-angers

Query Parameters

Name Type Required Description Example
locale String Required

Available locales and their possible currencies are detailed here)

en_GB
_format String Required

"json" or "xml"

json

Responses

200 Success

Detailled information about the requested trip

Trips Trip detail
{
  "links": {
  "links": { ... }
Object
    "_self": "http://api.blablacar.com/api/v2/trips/586929454-paris-angers?_locale=en_GB",
String
    "_front": "http://www.blablacar.co.uk/trip-paris-angers-586929454",
String
    "_threads": "http://api.blablacar.com/api/v2/trips/586929454-paris-angers/threads?_locale=en_GB"
String
  },
  "frequency": "UNIQUE",
String
  "departure_date": "06/09/2016 15:50:00",
String
  "departure_place": {
  "departure_place": { ... }
Object
    "city_name": "Paris",
String
    "address": "Paris",
String
    "latitude": 48.856614,
Number
    "longitude": 2.3522219,
Number
    "country_code": "FR"
String
  },
  "arrival_place": {
  "arrival_place": { ... }
Object
    "city_name": "Angers",
String
    "address": "Angers",
String
    "latitude": 47.4787067,
Number
    "longitude": -0.563575,
Number
    "country_code": "FR"
String
  },
  "price": {
  "price": { ... }
Object
    "value": 12,
Integer
    "currency": "GBP",
String
    "symbol": "£",
String
    "string_value": "£12",
String
    "price_color": "GREEN"
String
  },
  "price_with_commission": {
  "price_with_commission": { ... }
Object
    "value": 15,
Integer
    "currency": "GBP",
String
    "symbol": "£",
String
    "string_value": "£15",
String
    "price_color": "GREEN"
String
  },
  "seats_left": 2,
Integer
  "seats": 2,
Integer
  "seats_count_origin": 2,
Integer
  "duration": {
  "duration": { ... }
Object
    "value": 10198,
Integer
    "unity": "s"
String
  },
  "distance": {
  "distance": { ... }
Object
    "value": 297,
Integer
    "unity": "km"
String
  },
  "permanent_id": "586929454-paris-angers",
String
  "main_permanent_id": "586929454-roissy-en-france-angers",
String
  "comment": "Nous passerons par le périphérique ouest (portes Maillot et St cloud)",
String
  "car": {
  "car": { ... }
Object
    "id": "CU7UMqwkcWBYU3dAs5H2Kg",
String
    "model": "206",
String
    "make": "PEUGEOT",
String
    "color": "light blue",
String
    "color_hexa": "BBBBFD",
String
    "comfort": "Normal",
String
    "comfort_nb_star": 2,
Integer
    "number_of_seat": 4,
Integer
    "category": "_UE_TOURISM",
String
    "picture": "https://d1ovtcjitiy70m.cloudfront.net/vi-1/images/icons/car.png"
String
  },
  "viaggio_rosa": false,
Boolean
  "is_comfort": true,
Boolean
  "freeway": true,
Boolean
  "luggage": "MIDDLE",
String
  stop_overs: [
Array
    {
    { ... }
Object

Stop overs

      "city_name": "Roissy-en-France",
String
      "address": "aéroport de Roissy",
String
      "latitude": 49.0092978,
Number
      "longitude": 2.5479091,
Number
      "country_code": "FR"
String
    }
  ]
  "detour": "FIFTEEN_MINUTES",
String
  "schedule": "FIFTEEN_MINUTES",
String
  "question_response_count": 0,
Integer
  "booking_mode": "auto",
String
  "booking_type": "online",
String
  "view_count": 3,
Integer
  "cross_border_alert": false,
Boolean
  "messaging_status": "public"
String
}