Skip to main content

MapMatchRequest

trace object[]required

Ordered GPS observations to snap to the road network.

Possible values: >= 2, <= 500

  • Array [
  • latnumber<double>required

    Latitude of the GPS observation.

    Example: 5.6037
    lngnumber<double>required

    Longitude of the GPS observation.

    Example: -0.1867
    timestring<date-time>

    RFC3339 timestamp of the observation. Optional but recommended — timestamps improve matching accuracy at complex intersections.

    Example: 2026-05-18T08:30:00Z
    accuracy_mnumber<double>

    Reported horizontal accuracy of this fix in metres. When gps_accuracy_m is not set, the median of these values tunes the matcher automatically.

    Example: 18
  • ]
  • modestring

    Travel mode. Use foot for pedestrian agent traces.

    Possible values: [driving, foot, bicycle, motor_scooter]

    Default value: driving
    Example: driving
    gps_accuracy_mnumber

    Expected GPS noise of the trace in metres. Defaults to the median of per-point accuracy_m values when present, else Valhalla's default (~5 m — optimistic for dense urban traces; 10-30 matches typical Accra conditions).

    Possible values: >= 0 and <= 100

    Example: 20
    search_radius_mnumber

    Candidate-road search radius per trace point in metres (default ~50).

    Possible values: >= 0 and <= 100

    Example: 80
    MapMatchRequest
    {
    "trace": [
    {
    "lat": 5.6037,
    "lng": -0.1867,
    "time": "2026-05-18T08:30:00Z",
    "accuracy_m": 18
    }
    ],
    "mode": "driving",
    "gps_accuracy_m": 20,
    "search_radius_m": 80
    }