Fahrplan-Free
deutschebahn · Data
A RESTful webservice to request a railway journey - FREE plan with restricted access (max. 10 requests per minute). Please ignore the message in the API Console about the access token. Register to use an less restricted version, which requires an access token.
Authentication
Sample Requests
Get arrival board at a given location at a given daten and time.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/arrivalBoard/{id}?date=2026-06-02"import requests
params = {
"date": "2026-06-02"
}
response = requests.get(
"https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/arrivalBoard/{id}",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/arrivalBoard/{id}');
url.searchParams.set('date', '2026-06-02');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/arrivalBoard/{id}")
q := baseURL.Query()
q.Set("date", "2026-06-02")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/arrivalBoard/{id}")
uri.query = URI.encode_www_form({
"date" => "2026-06-02"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/arrivalBoard/{id}?" . http_build_query([
"date" => "2026-06-02"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Get departure board at a given location at a given daten and time.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/departureBoard/{id}?date=2026-06-02"import requests
params = {
"date": "2026-06-02"
}
response = requests.get(
"https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/departureBoard/{id}",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/departureBoard/{id}');
url.searchParams.set('date', '2026-06-02');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/departureBoard/{id}")
q := baseURL.Query()
q.Set("date", "2026-06-02")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/departureBoard/{id}")
uri.query = URI.encode_www_form({
"date" => "2026-06-02"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/departureBoard/{id}?" . http_build_query([
"date" => "2026-06-02"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Retrieve details of a journey. The id of journey should come from an arrival board or a departure board.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/journeyDetails/{id}"import requests
response = requests.get(
"https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/journeyDetails/{id}",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/journeyDetails/{id}';
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/journeyDetails/{id}"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/journeyDetails/{id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/deutschebahn.com/fahrplan/v1/journeyDetails/{id}";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Fahrplan-Free?
Fahrplan-Free is a Data API. Developers commonly use data APIs for:
- enriching your app with third-party datasets
- building data pipelines and ETL workflows
- querying and searching large datasets
- powering research, analysis, and reporting tools
- syncing reference data into your own systems
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Fahrplan-Free is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?