Transportation — entry 035 of 69
Transport for Berlin, Germany
vbb-rest is an open-source, community-built REST wrapper around VBB's official HAFAS backend for Berlin and Brandenburg public transit, covering stop search, departures, journeys, and live vehicle positions in the Friendly Public Transport Format (JSON). It's keyless and free, now on its 6th major version — the previously indexed v3 endpoint is deprecated in favor of v6.vbb.transport.rest.
This is a free, keyless REST API for public transport in Berlin and Brandenburg (VBB). It is the community project vbb-rest, not an official VBB service. You can search stops, read departures, and plan journeys. Version 6 of the API is at v6.vbb.transport.rest.
GreatAPIs Score
Auth quickstart
- No API key is needed. Send the request with no credentials. Set a clear User-Agent so the maintainers can contact you if your app causes load.
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Find a stop by name
GEThttps://v6.vbb.transport.rest/locations?query=alexanderplatz&results=1
User-Agent: your-app/1.0 (yourdomain.example; you@yourdomain.example)
[
{
"type": "stop",
"id": "900100003",
"name": "S+U Alexanderplatz Bhf (Berlin)",
"location": {
"type": "location",
"id": "900100003",
"latitude": 52.521508,
"longitude": 13.411267
},
"products": {
"suburban": true,
"subway": true,
"tram": true,
"bus": true,
"ferry": false,
"express": false,
"regional": false
},
"ids": {
"ifopt": "de:11000:900100003"
},
"stationDHID": "de:11000:900100003"
}
]The body is unchanged. results=1 limits the list to one match. Use the stop id (900100003) in other calls, for example /stops/900100003/departures.
Developer reference
100 requests/minute -- per the project's live getting-started.md.
Gotchas & limits
- The
queryparameter is required. A call to/locationswithout it returns400with a JSON body:{"message":"Missing query.","statusCode":400}. - Responses carry
Cache-Control: public, max-age: 300, so a proxy can serve a five-minute-old answer. The live probe showedx-cache: HITon a repeat call. - The API sends
Access-Control-Allow-Origin: *, so browser code can call it directly. - The
productsobject lists which modes stop at the stop. Read the booleans (suburban,subway,tram,bus,ferry,express,regional) instead of guessing from the name. - The response header
Linkpoints to an OpenAPI 3.0.3 description at/.well-known/service-desc. Use it to generate a client.