Enable the Routes API in your Google Cloud project and create an API key or service account credential restricted to the Routes API
Send a POST request to the computeRouteMatrix endpoint with an array of origin and destination waypoints; each origin-destination pair yields one route element in the response
Extract the distanceMeters field from each route element in the response to determine the one-way or round-trip distance for the claimed mileage
Multiply distanceMeters by the applicable IRS standard mileage rate for the reimbursement year — for 2025 the rate is 70 cents per mile and for 2026 it is 72.5 cents per mile — converting meters to miles first
Flag claims where the claimed distance exceeds the API-computed distance by a configurable tolerance threshold for human review before approval
Cache route results for frequently repeated origin-destination pairs to reduce per-element billing; billing is per element where elements equal origins multiplied by destinations
Known gotchas
The Directions API and Distance Matrix API were moved to legacy status effective March 2025; new implementations should use the Routes API computeRouteMatrix endpoint rather than the legacy surfaces
The computeRouteMatrix endpoint bills per route element, not per request; a matrix with 5 origins and 5 destinations generates 25 billable elements — model your usage accordingly before enabling for high-volume expense ingestion
Driving distance computed by Google may differ from the route a traveler actually drove; IRS guidance allows reimbursement for actual routes, so use the API result as a sanity check rather than a hard cap
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp