Plan walking routes for voice agents
For voice models and voice agents, this endpoint reduces response tokens and keeps spoken-answer tool calls focused. Return one pedestrian route in a compact response for clients that need a smaller payload. The same routing service is available with busmaps.com and wikiroutes.info. stepFields declares the positions in each steps row. The Compact API response removes zero-distance steps, merges redundant continuation steps on the same named street and targets 12 key manoeuvres. Named streets, non-walking modes and significant junction manoeuvres are retained even when this makes the response longer. Geometry, intersections, waypoints and routing metadata are omitted. NoRoute and NoSegment are returned as successful compact responses with empty steps so clients can explain that no route is available.
Voice-ready response: This JSON REST method uses a smaller positional representation so voice models spend fewer tokens on repeated fields and map-only data. It does not accept or process audio.
The standard endpoint returns the complete application and map-oriented response for the same capability.
View the standard endpoint →Response fields and units
| Field | Format / unit | Meaning |
|---|---|---|
distanceMeters | meters | Total route distance, rounded to the nearest meter |
durationMinutes | minutes | Total route time, rounded to the nearest minute |
stepFields | [type, modifier, name, exit, distanceMeters, mode] | Column order for every steps row |
steps[] | positional array | Ordered key route manoeuvre including travel mode; indexes match stepFields |
Parameters
This endpoint takes no query parameters.
Try It Out
curl -H "capi-key: Bearer YOUR_API_KEY" \
-H "capi-host: busmaps.com" \
"https://capi.busmaps.com:8443/compact/v1/pedestrian/route/-0.1276,51.5072;-0.1195,51.5033"Response Example
{
"code": "Ok",
"distanceMeters": 932,
"durationMinutes": 11,
"stepFields": [
"type",
"modifier",
"name",
"exit",
"distanceMeters",
"mode"
],
"steps": [
[
"depart",
null,
null,
null,
3,
"walking"
],
[
"turn",
"left",
"Charing Cross",
null,
20,
"walking"
],
[
"turn",
"right",
"Northumberland Avenue",
null,
258,
"walking"
],
[
"fork",
"slight left",
"Northumberland Avenue",
null,
42,
"walking"
],
[
"turn",
"left",
"Embankment Place",
null,
4,
"walking"
],
[
"turn",
"right",
"Golden Jubilee Bridges",
null,
363,
"walking"
],
[
"continue",
"right",
"Golden Jubilee Bridge",
null,
23,
"walking"
],
[
"new name",
"straight",
"The Queen's Walk",
null,
219,
"walking"
]
]
}Response Schema
View JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Compact Pedestrian Route Response",
"type": "object",
"properties": {
"code": {
"type": [
"string",
"null"
],
"description": "Pedestrian route status code"
},
"distanceMeters": {
"type": [
"integer",
"null"
],
"description": "Total route distance rounded to meters"
},
"durationMinutes": {
"type": [
"integer",
"null"
],
"description": "Total route duration rounded to minutes"
},
"message": {
"type": "string",
"description": "Error details when no route is available"
},
"stepFields": {
"type": "array",
"items": [
{
"const": "type"
},
{
"const": "modifier"
},
{
"const": "name"
},
{
"const": "exit"
},
{
"const": "distanceMeters"
},
{
"const": "mode"
}
],
"additionalItems": false,
"minItems": 6,
"maxItems": 6,
"description": "Column order for steps rows"
},
"steps": {
"type": "array",
"items": {
"type": "array",
"items": [
{
"type": [
"string",
"null"
],
"description": "Manoeuvre type such as depart, turn, or arrive"
},
{
"type": [
"string",
"null"
],
"description": "Turn direction such as left, right, or straight"
},
{
"type": [
"string",
"null"
],
"description": "Street, path, or place name"
},
{
"type": [
"integer",
"null"
],
"description": "Roundabout exit number"
},
{
"type": [
"integer",
"null"
],
"description": "Distance to the next manoeuvre in meters"
},
{
"type": [
"string",
"null"
],
"description": "Travel mode such as walking or ferry"
}
],
"additionalItems": false,
"minItems": 6,
"maxItems": 6
},
"description": "Ordered key pedestrian-route manoeuvres"
}
},
"required": [
"code",
"distanceMeters",
"durationMinutes",
"stepFields",
"steps"
]
}Response Codes
200
Compact route or no-route result400
Invalid coordinates or request500
Walking routing service error