Calculate pedestrian/walking routes

GET /v1/pedestrian/route/{coordinates}
Coordinates format: lon,lat;lon,lat (semicolon-separated waypoints)
Base URL: https://capi.busmaps.com:8443

Calculate optimal walking routes between coordinates using OSRM pedestrian routing. This shared service is independent of the selected BusMaps or WikiRoutes transit data host and is available with either capi-host value. Prioritizes pedestrian infrastructure like sidewalks and footpaths. Compatible with OSRM API specification.

Using this data in a voice model?

The Voice Model-Ready endpoint preserves answer-critical transit facts while reducing response tokens and map-only data.

View the Voice Model-Ready endpoint →

Response fields and units

FieldFormat / unitMeaning
routes[].distance, routes[].legs[].distance, routes[].legs[].steps[].distance meters Route, leg and step distance
routes[].duration, routes[].legs[].duration, routes[].legs[].steps[].duration seconds Route, leg and step duration
routes[].legs[].annotation.distance[], routes[].legs[].annotation.duration[] meters, seconds Per-segment distance and duration
waypoints[].distance meters Distance from the input coordinate to the snapped waypoint
waypoints[].location, GeoJSON coordinates [longitude, latitude] in decimal degrees Coordinate-array order
routes[].weight unit named by weight_name Seconds when weight_name is duration

Parameters

ParameterTypeRequiredDescriptionExample
alternatives integer No Number of alternative routes to return 2
overview string No Geometry overview detail level (Values: full, simplified, false) full
geometries string No Geometry format (Values: polyline, geojson) polyline
steps boolean No Include turn-by-turn instructions true
annotations string No Route annotations to include (Values: duration, distance, duration,distance) duration,distance
skip_waypoints boolean No Skip waypoint details in response for cleaner output true

Try It Out

Common usage with optional parameters

curl -H "capi-key: Bearer YOUR_API_KEY" \
     -H "capi-host: busmaps.com" \
     "https://capi.busmaps.com:8443/v1/pedestrian/route/-0.155956,51.540343;-0.069214,51.512959?alternatives=2&overview=full&skip_waypoints=true"

Popular parameters

curl -H "capi-key: Bearer YOUR_API_KEY" \
     -H "capi-host: busmaps.com" \
     "https://capi.busmaps.com:8443/v1/pedestrian/route/-0.155956,51.540343;-0.069214,51.512959?alternatives=2&overview=full&geometries=polyline&steps=true&annotations=duration,distance&skip_waypoints=true"

Response Example

{
    "code": "Ok",
    "routes": [
        {
            "geometry": "c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DMDIJWLUHOPUFENA?E@UBY?G?CAA@IL{@b@gEV}C@C?G@G?EFo@N{AH_ADa@NyADk@BQBI@O@YVkDPeBDa@JgA?E@OBKDa@B?@A@ABK@IBQDSEOAG?G?IBUD_@@O@C@I@MBIACCKCKAAC?ACCCAE?E@Q@[DqBBqBEcACy@A[A_AAw@Aq@CwB?q@AgA?_@IA?Y?u@?I?MA[Au@?_@Ai@Aq@?CAY?M?UASAw@?QAK?SAO?WAW?U?Q@M?YBc@?OD_ABYL_BDg@@WDk@Ba@Bu@@q@B}B?K?K@S?IAQEMCMACQy@EOCGGQCKCKDKCGAMCMMi@Ki@AOCOCMk@wBAECEAGAGEQAGOm@FCFGBCZM@C@A@A@g@X[FEXWFMBSIeACSDAFOLE?EAI?E?CAC?CAC^M@AQ{AGg@CSMq@AE?CU_ACKEQw@eD@ADEESIWDC@ABD@@tAcA\\Wi@gCbBqAJf@",
            "legs": [
                {
                    "annotation": {
                        "distance": [
                            1.257435,
                            3.105855
                        ],
                        "duration": [
                            0.9,
                            2.2
                        ]
                    },
                    "steps": [],
                    "distance": 7965.1,
                    "duration": 5769.3,
                    "summary": "",
                    "weight": 5769.3
                }
            ],
            "distance": 7965.1,
            "duration": 5769.3,
            "weight_name": "duration",
            "weight": 5769.3
        }
    ],
    "waypoints": [
        {
            "hint": "wwLgpbUD4KUJAAAAFAAAAGcDAACIAAAApiyhP-2WNEAHNPNCZ86XQQkAAAAUAAAAZwMAAIgAAABBAAAAzJ79_3dxEgPvn_3_A3ISAw0ALxR6vxoo",
            "distance": 25.505499,
            "name": "Chalcot Crescent",
            "location": [
                -0.155956,
                51.540343
            ]
        },
        {
            "hint": "3V3dpRtk3aVwAAAAcgAAAPIBAAAAAAAAOP57QTj-e0HTbopCAAAAAHAAAAByAAAA8gEAAAAAAABBAAAAovH-_38GEgNP8f7_6AYSAwIA_wN6vxoo",
            "distance": 13.025276,
            "name": "",
            "location": [
                -0.069214,
                51.512959
            ]
        }
    ]
}

