Public Transit API Developer's Guide

Nearby Stations by Geocoordinate in Time Table Regions

This section provides an example of a request for a list of stations within a certain area where time table information is available.

User story

The user wants to find all stations that have lines with time table information within 300 meters of a point in Brooklyn, New York City (40.649046,-73.896339).

Request Summary

Resource by_geocoord

Note that resource representation is specified via extensions .xml or .json.

Maximum number of hits max
Radius radius
Longitude x
Latitude y

For more information about the request parameters, see Nearby Stations by Geocoord.

Request

Note: id values change without notice. If the id is no longer available in the resource, the resulting status message is 404 not found.

The code block below demonstrates the complete request, specifying that the response data are to be delivered in JSON.

https://cit.transit.api.here.com/search/by_geocoord.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&y=40.649046
&x=-73.896339
&radius=100
&max=3

Here is the same request indicating that the response data are to be delivered in XML.

https://cit.transit.api.here.com/search/by_geocoord.xml
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&y=40.649046
&x=-73.896339
&radius=100
&max=3

Response

The response to the request contains a list of stations. See Stations for more information.

The example response in XML format is as follows:

<Res serviceUrl="http://search.eu.ext.pt.svc.ovi.com/t0k2/">
  <Stations>
    <Stn id="416200440" name="GLENWOOD RD/E 105 ST" distance="36" duration="PT0H0M36S" x="-73.895943" y="40.649178" has_board="1" country="United States" ccode="USA" state="NY" postal="11236" district="Canarsie" street="Glenwood Rd" number="10564" city="Brooklyn">
      <Lines>
        <Line code="5" name="B6" dir="EAST NY NEW LOTS STA">
          <At id="textColor">#FFFFFF</At>
          <At id="color">#EE352E</At>
        </Line>
        <Line code="5" name="B6" dir="LTD EAST NY NEW LOTS STA">
          <At id="textColor">#FFFFFF</At>
          <At id="color">#EE352E</At>
        </Line>
        <Line code="5" name="B60" dir="CANARSIE WILLIAMS AV">
          <At id="textColor">#FFFFFF</At>
          <At id="color">#B933AD</At>
        </Line>
      </Lines>
    </Stn>
    <Stn id="416203761" name="GLENWOOD RD/E 104 ST" distance="73" duration="PT0H1M13S" x="-73.897049" y="40.64867" has_board="1" country="United States" ccode="USA" state="NY" postal="11236" district="Canarsie" street="Glenwood Rd" number="10401" city="Brooklyn">
      <Lines>
        <Line code="5" name="B6" dir="BENSONHURST HARWAY AV">
          <At id="textColor">#FFFFFF</At>
          <At id="color">#EE352E</At>
        </Line>
        <Line code="5" name="B6" dir="LTD BENSONHURST HARWAY AV">
          <At id="textColor">#FFFFFF</At>
          <At id="color">#EE352E</At>
        </Line>
      </Lines>
    </Stn>
  </Stations>
</Res>

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.