Calculate pedestrian/walking routes

GET /pedestrian/route/lon,lat;lon,lat
Coordinates format: lon,lat;lon,lat (semicolon-separated waypoints)

Calculate optimal walking routes between coordinates using OSRM pedestrian routing. Prioritizes pedestrian infrastructure like sidewalks and footpaths. Compatible with OSRM API specification.

Parameters

Parameter Type Required Description Example
alternatives integer Number of alternative routes to return
Max: 3
2
overview string Geometry overview detail level
Values: full, simplified, false
full
geometries string Geometry format
Values: polyline, geojson
polyline
steps boolean Include turn-by-turn instructions True
annotations string Route annotations to include
Values: duration, distance, duration,distance
duration,distance
skip_waypoints boolean Skip waypoint details in response for cleaner output True

Try It Out

Base URL: https://capi.busmaps.com:8443
Example Requests:
Common usage with optional parameters
curl -H "capi-key: Bearer YOUR_API_KEY" \
     -H "capi-host: busmaps.com" \
     "https://capi.busmaps.com:8443/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/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

HTTP 200 - Success
{
  "code": "Ok",
  "routes": [
    {
      "geometry": "cnqyHvm]@ABCBCB?B?D@D@DBBBBDBD@Fx@jEF\\LIJM`@g@R[^m@p@sAPc@JYT{@Ng@Ha@Nu@F]Fi@Fg@Da@B_@Dg@Bo@Bo@@a@Bu@@i@@[@s@@_@?WB]Bq@FsA@UJuB@a@FmADi@@W@MDc@JmA@IDYBS@KF]FY@E\\wAJ]Ja@?ABKFWFWFY@CHGDOHS@[BELABAFCPSL[DOJ_@BEBKDQRc@DMBODM@KBU@U@Y@U@]JADCBCR_@FMHMHINQ`@g@~@cAtBaCt@{@t@w@xAwAj@k@`@a@TWRUPYl@aAd@{@@Ka@kBXWHIHKHMFIDMDM@IBO@OCC@_@C?IEFMBEGE?A@I@CCIWeD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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

Title: Pedestrian Route Response

View Full JSON Schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Pedestrian Route Response",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Status code for the response"
    },
    "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 (distance, duration, ...) along the leg"
                },
                "duration": {
                  "type": "number",
                  "description": "Duration in seconds"
                },
                "steps": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "description": "Travel mode of the section (pedestrian, transit, ...)"
                      },
                      "duration": {
                        "type": [
                          "integer",
                          "number"
                        ],
                        "description": "Duration in seconds"
                      },
                      "name": {
                        "type": "string",
                        "description": "Display name"
                      },
                      "geometry": {
                        "type": "string",
                        "description": "Encoded route geometry"
                      },
                      "weight": {
                        "type": [
                          "integer",
                          "number"
                        ],
                        "description": "Routing weight"
                      },
                      "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": "Coordinate pair of the point"
                            },
                            "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": "Coordinate pair of the point"
                          },
                          "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": "Turn-by-turn steps of the leg"
                },
                "distance": {
                  "type": "number",
                  "description": "Distance in meters"
                },
                "weight": {
                  "type": "number",
                  "description": "Routing weight"
                }
              },
              "required": [
                "duration",
                "steps",
                "distance",
                "weight"
              ]
            },
            "description": "Legs of the route between consecutive waypoints"
          },
          "duration": {
            "type": "number",
            "description": "Duration in seconds"
          },
          "distance": {
            "type": "number",
            "description": "Distance in meters"
          },
          "weight_name": {
            "type": "string",
            "description": "Metric used for the weight (usually 'duration')"
          },
          "geometry": {
            "type": "string",
            "description": "Encoded route geometry"
          },
          "weight": {
            "type": "number",
            "description": "Routing weight"
          }
        },
        "required": [
          "legs",
          "duration",
          "distance",
          "weight",
          "weight_name"
        ]
      },
      "description": "Calculated 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": "Coordinate pair of the point"
          },
          "name": {
            "type": "string",
            "description": "Display name"
          }
        },
        "required": [
          "hint",
          "location",
          "distance"
        ]
      },
      "description": "Snapped input waypoints"
    }
  },
  "required": [
    "waypoints",
    "code",
    "routes"
  ]
}
Response Codes
HTTP 200 Ok

Successful route calculation

HTTP 400 InvalidInput

Invalid input parameters

HTTP 404 NoRoute

No route found

HTTP 422 NoSegment

No route segment found