> [!NOTE]
> This product is in [Legacy status](https://developers.google.com/maps/legacy.md.txt). As of October 2026, Distance Matrix API (Legacy) can no longer be enabled for new Google Cloud projects. Existing projects remain fully supported. For new features and improved performance, [migrate to the Routes
> API](https://developers.google.com/maps/documentation/routes/migrate-routes).

The Java Client, Python Client,
Go Client, and Node.js Client for Google Maps Services are
community-supported client libraries, released as open source under the
[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
They're available for download and contributions on GitHub, where you can also
find installation instructions and sample code:
[Video](https://www.youtube.com/watch?v=2s7UAscFUDw)

- [Java Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-java)
- [Python Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-python)
- [Go Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-go)
- [Node.js Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-js)

## Why use the client libraries?

The Java Client, Python Client,
Go Client, and Node.js Client for Google Maps Services let you work with
Google Maps web services on your server. They wrap the functionality of the
following APIs:

- [Address Validation API](https://developers.google.com/maps/documentation/address-validation/overview.md.txt)
- [Directions API (Legacy)](https://developers.google.com/maps/documentation/directions/start.md.txt)
- [Distance Matrix API (Legacy)](https://developers.google.com/maps/documentation/distance-matrix/start.md.txt)
- [Elevation API](https://developers.google.com/maps/documentation/elevation/start.md.txt)
- [Geocoding API](https://developers.google.com/maps/documentation/geocoding/guides-v3/start.md.txt)
- [Places API](https://developers.google.com/maps/documentation/places/web-service/overview.md.txt)
- [Roads API](https://developers.google.com/maps/documentation/roads/overview.md.txt)
- [Time Zone API](https://developers.google.com/maps/documentation/timezone/get-started.md.txt)

In addition to the functionality provided by these APIs, the client libraries
simplify common tasks:

- **Automatic rate limiting** : sends requests at the expected rate limit for each web service by default. You can provide custom queries-per-minute (QPM) limits with `new GeoApiContext().setQueryRateLimit(qpm)`.
- **Retry on failure**: automatically retries any request when the API sends a 500-level error, using exponential backoff to help handle intermittent failures.
- **Straightforward authentication** : lets you authenticate with an API key, or with a [client ID and secret](https://developers.google.com/maps/premium/overview.md.txt#client-id) for [Google Maps Platform Premium Plan](https://developers.google.com/maps/premium/overview.md.txt) customers.
- **Plain old Java objects (POJOs)**: returns typed Java objects for each API response in the Java library, whereas the Python library returns the response structure directly from the API.
- **Asynchronous or synchronous calls**: supports both synchronous and asynchronous calling styles for all requests.

## Terms and conditions

The client libraries for the Google Maps web services are licensed under the
[Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).

The client libraries are wrappers for the Google Maps web services, which are
governed by the
[Google Maps Platform Terms of Service](https://cloud.google.com/maps-platform/terms).

> [!IMPORTANT]
> **Important:** These libraries **aren't covered** by the standard Google deprecation policy or support agreement.

## API keys and client IDs

Each Google Maps web service requires an API key or client ID. For more
information about when to use an API key, when to use a client ID, and how to
get your API key or client ID, see the authentication guide for the API that
you're using:

- [Address Validation API](https://developers.google.com/maps/documentation/address-validation/get-api-key.md.txt)
- [Directions API (Legacy)](https://developers.google.com/maps/documentation/directions/get-api-key.md.txt)
- [Distance Matrix API (Legacy)](https://developers.google.com/maps/documentation/distance-matrix/get-api-key.md.txt)
- [Elevation API](https://developers.google.com/maps/documentation/elevation/get-api-key.md.txt)
- [Geocoding API](https://developers.google.com/maps/documentation/geocoding/guides-v3/get-api-key.md.txt)
- [Places API](https://developers.google.com/maps/documentation/places/web-service/get-api-key.md.txt)
- [Roads API](https://developers.google.com/maps/documentation/roads/get-api-key.md.txt)
- [Time Zone API](https://developers.google.com/maps/documentation/timezone/get-api-key.md.txt)