Integrate real-time train data into your applications. Our API supports multi-display architecture - manage multiple displays with individual configurations.
API access is available on the Premium plan. Generate your API key in the portal.
Include your API key in the X-API-Key header and make requests to our endpoints.
Receive JSON responses with train data, configurations, and weather information.
All API requests require authentication using an API key. Include your key in the X-API-Key header:
X-API-Key: lt_live_xxxxxxxxxxxxAPI keys are available exclusively for Premium plan subscribers.Upgrade to Premium
# List all displays
curl -X GET "https://www.lobbytrain.com/api/v1/displays" \
-H "X-API-Key: lt_live_your_api_key_here"
# Get trains for a specific display
curl -X GET "https://www.lobbytrain.com/api/v1/displays/{displayId}/trains" \
-H "X-API-Key: lt_live_your_api_key_here"
# Get departures by station
curl -X GET "https://www.lobbytrain.com/api/v1/departures/DB/8011160?results=20" \
-H "X-API-Key: lt_live_your_api_key_here"All endpoints use the base URL https://www.lobbytrain.com/api/v1
/api/v1/displaysList all displays for your hotel
{
"success": true,
"displays": [
{
"id": "d1a2b3c4-5678-90ab-cdef-1234567890ab",
"name": "Lobby Main Display",
"hotelName": "Grand Hotel Vienna",
"displayMode": "tv",
"stationId": "8011160",
"trainType": "departures",
"isActive": true,
"lastSeenAt": "2024-01-15T09:55:00Z",
"createdAt": "2024-01-01T00:00:00Z"
}
]
}/api/v1/displays/{displayId}Get detailed configuration for a specific display
| Name | Type | Required | Description |
|---|---|---|---|
| displayId | string | Yes | Unique display identifier (UUID) |
{
"success": true,
"display": {
"id": "d1a2b3c4-5678-90ab-cdef-1234567890ab",
"name": "Lobby Main Display",
"hotelName": "Grand Hotel Vienna",
"displayMode": "tv",
"stationId": "8011160",
"provider": "DB",
"trainType": "departures",
"logoUrl": "https://...",
"theme": {
"primary": "#B91C1C",
"secondary": "#F59E0B"
},
"refreshInterval": 300,
"timeFormat": "24h",
"timezone": "Europe/Vienna",
"showWeather": true,
"languages": ["de", "en"],
"isActive": true
}
}/api/v1/displays/{displayId}/trainsGet trains for a specific display based on its configured station
| Name | Type | Required | Description |
|---|---|---|---|
| displayId | string | Yes | Unique display identifier (UUID) |
| type | string | No | Override train type: "departures" or "arrivals" |
{
"success": true,
"data": [
{
"tripId": "1|123456|0|80|15012024",
"line": {
"name": "ICE 501",
"product": "nationalExpress",
"operator": "DB Fernverkehr"
},
"departure": {
"scheduled": "2024-01-15T10:00:00Z",
"platform": "3",
"delay": 0
},
"destination": {
"name": "Frankfurt Hbf"
},
"status": "on-time"
}
],
"station": "Berlin Hbf",
"stationId": "8011160",
"trainType": "departures",
"displayId": "d1a2b3c4-...",
"displayName": "Lobby Main Display",
"cachedAt": "2024-01-15T09:55:00Z"
}/api/v1/displays/{displayId}/analyticsGet analytics data for a specific display
| Name | Type | Required | Description |
|---|---|---|---|
| displayId | string | Yes | Unique display identifier (UUID) |
| startDate | string | No | Start date (ISO format, default: 7 days ago) |
| endDate | string | No | End date (ISO format, default: today) |
{
"success": true,
"analytics": {
"displayId": "d1a2b3c4-...",
"displayName": "Lobby Main Display",
"displayMode": "tv",
"period": {
"startDate": "2024-01-08",
"endDate": "2024-01-15"
},
"metrics": {
"totalViews": 1234,
"totalSearches": 89,
"totalInteractions": 256,
"uptimePercentage": 99.2,
"errorCount": 3
},
"dailyStats": [...]
}
}/api/v1/departures/{provider}/{stationId}Get train departures by provider and station ID
| Name | Type | Required | Description |
|---|---|---|---|
| provider | string | Yes | Provider code: DB, OEBB, or SBB |
| stationId | string | Yes | Station ID (e.g., 8011160 for Berlin Hbf) |
| results | number | No | Number of results (default: 20, max: 50) |
{
"success": true,
"data": [
{
"tripId": "1|123456|0|80|15012024",
"line": {
"name": "ICE 501",
"product": "nationalExpress",
"operator": "DB Fernverkehr"
},
"departure": {
"scheduled": "2024-01-15T10:00:00Z",
"platform": "3",
"delay": 0
},
"destination": {
"name": "Frankfurt Hbf"
},
"status": "on-time"
}
],
"station": "Berlin Hbf",
"provider": "DB",
"type": "departures",
"cachedAt": "2024-01-15T09:55:00Z"
}/api/v1/arrivals/{provider}/{stationId}Get train arrivals by provider and station ID
| Name | Type | Required | Description |
|---|---|---|---|
| provider | string | Yes | Provider code: DB, OEBB, or SBB |
| stationId | string | Yes | Station ID (e.g., 8011160 for Berlin Hbf) |
| results | number | No | Number of results (default: 20, max: 50) |
{
"success": true,
"data": [
{
"tripId": "1|654321|0|80|15012024",
"line": {
"name": "ICE 502",
"product": "nationalExpress",
"operator": "DB Fernverkehr"
},
"arrival": {
"scheduled": "2024-01-15T10:30:00Z",
"platform": "5",
"delay": 5
},
"origin": {
"name": "Munich Hbf"
},
"status": "delayed"
}
],
"station": "Berlin Hbf",
"provider": "DB",
"type": "arrivals",
"cachedAt": "2024-01-15T09:55:00Z"
}/api/v1/stations/searchSearch for stations by name
| Name | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search query (min 2 characters) |
| provider | string | No | Filter by provider: DB, OEBB, or SBB |
| limit | number | No | Number of results (default: 10, max: 50) |
{
"success": true,
"data": [
{
"id": "8011160",
"name": "Berlin Hbf",
"provider": "DB",
"location": {
"latitude": 52.525,
"longitude": 13.369
}
},
{
"id": "8010205",
"name": "Berlin Ostbahnhof",
"provider": "DB",
"location": {
"latitude": 52.510,
"longitude": 13.434
}
}
]
}/api/v1/providersList all available train data providers
{
"success": true,
"providers": [
{
"code": "DB",
"name": "Deutsche Bahn",
"country": "Germany",
"features": ["departures", "arrivals", "realtime"]
},
{
"code": "OEBB",
"name": "ÖBB",
"country": "Austria",
"features": ["departures", "arrivals", "realtime"]
},
{
"code": "SBB",
"name": "SBB",
"country": "Switzerland",
"features": ["departures", "arrivals", "realtime"]
}
]
}/api/v1/analyticsGet analytics overview for all displays of your hotel
| Name | Type | Required | Description |
|---|---|---|---|
| startDate | string | No | Start date (ISO format, default: 7 days ago) |
| endDate | string | No | End date (ISO format, default: today) |
{
"success": true,
"analytics": {
"hotelId": "h1a2b3c4-...",
"period": {
"startDate": "2024-01-08",
"endDate": "2024-01-15"
},
"summary": {
"totalDisplays": 3,
"activeDisplays": 3,
"totalViews": 4521,
"totalSearches": 312,
"totalInteractions": 876,
"averageUptime": 98.7
},
"displays": [
{
"displayId": "d1a2b3c4-...",
"displayName": "Lobby Main Display",
"displayMode": "tv",
"metrics": {...}
}
]
}
}Rate limit information is included in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705312800
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request successful |
| 400 | Bad Request | Invalid parameters or malformed request |
| 401 | Unauthorized | Missing or invalid API key |
| 403 | Forbidden | API access not included in your plan |
| 404 | Not Found | Hotel or resource not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Server Error | Internal server error |
Get your API key today and start integrating LobbyTrain data into your applications.