Skip to content
Developers

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 the X-Goog-Api-Key header of the current services. The x-api-key header 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 (regionCode or includedRegionCodes on the current services). A request without a country answers INVALID_REQUEST.
  • An app's identity. A key restricted to an Android or an iOS app is checked against X-Android-Package with X-Android-Cert, or X-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.

Google calls and the endpoints that answer them here
ServiceAt GoogleCompatible endpointThe platform's ownScope
Distance MatrixGET /maps/api/distancematrix/jsonGET /v1/compat/google/maps/api/distancematrix/json?origins=…&destinations=…POST /v1/routing/matrixrouting:matrix
DirectionsGET /maps/api/directions/jsonGET /v1/compat/google/maps/api/directions/json?origin=…&destination=…POST /v1/routing/directionsrouting:route
GeocodingGET /maps/api/geocode/json?address=GET /v1/compat/google/maps/api/geocode/json?address=…GET /v1/addresses/searchaddresses:search
Reverse geocodingGET /maps/api/geocode/json?latlng=GET /v1/compat/google/maps/api/geocode/json?latlng=…GET /v1/addresses/resolveaddresses:resolve
Place AutocompleteGET /maps/api/place/autocomplete/jsonGET /v1/compat/google/maps/api/place/autocomplete/json?input=…&sessiontoken=…GET /v1/addresses/{countryCode}/autocompleteaddresses:search
Place DetailsGET /maps/api/place/details/jsonGET /v1/compat/google/maps/api/place/details/json?place_id=…&sessiontoken=…GET /v1/addresses/{addressId}addresses:read
Autocomplete (New)POST /v1/places:autocompletePOST /v1/compat/google/v1/places:autocompleteGET /v1/addresses/{countryCode}/autocompleteaddresses:search
Place Details (New)GET /v1/places/{placeId}GET /v1/compat/google/v1/places/{placeId}?fields=…GET /v1/addresses/{addressId}addresses:read
Routes: a routePOST /directions/v2:computeRoutesPOST /v1/compat/google/directions/v2:computeRoutesPOST /v1/routing/routerouting:route
Routes: a matrixPOST /distanceMatrix/v2:computeRouteMatrixPOST /v1/compat/google/distanceMatrix/v2:computeRouteMatrixPOST /v1/routing/matrixrouting: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:

GET/v1/compat/google/maps/api/distancematrix/jsonScoperouting:matrix
curl "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&region=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:

GET/v1/compat/google/maps/api/directions/jsonScoperouting:route
curl "https://makani-gke-eu.lamah.com/v1/compat/google/maps/api/directions/json?origin=32.8872,13.1913&destination=32.86,13.23&region=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, destination and waypoints are lat,lng, or place_id: followed by a place id this platform issued. Addresses and the via: and enc: forms answer INVALID_REQUEST. start_address and end_address repeat what you sent, and geocoded_waypoints carries no place id.
  • Waypoints. Up to 20, visited in the order sent; more answers MAX_WAYPOINTS_EXCEEDED. optimize:true answers INVALID_REQUEST: POST /v1/routing/optimize orders stops.
  • One route. alternatives is accepted and ignored: routes holds one route or none.
  • Travel modes. driving (the default), walking and bicycling. transit, arrival_time, transit_mode and transit_routing_preference answer INVALID_REQUEST.
  • No live traffic. departure_time, traffic_model and avoid are accepted and ignored. duration is the usual travel time, and duration_in_traffic is never returned.
  • Instructions. html_instructions is plain text in the request's language, without <b> markup. maneuver is 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_RESULTS and error_message says 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:

GET/v1/compat/google/maps/api/geocode/jsonScopeaddresses:search
curl "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:LY and region=ly both name it. Any other components filter answers INVALID_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.location is the point you sent and location_type is APPROXIMATE.
  • 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 a place_id: point of Directions and Distance Matrix. The id of an area, in a result marked APPROXIMATE, is not read back.
  • Ignored. bounds, result_type, location_type and extra_computations. plus_code and partial_match are 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:

GET/v1/compat/google/maps/api/place/autocomplete/jsonScopeaddresses:search
curl "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:

GET/v1/compat/google/maps/api/place/details/jsonScopeaddresses:read
curl "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_text and has its address in secondary_text. types is accepted and ignored.
  • One typed search, one charge. Send the same sessiontoken with 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 input of one character answers ZERO_RESULTS and 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 answers NOT_FOUND.
  • Fields. fields is honoured, and a field the registry does not hold is left out: opening hours, photos, ratings, reviews and plus_code are never returned. url is 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. location with radius, locationbias, locationrestriction and strictbounds are read; a circle restricts to the box around it. locationbias=ipbias is ignored.
  • Places API (New). POST /v1/places:autocomplete answers suggestions[].placePrediction and GET /v1/places/{placeId} a Place, cut to the field mask, which a place requires as at Google. sessionToken is counted the same way, and googleMapsUri is 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:

POST/v1/compat/google/directions/v2:computeRoutesScoperouting:route
curl -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-FieldMask or fields, as at Google: without one the answer is 400 INVALID_ARGUMENT. * asks for every field. Ask for routes.legs only when you need the steps: without them the route is answered from the cache.
  • Waypoints are location.latLng, or placeId with a place id from here. An address answers INVALID_ARGUMENT. Up to 20 intermediates, visited in the order sent; optimizeWaypointOrder is refused.
  • Travel modes. DRIVE (the default), WALK, BICYCLE and TWO_WHEELER. TRANSIT is refused.
  • No live traffic. routingPreference, departureTime and routeModifiers are accepted and ignored, and duration equals staticDuration. One route is returned, whatever computeAlternativeRoutes says.
  • No route is HTTP 200 with {}, as at Google, and is not counted. The route goes around the road closures in effect.
  • The matrix. computeRouteMatrix answers a JSON array with one element for each pair: originIndex, destinationIndex, status, condition, distanceMeters and duration. A pair without a route has the condition ROUTE_NOT_FOUND and 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, answer OVER_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_EXCEEDED and MAX_ELEMENTS_EXCEEDED: too many points.
  • UNKNOWN_ERROR with HTTP 503 and a Retry-After header: the service cannot answer now. Retry after that many seconds.
  • On the current services: 400 INVALID_ARGUMENT, 403 PERMISSION_DENIED (the key, its scope, its country, its restriction or the plan), 404 NOT_FOUND, 429 RESOURCE_EXHAUSTED (a rate limit, a quota, the plan's units or the balance) and 503 UNAVAILABLE.

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.