Public Transit API Developer's Guide

Transit Stations by Name

User Story

The user wants to search for transit stations in Hong Kong (22.301982,114.182154) with the name "Hong Kong".


The query parameter center specifies the location of the search.
&name=Hong Kong


The response to the request contains the following information blocks:
  • a maximum of 15 transit stations by default, can be configured using the optional max parameter
  • each station element includes the following information:
    • name, ID, longitude, and latitude of the station
    • distance in meters from the station, available only when you query for stations around you
    • expcted time to reach the station from your current location, available only when you query for stations around you
    • if a Next Nearby Departures request can be performed
    • the country where the x and y parameters point to
    • country code compliant to ISO 3166-1
    • state in the country
    • postal code
    • district in the state
    • name of the street, square, or boulevard
    • name of the city closest to the center parameter point to
  "Res": {
    "serviceUrl": "",
    "Stations": {
      "Stn": [{
        "id": "411406057",
        "name": "\u4e2d\u6e2f\u57ce",
        "distance": 993,
        "duration": "PT0H16M33S",
        "x": 114.174256,
        "y": 22.296836,
        "has_board": 1,
        "country": "\u4e2d\u56fd",
        "ccode": "CHN"
      }, {
        "id": "411404147",
        "name": "\u9999\u6e2f\u4e2d\u592e\u5716\u66f8\u9928",
        "distance": 2968,
        "duration": "PT0H49M28S",
        "x": 114.194806,
        "y": 22.277971,
        "has_board": 1,
        "country": "\u4e2d\u56fd",
        "ccode": "CHN"
      }, {
        "id": "411411429",
        "name": "\u5eb7\u76db\u82b1\u5712",
        "distance": 8011,
        "duration": "PT2H13M31S",
        "x": 114.258687,
        "y": 22.315533,
        "has_board": 1,
        "country": "\u4e2d\u56fd",
        "ccode": "CHN"
      }, {
        "id": "411402555",
        "name": "\u592a\u5eb7\u6a13",
        "distance": 5111,
        "duration": "PT1H25M11S",
        "x": 114.226032,
        "y": 22.280352,
        "has_board": 1,
        "country": "\u4e2d\u56fd",
        "ccode": "CHN"
      }, {
        "id": "411404199",
        "name": "\u9577\u5eb7\u53c1\u5eb7\u5bcc\u6a13",
        "distance": 8927,
        "duration": "PT2H28M47S",
        "x": 114.110915,
        "y": 22.347939,
        "has_board": 1,
        "country": "\u4e2d\u56fd",
        "ccode": "CHN"