Public Transit API v3 Developer's Guide

Station Search by Name

Use the resource stations/by_name to request a list of stations matching a name specified in the request.

.../v3/stations/by_name.{format}?<parameter>=<value>...
  

The list of stations in the response is sorted either by distance or a combination of distance and name matching score. In other words, with optional parameter method=strict, all stations that contain an exact match in their names with the search string, are in the response, sorted by distance. But in case of method=fuzzy, the list of stations in the response is sorted by distance and by closest name matching.

Note: In order to avoid duplicate results being returned when requesting stations by name, all stations having the same name and within 300 m of each other are grouped into a single result in the response. However, when making a station search by geo-coordinates, all stations will be returned individually.

Table 1. Mandatory Parameters
Parameter Data Type Description
app_id String

Typically, but not guaranteed to be, 20
     bytes Base64 URL-safe encoded string used for the authentication of
     the client application. If you use the app ID/app code option, you
     need to include an app_id and
     app_code with every request. For further
     details, see Acquiring Credentials.

app_code String

Typically, but not guaranteed to be, 20
     bytes Base64 URL-safe encoded string used for the authentication of
     the client application. If you use the app ID/app code option, you
     need to include an app_id and
     app_code with every request. For further
     details, see Acquiring Credentials.

apiKey String

A 43-byte Base64 URL-safe encoded string used for the authentication of the client
     application. As a logged in user, you can generate it at
     https://developer.here.com/projects.
     API Keys never expire but you can invalidate your API Keys at any time. You cannot have more
     than two API Keys for one app at the same time. You must include an apiKey with every request. For further details, see Acquiring Credentials.

name String Specifies the name or a part of the name of the station to search for and can be one word, multiple words or partial word separated by either comma or space.
center Double,Double Specifies the latitude and the longitude of the center point of your search separated by a comma. Where the latitude is in WGS 84-compliant degrees between -90 and 90 and the longitude in WGS 84-compliant degrees between -180 and 180.
Table 2. Optional Parameters
Parameter Data Type Description
callbackFunc String Specifies an arbitrary string used to wrap the JSON object in the response.
callbackId String If you specify the parameter callbackId, specifies the first argument to the function specified by the callbackFunc.
details Integer Requests line information for every station. The possible values are:

1 (enabled), 0 (disabled)

The default value is 0.

max Integer Specifies the maximum number of stations/stops included in the response.

The default value is 5. The minimum value is 1 and the maximum value is 25.

method String Specifies if the match is fuzzy or strict.

The default value is fuzzy.

  • fuzzy - search for a station with the name similar to one of the names requested
  • strict - search for a station with the name exactly match one of the names requested or contains it as its part
For example, if the station name in the request is "maurer", then if the method is fuzzy the response contains "AMBOY AVE AT MAURER RD" and "LAUREL HILL BL/48 ST". If the method is strict the response contains "AMBOY AVE AT MAURER RD" but not "LAUREL HILL BL/48 ST".
radius Integer Specifies a radius in meters that when combined with a centerpoint defines the area of the search.

The minimum value is 0, the default value and the maximum are not limited.

modes String

Specifies the transit type filter used to determine which types of transit to include in the response.
By default the parameter is omitted, meaning all supported transit types are permitted.
See Transit Modes page for more information.