GuidesAPI Reference
Guides

How to send a request to the Public Transit Next Departures API

To send a request to the Public Transit Station Search you need the basic elements shown in the following tables.

Search public transit stations by means of the following query parameters:

  • ids: station identifier,
  • in: station geographic location,
  • name and in: station name and geographic location.

Request by ID

ids: list of station identifiers.

Table 1. Required request parameters to query departures by IDs

NameFormatDescription
Base URLstring, https://transit.hereapi.comProduction environment
Versionstring, /v8The API version to use
Resourcestring, /stationsThe endpoint to access the resource
idsstring, id1,...Specifies a comma-separated list of station IDs

For more information, see how to Search Stations By Ids.

Request by location

in: circle area defined using center point and radius parameters.

Table 2. Required request parameters to query departures by location

NameFormatDescription
Base URLstring, https://transit.hereapi.comProduction environment
Versionstring, /v8The API version to use
Resourcestring, /stationsThe endpoint to access the resource
instring, {lat},{lng}[;r={radius}]Specifies the center point and the optional radius of the search

For more information, see how to Search Stations By Location.

Request by name location

name and in: full or partial station name and circle area defined using center point and radius parameters.

Table 3. Required request parameters to query departures by location

NameFormatDescription
Base URLstring, https://transit.hereapi.comProduction environment
Versionstring, /v8The API version to use
Resourcestring, /stationsThe endpoint to access the resource
namestring, Roma TerminiThe station name or part of the name to search for. It is composed of one or more space separated words.
instring, {lat},{lng}[;r={radius}]Specifies the center point and the optional radius of the search

For more information, see how to Search Stations By Name and Location.

Notes

The response to the above request delivers the following high-level elements:

  • metadata – a notices (optional) object with a list of issues related to the response
  • response - a stations object with a list of stations, one for each specified id or

name and/or in a defined circular area.

For more information on the request parameters, see the Station Search section of the Public Transit API Reference