Finding vehicles

To find vehicles, use the Vehicle Search API.

Vehicle query request

To find vehicles, make a GET request to the following URL including the parameters described below.

GET /api/beta/vehicles?position=51.509865,-0.118092

Standard URL parameters:

  • position - (required) The position to find vehicles near in the format lat,lng
  • radius - (number: default 1000) Number of metres around position to search for vehicles
  • cursor - (string) Cursor string for getting subsequent pages of results (read more about cursors)
  • limit - (number: default 10) Maximum number of vehicles to return

Vehicle filters:

Response

A successful Vehicle search request will result in the following response:

{
    "query": "position=51.509865,-0.118092&limit=10&radius=1000",
    "next_cursor": "def456",
    "total": 10,
    "vehicles": []
}
  • query - (string) URL parameters describing the search query
  • next_cursor - (string) Cursor string that should be passed into the next request to get the next page of results - read more about cursors
  • total - (int) Approximate total number of vehicles that have been found
  • vehicles - (array) Array of the matching vehicles (see Vehicle search object)

Vehicle search object

The Vehicle search object is a smaller version of the Vehicle object that contains enough information to make a decision about booking the vehicle.

{
    "id": "UCxIHVmNsZaWZdICAgICACGRiAggtkZXVoaVzdGIFwcHgw",
    "mtime": "2017-08-27T23:24:15.769+01:00",
    "status": "available",
    "position": {
        "lat": 51.509865,
        "lng": -0.118092
    },
    "type": "car-basic",
    "year": 2018,
    "functions": "passenger",
    "passengers_max": 5,
    "load_m3": 100,
    "price_per_km": 2000,
    "price_per_minute": 1000,
    "make": "Beatle",
    "image_url": "https://opentransport.com/path/to/vehicle-image.png"
}
  • If you need more information than what is included in the smaller Vehicle object, you can make a separate request to get the entire Vehicle.

See also