Response Schema

View JSON Schema
{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Pedestrian Route Response",
    "type": "object",
    "properties": {
        "code": {
            "type": "string",
            "description": "Response status code (Ok, NoRoute, etc.)"
        },
        "routes": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "legs": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "summary": {
                                    "type": "string",
                                    "description": "Summary of the leg (main streets)"
                                },
                                "annotation": {
                                    "type": "object",
                                    "properties": {
                                        "distance": {
                                            "type": "array",
                                            "items": {
                                                "type": "number"
                                            },
                                            "description": "Distance in meters"
                                        },
                                        "duration": {
                                            "type": "array",
                                            "items": {
                                                "type": [
                                                    "integer",
                                                    "number"
                                                ]
                                            },
                                            "description": "Duration in seconds"
                                        }
                                    },
                                    "required": [
                                        "distance",
                                        "duration"
                                    ],
                                    "description": "Per-segment metadata along the leg; distance values are meters and duration values are seconds"
                                },
                                "duration": {
                                    "type": "number",
                                    "description": "Duration in seconds"
                                },
                                "steps": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "mode": {
                                                "type": "string",
                                                "description": "OSRM travel mode for this pedestrian-route step (normally walking; ferry on ferry segments)"
                                            },
                                            "duration": {
                                                "type": [
                                                    "integer",
                                                    "number"
                                                ],
                                                "description": "Duration in seconds"
                                            },
                                            "name": {
                                                "type": "string",
                                                "description": "Display name"
                                            },
                                            "geometry": {
                                                "type": "string",
                                                "description": "Route geometry (polyline or GeoJSON)"
                                            },
                                            "weight": {
                                                "type": [
                                                    "integer",
                                                    "number"
                                                ],
                                                "description": "Routing weight; its unit is defined by weight_name (seconds when weight_name is 'duration')"
                                            },
                                            "driving_side": {
                                                "type": "string",
                                                "description": "Driving side at the step (left/right)"
                                            },
                                            "intersections": {
                                                "type": "array",
                                                "items": {
                                                    "type": "object",
                                                    "properties": {
                                                        "entry": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "boolean"
                                                            },
                                                            "description": "Whether each bearing is a permitted entry"
                                                        },
                                                        "out": {
                                                            "type": "integer",
                                                            "description": "Index of the outgoing bearing"
                                                        },
                                                        "location": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "number"
                                                            },
                                                            "description": "Point location. Coordinate arrays use [longitude, latitude] in decimal degrees; objects expose named latitude/longitude fields"
                                                        },
                                                        "bearings": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "integer"
                                                            },
                                                            "description": "Available bearings at the intersection (degrees)"
                                                        },
                                                        "in": {
                                                            "type": "integer",
                                                            "description": "Index of the incoming bearing"
                                                        }
                                                    },
                                                    "required": [
                                                        "entry",
                                                        "location",
                                                        "bearings"
                                                    ]
                                                },
                                                "description": "Intersections passed in this step"
                                            },
                                            "distance": {
                                                "type": [
                                                    "integer",
                                                    "number"
                                                ],
                                                "description": "Distance in meters"
                                            },
                                            "maneuver": {
                                                "type": "object",
                                                "properties": {
                                                    "bearing_before": {
                                                        "type": "integer",
                                                        "description": "Bearing before the maneuver (degrees)"
                                                    },
                                                    "modifier": {
                                                        "type": "string",
                                                        "description": "Direction modifier of the maneuver (left, right, ...)"
                                                    },
                                                    "type": {
                                                        "type": "string",
                                                        "description": "Type discriminator for the object"
                                                    },
                                                    "location": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "number"
                                                        },
                                                        "description": "Point location. Coordinate arrays use [longitude, latitude] in decimal degrees; objects expose named latitude/longitude fields"
                                                    },
                                                    "bearing_after": {
                                                        "type": "integer",
                                                        "description": "Bearing after the maneuver (degrees)"
                                                    }
                                                },
                                                "required": [
                                                    "bearing_before",
                                                    "modifier",
                                                    "type",
                                                    "location",
                                                    "bearing_after"
                                                ],
                                                "description": "Turn maneuver for this step"
                                            },
                                            "ref": {
                                                "type": "string",
                                                "description": "Reference code of the way (road number)"
                                            }
                                        },
                                        "required": [
                                            "mode",
                                            "duration",
                                            "driving_side",
                                            "distance",
                                            "intersections",
                                            "maneuver",
                                            "geometry",
                                            "weight"
                                        ]
                                    },
                                    "description": "Array of step-by-step directions"
                                },
                                "distance": {
                                    "type": "number",
                                    "description": "Distance in meters"
                                },
                                "weight": {
                                    "type": "number",
                                    "description": "Routing weight; its unit is defined by weight_name (seconds when weight_name is 'duration')"
                                }
                            },
                            "required": [
                                "duration",
                                "steps",
                                "distance",
                                "weight"
                            ]
                        },
                        "description": "Array of route legs between waypoints"
                    },
                    "duration": {
                        "type": "number",
                        "description": "Duration in seconds"
                    },
                    "distance": {
                        "type": "number",
                        "description": "Distance in meters"
                    },
                    "weight_name": {
                        "type": "string",
                        "description": "Weight metric name (usually 'duration')"
                    },
                    "geometry": {
                        "type": "string",
                        "description": "Route geometry (polyline or GeoJSON)"
                    },
                    "weight": {
                        "type": "number",
                        "description": "Routing weight; its unit is defined by weight_name (seconds when weight_name is 'duration')"
                    }
                },
                "required": [
                    "legs",
                    "duration",
                    "distance",
                    "weight",
                    "weight_name"
                ]
            },
            "description": "Array of calculated walking routes"
        },
        "waypoints": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "hint": {
                        "type": "string",
                        "description": "Opaque OSRM hint for re-snapping the waypoint"
                    },
                    "distance": {
                        "type": "number",
                        "description": "Distance in meters"
                    },
                    "location": {
                        "type": "array",
                        "items": {
                            "type": "number"
                        },
                        "description": "Point location. Coordinate arrays use [longitude, latitude] in decimal degrees; objects expose named latitude/longitude fields"
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name"
                    }
                },
                "required": [
                    "hint",
                    "location",
                    "distance"
                ]
            },
            "description": "Array of waypoint objects for input coordinates"
        }
    },
    "required": [
        "waypoints",
        "code",
        "routes"
    ]
}

Response Codes

200 Successful route calculation
400 Invalid input parameters
404 No route found
422 No route segment found