Transport for Berlin, Germany API

⭐ Beginner's Pick Transportation / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

The VBB REST API (Transport for Berlin) offers real-time public transport data for Berlin and Brandenburg, Germany. It covers U-Bahn, S-Bahn, buses, trams, and ferries without requiring any authentication. This open, community-maintained API is ideal for building transit apps or exploring HAFAS-based transport data.

💡

Beginner Tip

No API key is needed — send GET requests directly to the base URL. Start with /stops/nearby to find stations near any GPS coordinate before querying departures.

Available Data

match scores and results
team standings
player statistics
schedule and fixtures
Use case: Integrate third-party vbb api data into web and mobile applications

Example Response

JSON Response
{
  "route": "Line 1",
  "origin": "Station A",
  "destination": "Station B",
  "departure": "08:30",
  "arrival": "09:15",
  "status": "On Time",
  "delays_min": 0
}

Field Reference

id Unique stop identifier in the VBB network
name Human-readable name of the transit stop
location.latitude Latitude of the stop location
location.longitude Longitude of the stop location
products Boolean flags indicating which transport modes serve this stop (subway, bus, ferry, etc.)

Implementation Example

// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://github.com/derhuerst/vbb-rest/blob/3/docs/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

400 Bad Request Missing required query parameters like latitude or longitude
Check the API docs for required parameters — most endpoints need both latitude and longitude
Empty departures list Stop ID is invalid or there are no departures soon
Use /stops/nearby to get valid stop IDs before querying /stops/{id}/departures
Unexpected data format The API uses HAFAS data structures which can be nested
Read the GitHub docs carefully; the response includes nested objects for line, direction, and when fields

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 10/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 521ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Transportation
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →