Public Transit API Developer's Guide

Next Nearby Depatures

User Story

The user wants to retrieve departure information from a given station, in this case Harrison / Motor View (stnId=703280098), at 2017-12-11T07:30:00.

Note: This service is subject to Terms and Conditions as described in Supplier Terms for Developers Using HERE Location Platform APIs. To request access, contact us.

Request

The query parameter stnId can be obtained by making a station search request by name or by geocoordinates, for example Search for Transit Stations by Name. The time parameter is specified in ISO 8601 format, 2017-12-11T07:30:00. The lang parameter is specified in ISO 639-1 format, en for English.

https://cit.transit.api.here.com/v3/board.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&lang=en
&stnId=703280098
&time=2017-12-11T07%3A30%3A00

Response

The response to the request contains the following information blocks:
  • a maximum of 40 departures relative to the time specified from the station in the request as well as nearby stations by default, can be configured using the optional max parameter
  • each departure board element includes the following information:
    • departure time
    • name and ID of the transit stop or station the service departs from
    • name and number of the transit service
    • type of the transit service
    • direction or head-sign of the service
    • optionally, the color of the service line
{
  "Res": {
    "serviceUrl": "http://ip-10-123-14-239.eu-west-1.compute.internal:8080/hafasproxy/G3L",
    "NextDepartures": {
      "Dep": [
        {
          "Stn": {
            "id": "703280098#105",
            "name": "Harrison / Motor View",
            "x": -112.507865,
            "y": 45.953279
          },
          "Transport": {
            "At": {
              "category": "Bus",
              "color": "#FF6600",
              "operator": "bKy15000",
              "textColor": "#FFFFFF"
            },
            "dir": "Transfer Center",
            "mode": 5,
            "name": "Orange - Harrison"
          },
          "journey_ctx": "1|261|0|105|11122017",
          "time": "2017-12-11T07:32:00"
        },
        {
          "Stn": {
            "id": "703280077#105",
            "name": "Harrison / Motor View",
            "x": -112.508188,
            "y": 45.953764
          },
          "Transport": {
            "At": {
              "category": "Bus",
              "color": "#FF6600",
              "operator": "bKy15000",
              "textColor": "#FFFFFF"
            },
            "dir": "Montana Tech South",
            "mode": 5,
            "name": "Orange - Harrison"
          },
          "journey_ctx": "1|263|1|105|11122017",
          "time": "2017-12-11T07:59:00"
        },

        ... more departures ...

        {
          "Stn": {
            "id": "703280098#105",
            "name": "Harrison / Motor View",
            "x": -112.507865,
            "y": 45.953279
          },
          "Transport": {
            "At": {
              "category": "Bus",
              "color": "#FF6600",
              "operator": "bKy15000",
              "textColor": "#FFFFFF"
            },
            "dir": "Transfer Center",
            "mode": 5,
            "name": "Orange - Harrison"
          },
          "journey_ctx": "1|263|9|105|11122017",
          "time": "2017-12-11T16:02:00"
        }
      ],
      "Operators": {
        "Op": [
          {
            "At": {
              "phone": "(406) 497-6515"
            },
            "Link": [
              {
                "href": "https://cit.transit.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.buttebus.org/",
                "text": "Butte-Silver Bow",
                "type": "website"
              }
            ],
            "code": "bKy15000",
            "name": "Butte-Silver Bow",
            "type": "TT"
          }
        ]
      }
    }
  }
}

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.