BBBike @ World - Routing API Documentation

BBBike is a route planner for cyclists in Berlin. It is now ported to other cities around the world - thanks to the OpenStreetMap project!

API Documentation

The service for API requests run on https://api.bbbike.org/api/0.2/

For all API calls the following query string parameters apply: appid=appid

The appid is identifying the application and mandatory. The appid is allotted by the BBBike developers. Please contact us to get an application appid!

XML API in a Nutshell

BBBike has a simple XML API. You can get the routing results in the formats GPS routes, GPS tracks and Google Earth (KML).

After the prefix follows the city name, e.g. for the original bbbike data: https://api.bbbike.org/api/0.2/bbbike/ and for Hamburg https://api.bbbike.org/api/0.2/Hamburg/

After the city, the normal URL parameters follows.

parameterdescription
startc_wgs84=lon,latstart coordinate (e.g. 13.377846,52.516265;), mandatory
zielc_wgs84=lon,latdestination coordinate, mandatory
viac_wgs84=lon,latvia coordinate. optional.
pref_seen=1mandatory
pref_speed=speedpreferred speed in km/h. optional, default is 20 km/h.
pref_cat=catN1, N2, H1, H2, N_RW, N_RW1
pref_quality=qualityQ2, Q0
ref_ampel=yes
pref_green=levelGR1, GR2
pref_unlit=NL
pref_ferry=use
pref_fragezeichen=yes
lang=languagesupported values are: de, en, es, fr, ru

To get XML result output instead HTML, just replace the URL parameter output_as with one of the values:

Nameparametersdescription
GPS Routeoutput_as=gpx-routeGPX route with waypoints for GPS navigation, up to 256 points
GPS Trackoutput_as=gpx-trackGPX with up to 1024 points, no navigation
Google Earth (KML)output_as=kml-trackview route with Google Earth
XMLoutput_as=xmlroute with waypoints and decriptions in XML format
JSONoutput_as=jsonroute with waypoints and decriptions in JavaScript JSON format
YAMLoutput_as=yamlroute with waypoints and decriptions in YAML format
Examples
https://api.bbbike.org/api/0.2/bbbike/?appid=guest;startc_wgs84=13.377846%2C52.516265;startname=Brandenburger%20Tor;zielc_wgs84=13.404294%2C52.535019;zielname=Zionskirche;pref_seen=1;pref_speed=20;pref_cat=;pref_quality=;pref_specialvehicle=;scope=;output_as=kml-track

For a list of all parameters and valid values, please look at the HTML search interface or contact us.

JSON API in a Nutshell

The JSON APIs for street names or Point of Interests (POI) suggestions works as on the web site.

Examples

Searching for street names:
https://api.bbbike.org/api/0.2/cgi/api.cgi?appid=guest;namespace=dbac;city=bbbike;query=wash

Plotting street names or POI:
https://api.bbbike.org/api/0.2/cgi/street-coord.cgi?appid=guest;namespace=3;city=bbbike;query=washing

Reverse geocode:
https://api.bbbike.org/api/0.2/bbbike/?appid=guest;api=revgeocode;lon=13.352005;lat=52.538919

Which city is supported by BBBike given your current location:
https://api.bbbike.org/api/0.2/cgi/location.cgi?appid=guest;lng=13.411399;lat=52.523405

with coordinates and well formatted: https://api.bbbike.org/api/0.2/cgi/location.cgi?appid=guest;ns=coords;pretty=1;lng=13.411399;lat=52.523405

Note: replace the value city with the city you are looking for!

Misc

Last but not least please visit bbbike.org and read the documentation. Thanks!

If you want to write a mobile App for BBBike - please contact us in advance. We can give you an introduction on how to use the APIs.