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=411400892), at 2019-06-24T07:30:00.

Note: This service is subject to Terms and Conditions as described in Supplier Terms for Developers Using HERE Location Platform APIs.

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, 2019-06-24T07:30:00. The lang parameter is specified in ISO 639-1 format, en for English.

https://transit.hereapi.cn/v3/board.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&lang=en
&stnId=411400892
&time=2019-06-24T07%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://internal-ptkernel-prd-v010-1479417778.cn-northwest-1.elb.amazonaws.com.cn/goroute/HONG_KONG_SHIFTED_DEMO_V104_20181030",
    "NextDepartures": {
      "Dep": [{
        "time": "2019-06-24T08:00:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:00:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:01:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:01:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:02:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:02:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus N21A",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:03:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:03:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970X",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:04:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:05:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:05:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970X",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:05:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:06:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:06:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:07:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:08:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:08:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:09:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:09:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:09:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970X",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:10:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:10:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:11:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:12:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:12:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus N21A",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:13:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:13:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:14:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:15:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970X",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:15:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970X",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:15:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:16:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:16:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:17:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:17:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }, {
        "time": "2019-06-24T08:17:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:18:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:19:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:20:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u6a5f\u5834(\u5730\u9762\u904b\u53c1\u4e2d\u5fc3) \u65b9\u5411",
          "name": "Citybus A21",
          "At": {
            "category": "Bus",
            "operator": "acn02100"
          }
        }
      }, {
        "time": "2019-06-24T08:20:00",
        "Stn": {
          "y": 22.30353,
          "x": 114.176448,
          "name": "Nanking St",
          "id": "411400892"
        },
        "Transport": {
          "mode": 5,
          "dir": "\u5f00\u5f80 \u8607\u5c4b\u53c1 \u65b9\u5411",
          "name": "First Bus 970",
          "At": {
            "category": "Bus",
            "operator": "acn13000"
          }
        }
      }],
      "Operators": {
        "Op": [{
          "code": "acn02100",
          "type": "TT",
          "name": "\u57ce\u5df4\u6709\u9650\u516c\u53f8",
          "short_name": "021"
        }, {
          "code": "acn13000",
          "type": "TT",
          "name": "\u65b0\u4e16\u754c\u7b2c\u4e00\u5df4\u58eb\u670d\u52d9\u6709\u9650\u516c\u53f8",
          "short_name": "130"
        }]
      }
    }
  }
}