Search Stations By Location

User Story

You want to search for stations within a certain distance from their current geographic location.

Request

Search stations through a single GET request. The only required parameter in specifies the center of the searching area which is defined as a pair of WGS84 coordinates in the form <latitude>,<longitude>. The optional parameter r specifies the radius in meters specifies the size of the searching area. By default, r=500. The following request will search for stations within 500 meters from your location:

GET https://transit.hereapi.com/v8/stations
    ?in=41.90123,12.50091
Authorization: Bearer 

Note

For more information on the currently available authentication methods, see Authentication and Authorization Developer Guide.

Response

The response to the request contains the following information blocks:

  • a maximum of 50 station identifiers are allowed in a single query.
  • each station element in stations response object includes the following high-level elements:
    • place with station/stop information such as name, location, ID, type.
    • transports with information about the transports serving the station. Add return=transport in request to enable it.
    • accessPoints with information about points that are used to access the station/stop.
{
  "stations": [
    {
      "place": {
        "name": "Piazza Dei Cinquecento",
        "type": "station",
        "location": {
          "lat": 41.901297,
          "lng": 12.50042
        },
        "id": "415701325"
      },
      "transports": [
        {
          "mode": "bus",
          "name": "P02",
          "color": "#4C8DC1",
          "textColor": "#000000",
          "headsign": "Piazza Dei Cinquecento"
        }
      ],
      "accessPoints": [
        {
          "location": {
            "lat": 41.901298,
            "lng": 12.500427
          },
          "name": "West Entrance",
          "type": "accessPoint"
        },
        {
          "location": {
            "lat": 41.901299,
            "lng": 12.500429
          },
          "name": "Piazza Mall",
          "type": "accessPoint"
        }
      ]
    }
  ]
}

results matching ""

    No results matching ""