Public Transit API Developer's Guide

Constructing a Request

A typical request to the Public Transit API includes the basic elements shown in the following table and, in addition, it may contain resource-specific query parameters or data.

Table 1. Basic Request Elements
Element Value/Example Description
Base URL https://transit.hereapi.cn Production environment
Path /v3 Common path for all resources
Resource route, sectionupdate Transit Routing
branding/logos Logo Brands
board Next Nearby Departures
multiboard/by_geocoord, multiboard/by_stn_ids All Next Departures
isochrone Transit Isoline
lines/by_stn_id Line Info
Format Supported formats:
  • json
  • xml
If not specified in the request, the default response format is XML.
Application ID &app_id={YOUR_APP_ID} Substitute your own unique app_id
Application Code &app_code={YOUR_APP_CODE} Substitute your own unique app_code

Here is an example of a Station Search request, which uses the HTTP GET method:

https://transit.hereapi.cn/v3/stations/by_name.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&center=22.301982,114.182154
&name="Hong Kong