Public APIs

Public APIs / Transportation / Deutschebahn APIs

Deutschebahn APIs

6 REST APIs from deutschebahn.com, each with an OpenAPI spec. 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.

Open the Deutschebahn APIs documentation Build something with it

Key facts

Category
Transportation
Authentication
See docs
HTTPS
Yes
CORS
Unknown
Listed in
APIs.guru

Authentication is described in the provider's OpenAPI spec and documentation. Most need a key or OAuth.

What you could build with Deutschebahn APIs

Transportation APIs return flights, trains, buses, traffic and charging stations.

  • A commuter app for a city
  • Fleet and route planning
  • Travel booking tools

OpenAPI spec

Deutschebahn APIs has a machine-readable OpenAPI definition. Load it into Postman, Insomnia or a code generator to get every endpoint and a typed client in minutes.

Download the OpenAPI spec (JSON)

6 Deutschebahn APIs REST APIs

  • Fahrplan-Free v1
    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 spec
  • Betriebsstellen v1
    This REST-API enables you to query station and stop infos spec
  • Flinkster_API_NG v1
    This REST-API enables you to query for private transport sharing offers provided by companies and cities in Germany, Netherland and Austria spec
  • Reisezentren-API v1
    This REST-API enables you to query information about travel centers in Germany spec
  • Stationsdatenbereitstellung 2.2.01
    An API providing master data for German railway stations by DB Station&Service AG spec
  • FaSta - Station Facilities Status 2.1
    A RESTful webservice to retrieve data about the operational state of public elevators and escalators in german railway stations spec

How we would integrate Deutschebahn APIs

  1. Generate a typed client from the OpenAPI spec, so every endpoint and field is checked at build time.
  2. Sign up with the provider, get a key and store it on the server in an env.php or secret store.
  3. Put a small backend in front of it, so the browser talks to your server and your server talks to the API.
  4. Cache results in your own database, so pages stay fast and you stay inside rate limits.
  5. Add monitoring: if the API goes down or changes, you get an alert before your customers notice.

Questions about Deutschebahn APIs

Does the Deutschebahn APIs need an API key?

Authentication is described in the provider's OpenAPI spec and documentation. Most need a key or OAuth.

Is there an OpenAPI (Swagger) spec for Deutschebahn APIs?

Yes. The spec is linked on this page, so you can generate a client or import it into Postman.

Can I call Deutschebahn APIs from the browser?

It is not documented. Plan for a small server-side proxy to be safe.

Does Deutschebahn APIs support HTTPS?

Yes, it is served over HTTPS.

Can you build an app with Deutschebahn APIs for me?

Yes. FullStack Partner has developers who build and run products on APIs like this one. Send us a few lines and we reply with a plan and a fixed price.

Want a product built on Deutschebahn APIs?

We have the tech people: developers, designers and project managers who have shipped dozens of live products. Tell us what you want to build and we reply with a plan and a fixed price. Are you interested?

No sales spam. One reply from a real person, usually within a day.

More Transportation APIs

See all 128 Transportation APIs