{"uid":"cap_X964inuCNBTcaTei2XUBL","slug":"zeroclick-x402-service-registry-directions-79a67476","name":"Mapbox Directions (Turn-by-Turn Routing)","description":"Get turn-by-turn driving, walking, or cycling directions between two locations via Mapbox. Accepts addresses or \"lat,lng\" coordinates for origin and destination. Returns total distance, duration, step-by-step instructions, and an encoded polyline. If addresses are provided they are automatically geocoded first.","url":"https://directions.withzero.ai/run?utm_source=zero.xyz","method":"POST","headers":{"X-ZAM-Access-Key":"zeroclick"},"bodySchema":{"type":"object","required":["origin","destination"],"properties":{"mode":{"enum":["driving","walking","cycling","driving-traffic"],"type":"string","default":"driving","description":"Travel mode: driving (default), walking, cycling, or driving-traffic"},"origin":{"type":"string","minLength":1,"description":"Starting point — \"lat,lng\" coordinates or an address string"},"destination":{"type":"string","minLength":1,"description":"Ending point — \"lat,lng\" coordinates or an address string"}},"additionalProperties":false},"responseSchema":{"type":"object","required":["distance","duration","summary","steps","geometry"],"properties":{"steps":{"type":"array","items":{"type":"object","required":["instruction","distance","duration"],"properties":{"distance":{"type":"number","description":"Distance for this step in meters"},"duration":{"type":"number","description":"Duration for this step in seconds"},"instruction":{"type":"string","description":"Turn-by-turn instruction text"}},"additionalProperties":false},"description":"Turn-by-turn navigation steps"},"summary":{"type":"string","description":"Route summary (road names)"},"distance":{"type":"number","description":"Total distance in meters"},"duration":{"type":"number","description":"Total duration in seconds"},"geometry":{"type":"string","description":"Encoded polyline geometry of the route"}},"additionalProperties":false},"example":{"request":{"mode":"walking","origin":"40.7484,-73.9857","destination":"40.7527,-73.9772"},"response":{"steps":[{"distance":70,"duration":49,"instruction":"Walk southeast on the walkway."},{"distance":154,"duration":121,"instruction":"Turn left onto the walkway."},{"distance":23,"duration":19,"instruction":"Turn right onto the walkway."},{"distance":252,"duration":199,"instruction":"Turn left onto the walkway."},{"distance":134,"duration":95,"instruction":"Turn right onto the walkway."},{"distance":63,"duration":45,"instruction":"Turn left onto the walkway."},{"distance":1,"duration":1,"instruction":"Turn right onto the walkway."},{"distance":13,"duration":10,"instruction":"Turn left onto the crosswalk."},{"distance":1,"duration":1,"instruction":"Turn left onto the walkway."},{"distance":143,"duration":92,"instruction":"Turn right onto the walkway."},{"distance":19,"duration":16,"instruction":"Turn right onto the walkway."},{"distance":80,"duration":51,"instruction":"Turn left onto the walkway."},{"distance":78,"duration":49,"instruction":"Turn right onto the walkway."},{"distance":24,"duration":22,"instruction":"Turn left onto the walkway."},{"distance":4,"duration":3,"instruction":"Turn right onto the walkway."},{"distance":63,"duration":42,"instruction":"Keep left at the fork."},{"distance":55,"duration":39,"instruction":"Turn right onto the walkway."},{"distance":0,"duration":0,"instruction":"You have arrived at your destination."}],"summary":"","distance":1177,"duration":855,"geometry":"esuwFpjqbMz@oCgBkAEAMKKICAeBkA?EHSFO@ECAGEECECaBiAECGEGECA_BeAGCEEIGEA_BcACCGEKGACtBuGcBeAACGEKGA?cBiA?AIGKE??eBgA@EDMDM@ECAGEGECCcBkAbAaDEAIIOKECBGAG?CAA?Ew@e@IMQOTw@Xw@"}},"exampleRequest":{"mode":"walking","origin":"40.7484,-73.9857","destination":"40.7527,-73.9772"},"tags":["location","directions","routing","navigation","driving","mapbox","maps"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0U3yo06mV1-gZJFsoObZB","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":"directions:1"}],"brandName":"ZeroClick x402 Service Registry","brandSlug":"zeroclick-x402-service-registry","brandBaseUrl":"https://withzero.ai","brandDocsUrl":null,"whatItDoes":"Returns turn-by-turn driving, walking, or cycling directions between two locations, including distance, duration, step instructions, and an encoded polyline route geometry.","exampleAgentPrompt":"Get me walking directions from the Empire State Building at 40.7484,-73.9857 to Grand Central Terminal at 40.7527,-73.9772 — I want step-by-step instructions and the total distance.","exampleUseCases":null,"resultDescription":"A JSON object containing total route distance in meters, total duration in seconds, a road-name summary string, an array of turn-by-turn step objects (each with instruction text, step distance, and step duration), and an encoded polyline string representing the full route geometry.","failureModes":["Invalid or unresolvable address causes geocoding failure — returns error with no route","Origin and destination are the same or too close — may return empty or trivial route","Unsupported travel mode value — rejected by schema validation","No route available between points (e.g. island with no road) — Mapbox returns no-route error","Malformed coordinate string (wrong format) — schema or geocoder rejects input"],"whenToPreferThis":"Choose this endpoint when you need structured, step-by-step navigation directions between two specific points and want distance/duration alongside the route geometry. It is ideal when either addresses or lat/lng coordinates are available as input, and when the agent needs to present human-readable turn instructions or render a route on a map. Prefer this over a generic maps search when the goal is routing rather than place discovery.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T00:38:20.271Z","isFirstParty":true,"canonicalSlug":"zeroclick-x402-service-registry-directions-79a67476"}