Get line polyline coordinates
bus_get_line_routeRetrieve polyline coordinates of a bus line's route for map visualization. Returns stop markers by default; include_shape=true for full shape points to draw the line accurately.
Instructions
Polyline coordinates for drawing a line on a map. Points with 'stopOrder' are actual stops; others are shape points between stops.
Args:
city_id (string, required)
line_id (string, required)
include_shape (boolean, default false): false returns only stop markers (~25 points); true returns all shape points (~400-500). Skip unless you actually need to draw the line.
response_format ('markdown' | 'json')
Returns (json): { "pointCount": 480, // total shape points upstream returned "stopCount": 23, // stop markers among them "points": [{ "lat":..., "lng":..., "stopOrder":1 }, ...] } 'points' is the filtered list — stops only by default, full polyline when include_shape=true.
Known caveat: upstream sometimes omits the terminus stop from the polyline, so 'stopCount' may be one less than bus_get_line_detail's 'stationsNum' (e.g. 23 vs 24). Trust bus_get_line_detail for the authoritative station list; line_route is just for drawing.
Markdown mode only summarises counts; request JSON to read coordinates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city_id | Yes | ||
| line_id | Yes | ||
| include_shape | No | If true, include all polyline shape points (often 400-500 per line). Default false returns only stop-marker points. | |
| response_format | No | Output format: 'markdown' for human-readable text, 'json' for full structured data | markdown |