GuidesAPI Reference
Guides

Get started with the Intermodal Routing API

This section outlines how to quickly get started using the Intermodal Routing API v8 on the HERE platform.

📘

Note

This section provides information on the minimum setup required to quickly begin using the Intermodal Routing API v8. For more detailed information on HERE account setup, project creation, service linking, app registration, and authentication, see the Identity & Access Management Guide.

Get a HERE account

Obtain access to the HERE platform through your organization administrator's invitation or get started for free.

  • If your company has already established a HERE platform organization, contact your organization admin who can invite you to join the organization.
  • If your company hasn’t established a HERE platform organization yet, you can get started for free. For more information, see the HERE platform pricing.

How to get an API key

To get an API key, follow these steps:

  1. Sign in to the HERE platform using your HERE account.
  2. Select the Access Manager from the launcher.
  3. Select the Apps tab and click Register new app.
  4. Enter a name for the app.
  5. Click Register. The HERE platform creates a new app with a unique app ID.
  6. On the Credentials tab, select API Keys and then click Create API key to generate a maximum of two API Keys for your application authentication credentials. The API key is created and displayed.

How to send a request with the Intermodal Routing API

This example begins at the HERE office in Berlin Mitte and provides routing to travel to Potsdam, a city near the German capital. In this example, you would also like to know at least 3 ways to reach Potsdam.

GET https://intermodal.router.hereapi.com/v8/routes
    ?apiKey={YOUR_API_KEY}
    &alternatives=2
    &destination=52.40358749909618,13.058351363288239
    &origin=52.53105637575095,13.384944833815183

By default, the Intermodal Routing API v8 returns a single, optimal intermodal route. The optional parameter alternatives represents the number of alternate routes to return in addition to the optimal route. By default, the parameter is set to alternatives=0. Since you passed the alternatives=2 parameter, the router of the Intermodal Routing API v8 computes three intermodal routes using all transport types available in your area. A fourth pedestrian-only route may be added if available.

If the intermodal route calculation was successful, the /routes response contains the requested details about the calculated route:

  • Three optimal intermodal routes.
  • One or a combination of the following transport types, each of which contains departure and arrival times, duration, coordinates, and other section information:
    • taxi
    • transit
    • vehicle
    • rented
    • pedestrian
  • A set of operators that run the services included in the alternatives, including operator code, operator name, and links to operator websites, if any.
📘

Note

Since you do not specify multiple optional parameters, particularly departureTime, arrivalTime, or <transport-type>[enable]=<route-section>, you might not obtain the same output as shown below in your response.

