Public Transit API Developer's Guide

Transit Stations by Name

User Story

The user wants to search for transit stations in New York City (40.7510, 73.9916) with the name "New York".

Request

The query parameter center specifies the location of the search.

https://cit.transit.api.here.com/v3/stations/by_name.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&center=40.7510,-73.9916
&name="New%20York"

Response

The response to the request contains the following information blocks:
  • a maximum of 15 transit stations by default, can be configured using the optional max parameter
  • each station element includes the following information:
    • name, ID, longitude, and latitude of the station
    • distance in meters from the station, available only when you query for stations around you
    • expcted time to reach the station from your current location, available only when you query for stations around you
    • if a Next Nearby Departures request can be performed
    • the country where the x and y parameters point to
    • country code compliant to ISO 3166-1
    • state in the country
    • postal code
    • district in the state
    • name of the street, square, or boulevard
    • name of the city closest to the center parameter point to
{
  "Res": {
    "serviceUrl": "http://search.st.transit.api.here.com/t0k2/stations_v2/stations_v2",
    "Stations": {
      "Stn": [
        {
          "id": "717080445",
          "name": "14 St - Union Sq",
          "distance": 70,
          "duration": "PT0H1M10S",
          "x": -73.989951,
          "y": 40.734673,
          "has_board": 1,
          "country": "United States",
          "ccode": "USA",
          "state": "NY",
          "postal": "10003",
          "district": "Gramercy Park",
          "street": "Union Sq E",
          "number": "6",
          "city": "New York"
        },
        {
          "id": "717061414",
          "name": "Union SQ E/E 15 St",
          "distance": 34,
          "duration": "PT0H0M34S",
          "x": -73.989609,
          "y": 40.73555,
          "has_board": 1,
          "country": "United States",
          "ccode": "USA",
          "state": "NY",
          "postal": "10003",
          "district": "Gramercy Park",
          "street": "Union Sq E",
          "number": "24",
          "city": "New York"
        },
        {
          "id": "717081137",
          "name": "Union Sq - 14 St",
          "distance": 93,
          "duration": "PT0H1M33S",
          "x": -73.99073,
          "y": 40.734789,
          "has_board": 1,
          "country": "United States",
          "ccode": "USA",
          "state": "NY",
          "postal": "10003",
          "district": "Flatiron District",
          "city": "New York"
        }
      ]
    }
  }
}

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.