Move from Google
Keep the code that calls Google's Geocoding, Directions, Distance Matrix, Places and Routes: change the base URL and the key. What each call becomes here, what differs, and what a month costs at both.
Base URLhttps://makani-gke-eu.lamah.com
Change the URL and the key
The Google web services a delivery or a ride application calls have a compatible endpoint here: Geocoding (with reverse geocoding), Directions, Distance Matrix, Place Autocomplete and Place Details, and their current forms, Places API (New) and Routes API. Each takes Google's request and answers in Google's shape with Google's statuses, so the code that builds the request and reads the answer stays as it is.
One base address serves them all: /v1/compat/google on this platform's API, followed by the path of Google's own URL. So https://maps.googleapis.com/maps/api becomes …/v1/compat/google/maps/api, and https://places.googleapis.com and https://routes.googleapis.com both become …/v1/compat/google. Google's key becomes a key from the console.
- The key. Send it as your code already does:
key=in the URL, or theX-Goog-Api-Keyheader of the current services. Thex-api-keyheader works on every endpoint and is used when both are sent; prefer a header, since a key in a URL can end up in the logs of whatever the request passes through. - The country. Every request is for one country. A key limited to one country needs nothing more: a request that names none, as most requests to Google do, takes the key's. Otherwise send the two-letter code as
region(regionCodeorincludedRegionCodeson the current services). A request without a country answersINVALID_REQUEST. - An app's identity. A key restricted to an Android or an iOS app is checked against
X-Android-PackagewithX-Android-Cert, orX-Ios-Bundle-Identifier: the headers Google's keys are checked against. A client that already sends them needs no change. - The same rules as the platform's own endpoints. Key scopes, countries, the plan, requests a minute, quotas, caps and road closures apply as they do there, and a request is counted the same way.
Each call and its equivalent
The compatible endpoint is the quick move. The platform's own endpoint is the one to write new code against: it has more options, and its answers are smaller.
| Service | At Google | Compatible endpoint | The platform's own | Scope |
|---|---|---|---|---|
| Distance Matrix | GET /maps/api/distancematrix/json | GET /v1/compat/google/maps/api/distancematrix/json?origins=…&destinations=… | POST /v1/routing/matrix | routing:matrix |
| Directions | GET /maps/api/directions/json | GET /v1/compat/google/maps/api/directions/json?origin=…&destination=… | POST /v1/routing/directions | routing:route |
| Geocoding | GET /maps/api/geocode/json?address= | GET /v1/compat/google/maps/api/geocode/json?address=… | GET /v1/addresses/search | addresses:search |
| Reverse geocoding | GET /maps/api/geocode/json?latlng= | GET /v1/compat/google/maps/api/geocode/json?latlng=… | GET /v1/addresses/resolve | addresses:resolve |
| Place Autocomplete | GET /maps/api/place/autocomplete/json | GET /v1/compat/google/maps/api/place/autocomplete/json?input=…&sessiontoken=… | GET /v1/addresses/{countryCode}/autocomplete | addresses:search |
| Place Details | GET /maps/api/place/details/json | GET /v1/compat/google/maps/api/place/details/json?place_id=…&sessiontoken=… | GET /v1/addresses/{addressId} | addresses:read |
| Autocomplete (New) | POST /v1/places:autocomplete | POST /v1/compat/google/v1/places:autocomplete | GET /v1/addresses/{countryCode}/autocomplete | addresses:search |
| Place Details (New) | GET /v1/places/{placeId} | GET /v1/compat/google/v1/places/{placeId}?fields=… | GET /v1/addresses/{addressId} | addresses:read |
| Routes: a route | POST /directions/v2:computeRoutes | POST /v1/compat/google/directions/v2:computeRoutes | POST /v1/routing/route | routing:route |
| Routes: a matrix | POST /distanceMatrix/v2:computeRouteMatrix | POST /v1/compat/google/distanceMatrix/v2:computeRouteMatrix | POST /v1/routing/matrix | routing:matrix |
Scopes are set on the key. The geocoding path asks addresses:search for an address, addresses:resolve for a latlng and addresses:read for a place_id. An app that suggests addresses, reads the chosen one, labels a pin and draws a route needs addresses:search, addresses:read, addresses:resolve and routing:route on its key.
Distance Matrix
origins and destinations are lat,lng points, or place_id: followed by a place id from here, separated by |: up to 25 each and 100 pairs in a request. The code that reads rows[0].elements[0].distance.value stays as it is:
routing:matrixcurl "https://makani-gke-eu.lamah.com/v1/compat/google/maps/api/distancematrix/json?origins=32.86,13.23&destinations=32.8872,13.1913&mode=driving&units=metric®ion=ly" \ -H "x-api-key: $MAKANI_API_KEY"Each answered pair is one unit of the routing matrix. What differs from Google, and how to ask less often, is in the Delivery fee quotes guide.
Directions
The answer has routes[0].legs[], one leg for each hop, each with distance, duration and steps[], and overview_polyline.points for the whole line. Every encoded line has five decimal places, as Google's, so your decoder stays as it is:
routing:routecurl "https://makani-gke-eu.lamah.com/v1/compat/google/maps/api/directions/json?origin=32.8872,13.1913&destination=32.86,13.23®ion=ly" \ -H "x-api-key: $MAKANI_API_KEY"A request is one routing request, whatever the number of waypoints. What differs from Google:
- Coordinates or place ids.
origin,destinationandwaypointsarelat,lng, orplace_id:followed by a place id this platform issued. Addresses and thevia:andenc:forms answerINVALID_REQUEST.start_addressandend_addressrepeat what you sent, andgeocoded_waypointscarries no place id. - Waypoints. Up to 20, visited in the order sent; more answers
MAX_WAYPOINTS_EXCEEDED.optimize:trueanswersINVALID_REQUEST:POST /v1/routing/optimizeorders stops. - One route.
alternativesis accepted and ignored:routesholds one route or none. - Travel modes.
driving(the default),walkingandbicycling.transit,arrival_time,transit_modeandtransit_routing_preferenceanswerINVALID_REQUEST. - No live traffic.
departure_time,traffic_modelandavoidare accepted and ignored.durationis the usual travel time, andduration_in_trafficis never returned. - Instructions.
html_instructionsis plain text in the request'slanguage, without<b>markup.maneuveris present where Google has a name for the turn. - Road closures. The route goes around the closures in effect. When no route can, the status is
ZERO_RESULTSanderror_messagesays why.
Geocoding and reverse geocoding
One path serves them, as at Google: address= searches the address registry, latlng= returns the addresses nearest a point, within 1,000 meters, and place_id= returns the address of a place id from here. Each result has formatted_address, geometry.location, address_components, types and a place_id:
addresses:searchcurl "https://makani-gke-eu.lamah.com/v1/compat/google/maps/api/geocode/json?address=Street%20984&components=country:QA&language=en" \ -H "x-api-key: $MAKANI_API_KEY"A request is one address request. What differs from Google:
- The registry, not a map of the world. Results are addresses of this platform's registry in the country you name. A business or a landmark name finds nothing unless it is part of an address.
- The country.
components=country:LYandregion=lyboth name it. Any othercomponentsfilter answersINVALID_REQUEST. - Up to five addresses. A reverse lookup then lists the areas that contain the point, innermost first, so a point with no address near it still has a label. For such a result
geometry.locationis the point you sent andlocation_typeisAPPROXIMATE. - Address components hold the areas around the address and the country. Street, building and postal code are not split out: read them from
formatted_address. - The place id is this platform's own: an opaque text that stays the same for an address and is safe in a URL. It is not a Google place id. Send it back as
place_id=here or to Place Details, or as aplace_id:point of Directions and Distance Matrix. The id of an area, in a result markedAPPROXIMATE, is not read back. - Ignored.
bounds,result_type,location_typeandextra_computations.plus_codeandpartial_matchare never returned. - Nothing found is
ZERO_RESULTS, and is counted like an empty search.
Place Autocomplete and Place Details
Suggestions as the user types come from address autocomplete, in Arabic and English. Each prediction has description, place_id, structured_formatting, matched_substrings, terms and types, and distance_meters when you send origin:
addresses:searchcurl "https://makani-gke-eu.lamah.com/v1/compat/google/maps/api/place/autocomplete/json?input=Street%2098&language=en&components=country:ly&sessiontoken=SESSION_TOKEN" \ -H "x-api-key: $MAKANI_API_KEY"When the user chooses a prediction, Place Details reads its address: formatted_address, geometry.location, address_components, name, types, url, and the phone and the website where the registry holds them:
addresses:readcurl "https://makani-gke-eu.lamah.com/v1/compat/google/maps/api/place/details/json?place_id=PLACE_ID&sessiontoken=SESSION_TOKEN&language=en" \ -H "x-api-key: $MAKANI_API_KEY"A typed search and the details that end it are one address request. What differs from Google:
- Addresses of the registry. Predictions are addresses of this platform's registry in one country. A place with a name of its own, such as a building or a shop, leads with the name in
main_textand has its address insecondary_text.typesis accepted and ignored. - One typed search, one charge. Send the same
sessiontokenwith every autocomplete request of a search and with the Place Details request that ends it: together they are counted once. Without a token every request is counted. A session lasts three minutes. - The first keystroke. An
inputof one character answersZERO_RESULTSand is not counted: the search starts at two characters. - The place id is this platform's own, and the only kind Place Details reads. A Google place id answers
INVALID_REQUEST; a place id whose address is no longer public answersNOT_FOUND. - Fields.
fieldsis honoured, and a field the registry does not hold is left out: opening hours, photos, ratings, reviews andplus_codeare never returned.urlis the address's page on this platform. A phone number is returned as it was registered, the same in both phone fields. - Address components hold the areas around the address and the country, as in geocoding. Street and building are not split out: read them from
formatted_address. - Bias and restriction.
locationwithradius,locationbias,locationrestrictionandstrictboundsare read; a circle restricts to the box around it.locationbias=ipbiasis ignored. - Places API (New).
POST /v1/places:autocompleteanswerssuggestions[].placePredictionandGET /v1/places/{placeId}aPlace, cut to the field mask, which a place requires as at Google.sessionTokenis counted the same way, andgoogleMapsUriis the address's page on this platform.
Routes API
computeRoutes takes Google's body and field mask and answers routes[] with distanceMeters, duration as a text such as 303s, and polyline.encodedPolyline with five decimal places, so the code that draws the line stays as it is:
routing:routecurl -X POST "https://makani-gke-eu.lamah.com/v1/compat/google/directions/v2:computeRoutes" \ -H "x-api-key: $MAKANI_API_KEY" \ -H "X-Goog-FieldMask: routes.duration,routes.distanceMeters,routes.polyline.encodedPolyline" \ -H "content-type: application/json" \ -d '{ "origin": { "location": { "latLng": { "latitude": 32.8872, "longitude": 13.1913 } } }, "destination": { "location": { "latLng": { "latitude": 32.86, "longitude": 13.23 } } }, "travelMode": "DRIVE", "regionCode": "ly" }'A request is one routing request, and a matrix counts one unit for each answered pair. What differs from Google:
- The field mask is required, in
X-Goog-FieldMaskorfields, as at Google: without one the answer is 400INVALID_ARGUMENT.*asks for every field. Ask forroutes.legsonly when you need the steps: without them the route is answered from the cache. - Waypoints are
location.latLng, orplaceIdwith a place id from here. AnaddressanswersINVALID_ARGUMENT. Up to 20intermediates, visited in the order sent;optimizeWaypointOrderis refused. - Travel modes.
DRIVE(the default),WALK,BICYCLEandTWO_WHEELER.TRANSITis refused. - No live traffic.
routingPreference,departureTimeandrouteModifiersare accepted and ignored, anddurationequalsstaticDuration. One route is returned, whatevercomputeAlternativeRoutessays. - No route is HTTP 200 with
{}, as at Google, and is not counted. The route goes around the road closures in effect. - The matrix.
computeRouteMatrixanswers a JSON array with one element for each pair:originIndex,destinationIndex,status,condition,distanceMetersandduration. A pair without a route has the conditionROUTE_NOT_FOUNDand is not counted.
Statuses
On the services with /maps/api in their path every refusal is HTTP 200 with a status other than OK, as Google answers, and error_message starts with this platform's error code. On the current services (Places API (New) and Routes API) a refusal is an HTTP error with { error: { code, message, status } }, as Google answers there. A refused request is not counted.
INVALID_REQUEST: a missing or unsupported parameter, a place id that is not from here, or no country.REQUEST_DENIED: no key, a wrong key, a missing scope, or a country or a capability the key or the plan does not include.OVER_QUERY_LIMIT: the plan's requests a minute.OVER_DAILY_LIMIT: a daily cap, a quota, the plan's units, a budget or the balance. The Places endpoints, which have no such status at Google, answerOVER_QUERY_LIMIT.ZERO_RESULTS: no address matches, or there is no road route.NOT_FOUND: the country has no address registry yet, or the address of a place id is no longer public.MAX_WAYPOINTS_EXCEEDED,MAX_DIMENSIONS_EXCEEDEDandMAX_ELEMENTS_EXCEEDED: too many points.UNKNOWN_ERRORwith HTTP 503 and aRetry-Afterheader: the service cannot answer now. Retry after that many seconds.- On the current services: 400
INVALID_ARGUMENT, 403PERMISSION_DENIED(the key, its scope, its country, its restriction or the plan), 404NOT_FOUND, 429RESOURCE_EXHAUSTED(a rate limit, a quota, the plan's units or the balance) and 503UNAVAILABLE.
What has no equivalent
Some Google products are not replaced by a change of URL. Keep them at Google, or change the code:
- Business search (Text Search, Nearby Search, Find Place, photos, reviews, opening hours) is not available. Autocomplete and Place Details find addresses of the registry, with the names, phones and websites it holds.
- A client library with Google's address written into it, as some mobile packages have for the Routes API: change that address in the library, or make the one call yourself. The request and the answer stay as they are.
- Maps SDKs, map tiles and Static Maps images: the map component is replaced in the application.
- Transit, live traffic, avoiding tolls or ferries, and alternative routes are not served.
What a month costs
Type the requests of one month for each service. Google's side uses its published prices. This platform's side is read live from the price list and the plans, and shows the plan on which the month costs least:
Requests a month, reverse included
Requests a month
Elements a month: origins times destinations
At Google
- Geocoding
- USD 0.00
- Directions
- USD 0.00
- Distance Matrix
- USD 0.00
- Total a month
- USD 0.00
Here
Loading prices…
Google's prices as published on Oct 7, 2026.Google Maps Platform pricing
How the two are counted:
- At Google each service has its own free units a month, then a price per 1,000 that falls with volume. A Distance Matrix request counts one element for each pair of origin and destination.
- Here a plan includes a number of units for all services together. A request uses the number of units the price list gives its product, and what goes beyond the plan is charged per 1,000. The figure assumes an even mix of requests through the month.
- The case study button fills in one month of a real delivery application, anonymised: 50 to 100 orders a day, with Google as its only location provider. Its bill was Distance Matrix and nothing else, and it came from how often the application asked more than from the price: quoting only in the cart would have kept it inside Google's free units. The Delivery fee quotes guide shows how.
- A lower figure is not the only reason to move. A fixed plan price, a bill in your own currency, road closures and no card abroad are others. Compare with your own numbers.