Route stop list

This API returns all stops for a given route, including coordinates, stop type, order, and fare information.

How to get data

Method

GET

Request address

To get the data, use the address: https://<server_address>/api/api.php?

Request parameters

  • cmd=stopList — command to get stop list
  • line_num — route number
  • node — node number where the command should be executed
 

Example request

https://<server_address>/api/api.php?cmd=stopList&line_num=1Б&node=1
Response
{
  "code": 0,
  "line": {
    "id": 1083,
    "name": "1Б",
    "number": "1Б",
    "bidirectional": 1,
    "description": "1Б",
    "active": 1,
    "price": "25.00",
    "interval": 25,
    "folder": null,
    "stops": [
      {
        "id": 5085,
        "name": "Центр занятости",
        "lat": "54.9036",
        "lon": "52.3315",
        "radius": 60,
        "stop_type": 0,
        "descr": null,
        "stop_order": 1,
        "price": "0.00",
        "ts": 0,
        "te": 0,
        "dir": 0,
        "silent": 0
      },
      {
        "id": 5086,
        "name": "Автовокзал",
        "lat": "54.9039",
        "lon": "52.3236",
        "radius": 60,
        "stop_type": 2,
        "descr": null,
        "stop_order": 2,
        "price": "0.00",
        "ts": 0,
        "te": 0,
        "dir": 0,
        "silent": 0
      }
    ]
  }
}
In response to the API request, the following is returned:
  • line.id — unique route ID
  • line.name — route name
  • line.number — route number
  • bidirectional — 1 if the route is bidirectional
  • active — 1 if the route is active
  • price — fare for the route
  • interval — interval between vehicles in minutes
  • stops — array of route stops:
  • id — unique stop ID
  • name — stop name
  • lat, lon — stop coordinates
  • radius — stop zone radius in meters
  • stop_type — stop type: 0 — normal, 1 — technical, 2 — terminal
  • stop_order — order of the stop in the route
  • silent — 1 to not generate notifications for this stop