Public Transit API Developer's Guide

Nearby Coverage

This section provides examples of Nearby Coverage requests.

Request

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

https://cit.transit.api.here.com/coverage/v1/nearby.xml
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&details=0
&y=52.515803
&x=13.394051
&chinaconfig=0

Response

Two main types of response are returned from nearby.xml request:

  • Coverage within the city with transit coverage
  • Coverage outside the city with transit coverage

Within the city with transit coverage

The response below indicates that within the 2km radius there are 5 stops serving 8 lines and the transit coverage type is Time-Table, that is scheduled routing. It also shows the coverage quality, number of lines and stops in that city, along with the list of transit operators.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Res serviceUrl="">
  <LocalCoverage>
    <NearbyCoverage covered="1" radius="2000" lines="8" stops="5" type="TT" />
    <City updated="2017-04-11T10:22:06" name="Chicago" created="2017-04-11T15:35:53" country="USA" state="Illinois" y="41.884150" x="-87.632410" id="dp3wm" display_name="Chicago, Illinois, USA" distance="3969" relevancy="0.93">
      <Cvg quality="0.8000" lines="188" stops="11553" />
      <Operators>
        <Op name="Metra" type="TT" />
        <Op name="Chicago Transit Authority" type="TT" />
        <Op name="Northern Indiana Commuter Transportation District" type="TT" />
        <Op name="PACE" type="TT" />
      </Operators>
      <Pop>2836658</Pop>
    </City>
  </LocalCoverage>
</Res>

Outside the city with transit coverage

If there are no transit stops within a 2km radius, then a different type of response is returned, by the ExploredCoverage tag.

In the example below, only the first 5 nearest stops (and the lines serving those stops), which are outside the 2km radius, are displayed, along with the distance to the furthest of these 5 stops.

The flag details=0 in the request can be used to suppress the display of Line info in the response.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Res serviceUrl="">
  <LocalCoverage>
    <NearbyCoverage covered="0" radius="2000" lines="0" stops="0" />
    <ExploredCoverage radius="2899" lines="3" stops="5">
      <Stn id="030723276" name="Wheelers Lane, Fobbing" distance="2681" duration="PT0H44M41S" x="0.47371" y="51.53088" has_board="1" country="United Kingdom" ccode="GBR" state="England" postal="SS17 9" district="Fobbing" street="High Road" city="Stanford le Hope" />
      <Stn id="030723274" name="Marsh Lane, Fobbing" distance="2688" duration="PT0H44M48S" x="0.47294" y="51.53298" has_board="1" country="United Kingdom" ccode="GBR" state="England" postal="SS17 9" district="Fobbing" street="High Road" city="Stanford le Hope" />
      <Stn id="030723272" name="Greathouse Chase, Fobbing" distance="2739" duration="PT0H45M39S" x="0.47178" y="51.536" has_board="1" country="United Kingdom" ccode="GBR" state="England" postal="SS17 9" district="Fobbing" street="High Road" city="Stanford le Hope" />
      <Stn id="030723278" name="Church, Fobbing" distance="2750" duration="PT0H45M50S" x="0.47346" y="51.52916" has_board="1" country="United Kingdom" ccode="GBR" state="England" postal="SS17 9" district="Fobbing" street="High Road" city="Stanford le Hope" />
      <Stn id="030723270" name="Whitehall Lane, Fobbing" distance="2899" duration="PT0H48M19S" x="0.46979" y="51.53992" has_board="1" country="United Kingdom" ccode="GBR" state="England" postal="SS17 9" district="Fobbing" street="High Road" city="Stanford le Hope" />
      <Lines>
        <Line code="5" name="374" dir="Bus Station, Basildon" />
        <Line code="5" name="374" dir="Coronation Avenue, East Tilbury" />
        <Line code="5" name="374" dir="Bus Station, Grays" />
      </Lines>
    </ExploredCoverage>
  </LocalCoverage>
</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.