{
  "routes": [
    {
      "id": "R00347b-C0",
      "sections": [
        {
          "id": "R00347b-C0-S0",
          "type": "pedestrian",
          "notices": [
            {
              "code": "walkOptionViolated"
            }
          ],
          "departure": {
            "time": "2020-04-28T17:53:00+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.531055,
                "lng": 13.384947
              }
            }
          },
          "arrival": {
            "time": "2020-04-28T17:57:00+02:00",
            "place": {
              "name": "U Naturkundemuseum [Invalidenstr.]",
              "type": "station",
              "location": {
                "lat": 52.530336,
                "lng": 13.382223
              },
              "id": "vbb_900100709"
            }
          }
        },
        {
          "id": "R00347b-C0-S1",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T17:57:00+02:00",
            "place": {
              "name": "U Naturkundemuseum [Invalidenstr.]",
              "type": "station",
              "location": {
                "lat": 52.530336,
                "lng": 13.382223
              },
              "id": "vbb_900100709"
            },
            "delay": 0
          },
          "arrival": {
            "time": "2020-04-28T18:01:00+02:00",
            "place": {
              "name": "S+U Berlin Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.52585,
                "lng": 13.368928
              },
              "id": "vbb_900003201"
            },
            "delay": 0
          },
          "transport": {
            "mode": "lightRail",
            "name": "Tram M10",
            "category": "Tram",
            "color": "#DF6A1C",
            "textColor": "#FFFFFF",
            "headsign": "S+U Hauptbahnhof"
          },
          "agency": {
            "id": "BVG",
            "name": "Berliner Verkehrsbetriebe"
          }
        },
        {
          "id": "R00347b-C0-S2",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T18:12:00+02:00",
            "place": {
              "name": "S+U Berlin Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.52585,
                "lng": 13.368928
              },
              "id": "vbb_900003201",
              "platform": "14"
            },
            "delay": 60
          },
          "arrival": {
            "time": "2020-04-28T18:36:00+02:00",
            "place": {
              "name": "S Potsdam Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.390931,
                "lng": 13.067187
              },
              "id": "vbb_900230999",
              "platform": "3"
            },
            "delay": 0
          },
          "transport": {
            "mode": "regionalTrain",
            "name": "RE1",
            "category": "RE",
            "color": "#D7081D",
            "textColor": "#FFFFFF",
            "headsign": "Magdeburg, Hauptbahnhof"
          },
          "agency": {
            "id": "DB",
            "name": "DB Regio AG"
          }
        },
        {
          "id": "R00347b-C0-S3",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T18:42:00+02:00",
            "place": {
              "name": "S Potsdam Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.390931,
                "lng": 13.067187
              },
              "id": "vbb_900230999",
              "platform": "2"
            }
          },
          "arrival": {
            "time": "2020-04-28T18:49:00+02:00",
            "place": {
              "name": "Potsdam, Nauener Tor",
              "type": "station",
              "location": {
                "lat": 52.403102,
                "lng": 13.057919
              },
              "id": "vbb_900230022"
            }
          },
          "transport": {
            "mode": "lightRail",
            "name": "Tram 96",
            "category": "Tram",
            "color": "#CC0A22",
            "textColor": "#FFFFFF",
            "headsign": "Potsdam, Campus Jungfernsee"
          },
          "agency": {
            "id": "ViP",
            "name": "Verkehrsbetrieb Potsdam GmbH"
          }
        },
        {
          "id": "R00347b-C0-S4",
          "type": "pedestrian",
          "notices": [
            {
              "code": "walkOptionViolated"
            }
          ],
          "departure": {
            "time": "2020-04-28T18:49:00+02:00",
            "place": {
              "name": "Potsdam, Nauener Tor",
              "type": "station",
              "location": {
                "lat": 52.403102,
                "lng": 13.057919
              },
              "id": "vbb_900230022"
            }
          },
          "arrival": {
            "time": "2020-04-28T18:51:00+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.403588,
                "lng": 13.058351
              }
            }
          }
        }
      ]
    },
    {
      "id": "R00347b-C1",
      "sections": [
        {
          "id": "R00347b-C1-S0",
          "type": "pedestrian",
          "notices": [
            {
              "code": "walkOptionViolated"
            }
          ],
          "departure": {
            "time": "2020-04-28T18:03:00+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.531055,
                "lng": 13.384947
              }
            }
          },
          "arrival": {
            "time": "2020-04-28T18:07:00+02:00",
            "place": {
              "name": "U Naturkundemuseum [Invalidenstr.]",
              "type": "station",
              "location": {
                "lat": 52.530336,
                "lng": 13.382223
              },
              "id": "vbb_900100709"
            }
          }
        },
        {
          "id": "R00347b-C1-S1",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T18:07:00+02:00",
            "place": {
              "name": "U Naturkundemuseum [Invalidenstr.]",
              "type": "station",
              "location": {
                "lat": 52.530336,
                "lng": 13.382223
              },
              "id": "vbb_900100709"
            },
            "delay": 0
          },
          "arrival": {
            "time": "2020-04-28T18:11:00+02:00",
            "place": {
              "name": "S+U Berlin Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.52585,
                "lng": 13.368928
              },
              "id": "vbb_900003201"
            },
            "delay": 0
          },
          "transport": {
            "mode": "lightRail",
            "name": "Tram M10",
            "category": "Tram",
            "color": "#DF6A1C",
            "textColor": "#FFFFFF",
            "headsign": "S+U Hauptbahnhof"
          },
          "agency": {
            "id": "BVG",
            "name": "Berliner Verkehrsbetriebe"
          }
        },
        {
          "id": "R00347b-C1-S2",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T18:17:00+02:00",
            "place": {
              "name": "S+U Berlin Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.52585,
                "lng": 13.368928
              },
              "id": "vbb_900003201",
              "platform": "16"
            },
            "delay": 0
          },
          "arrival": {
            "time": "2020-04-28T18:52:00+02:00",
            "place": {
              "name": "S Potsdam Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.390931,
                "lng": 13.067187
              },
              "id": "vbb_900230999",
              "platform": "6"
            },
            "delay": 0
          },
          "transport": {
            "mode": "cityTrain",
            "name": "S7",
            "category": "S-Bahn",
            "color": "#7760B0",
            "textColor": "#FFFFFF",
            "headsign": "S Potsdam Hauptbahnhof"
          },
          "agency": {
            "id": "DBS",
            "name": "S-Bahn Berlin GmbH"
          }
        },
        {
          "id": "R00347b-C1-S3",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T18:57:00+02:00",
            "place": {
              "name": "S Potsdam Hauptbahnhof",
              "type": "station",
              "location": {
                "lat": 52.390931,
                "lng": 13.067187
              },
              "id": "vbb_900230999",
              "platform": "2"
            },
            "delay": 0
          },
          "arrival": {
            "time": "2020-04-28T19:04:00+02:00",
            "place": {
              "name": "Potsdam, Nauener Tor",
              "type": "station",
              "location": {
                "lat": 52.403102,
                "lng": 13.057919
              },
              "id": "vbb_900230022"
            },
            "delay": 0
          },
          "transport": {
            "mode": "lightRail",
            "name": "Tram 92",
            "category": "Tram",
            "color": "#CC0A22",
            "textColor": "#FFFFFF",
            "headsign": "Potsdam, Kirschallee"
          },
          "agency": {
            "id": "ViP",
            "name": "Verkehrsbetrieb Potsdam GmbH"
          }
        },
        {
          "id": "R00347b-C1-S4",
          "type": "pedestrian",
          "notices": [
            {
              "code": "walkOptionViolated"
            }
          ],
          "departure": {
            "time": "2020-04-28T19:04:00+02:00",
            "place": {
              "name": "Potsdam, Nauener Tor",
              "type": "station",
              "location": {
                "lat": 52.403102,
                "lng": 13.057919
              },
              "id": "vbb_900230022"
            }
          },
          "arrival": {
            "time": "2020-04-28T19:06:00+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.403588,
                "lng": 13.058351
              }
            }
          }
        }
      ]
    }
  ]
}

Next steps

We encourage you to further browse the examples of the most typical use cases of the Intermodal Routing API that you can find below in this Developer Guide: Park and Ride, Taxi and Ride, and Bike and Ride.

For a full list of the parameters used in the API requests and the data provided in the responses, see the HERE Intermodal Routing API Reference.