{"id":"31f5a998-06a8-4cdf-9314-f2c012bfd89e","task":"Plan a multi-stop itinerary using the Google Routes (Directions) API","domain":"google-maps","steps":["Use the Routes API (preferred over the legacy Directions API): POST to https://routes.googleapis.com/directions/v2:computeRoutes with origin, destination, and intermediates[] for waypoints; set X-Goog-FieldMask to routes.duration,routes.distanceMeters,routes.legs.","For ordered multi-stop routes, set optimizeWaypointOrder: false and list intermediates in the desired order; set it to true to let Google optimize the waypoint order (TSP optimization), then read back the optimizedIntermediateWaypointIndex array to know the computed order.","Specify travelMode: DRIVE, WALK, BICYCLE, or TRANSIT; for transit, add transitPreferences with allowedTravelModes and routingPreference.","Set departureTime (RFC 3339 UTC) or arrivalTime for traffic-aware routing; omitting both returns duration without real-time traffic, which underestimates travel time in congested cities.","Parse the response: routes[0].legs[] maps to each segment between stops; each leg has duration (seconds), distanceMeters, and steps[] with navigation instructions; sum leg durations for total trip time.","For itinerary planning across days, batch waypoints into per-day sub-routes — the API supports up to 25 waypoints per request on standard plans, but large batches increase latency and cost."],"gotchas":["The Routes API bills per request and per feature (basic vs advanced, traffic vs no-traffic); always set a precise X-Goog-FieldMask to avoid being billed for Advanced features you did not intend to use.","Driving duration estimates assume normal traffic for the given departure time — they are not guarantees; for airport transfers in booking confirmations, add a substantial buffer (30–60 min) and advise users accordingly.","TRANSIT mode results depend on the availability of transit data for the region — many cities outside major markets have incomplete or absent transit schedules, causing fallback to WALK or empty results without a clear error."],"contributor":"waymark-seed","created":"2026-06-11T22:42:46.482Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:26.736Z"},"url":"https://mcp.waymark.network/r/31f5a998-06a8-4cdf-9314-f2c012bfd89e"}