Public Transit API Developer's Guide

Next Nearby Departures Examples

This section provides examples of Next Nearby Departures 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/metarouter/rest/boardservice/v2/stationboard
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&lang=en
&stnId=720390572
&max=3
&time=2017-04-11T08%3A00%3A00
&strict=1
Note: If the message is shown about the missing or invalid location, please use the stnId from the Station Search by Name

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

https://cit.transit.api.here.com/metarouter/rest/boardservice/v2/stationboard.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&lang=en
&startX=-114.020596
&startY=46.879519
&stnId=720390572
&max=3
&time=2017-04-11T08%3A00%3A00
&strict=1

Response

The sample of next nearby departures response in XML format is as follows:

    

<Res serviceUrl="http://ip-10-127-181-111.eu-west-1.compute.internal:8080/hafasproxy/G3I">
  <NextDepartures>
  <Dep time="2017-04-11T08:02:00" journey_ctx="1|12|0|105|22062016">
    <Stn id="720390572#105" name="Broadway + Sherwood" x="-114.020596" y="46.879519" />
    <Line dir="Mountain Line Transfer Center" code="5" name="2">
    <At id="operator">D6410000</At>
    <At id="color">#F499B8</At>
    <At id="textColor">#000000</At>
    <At id="category">Bus</At>
    </Line>
  </Dep>
  <Dep time="2017-04-11T08:17:00" journey_ctx="1|11|1|105|22062016">
    <Stn id="720390572#105" name="Broadway + Sherwood" x="-114.020596" y="46.879519" />
    <Line dir="Mountain Line Transfer Center" code="5" name="2">
    <At id="operator">D6410000</At>
    <At id="color">#F499B8</At>
    <At id="textColor">#000000</At>
    <At id="category">Bus</At>
    </Line>
  </Dep>
  <Dep time="2017-04-11T08:32:00" journey_ctx="1|12|1|105|22062016">
    <Stn id="720390572#105" name="Broadway + Sherwood" x="-114.020596" y="46.879519" />
    <Line dir="Mountain Line Transfer Center" code="5" name="2">
    <At id="operator">D6410000</At>
    <At id="color">#F499B8</At>
    <At id="textColor">#000000</At>
    <At id="category">Bus</At>
    </Line>
  </Dep>
  <Operators>
    <Op code="D6410000" name="Mountain Line (MUTD)" />
  </Operators>
  </NextDepartures>
</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.