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/JSON API in a Nutshell
BBBike has a simple XML/JSON 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.
parameter | description |
startc_wgs84=lon,lat | start coordinate (e.g. 13.377846,52.516265;), mandatory |
zielc_wgs84=lon,lat | destination coordinate, mandatory |
viac_wgs84=lon,lat | via coordinate. optional. |
pref_seen=1 | mandatory |
pref_speed=speed | preferred speed in km/h. optional, default is 20 km/h. |
pref_cat=cat | N1, N2, H1, H2, N_RW, N_RW1 |
pref_quality=quality | Q2, Q0 |
ref_ampel=yes | |
pref_green=level | GR1, GR2 |
pref_unlit=NL | |
pref_ferry=use | |
pref_fragezeichen=yes | |
lang=language | supported 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:
Name | parameters | description |
GPS Route | output_as=gpx-route | GPX route with waypoints for GPS navigation, up to 256 points |
GPS Track | output_as=gpx-track | GPX with up to 1024 points, no navigation |
Google Earth (KML) | output_as=kml-track | view route with Google Earth or Garmin BaseCamp |
XML | output_as=xml | route with waypoints and decriptions in XML format |
JSON | output_as=json | route with waypoints and decriptions in JavaScript JSON format |
YAML | output_as=yaml | route 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-trackFor 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.