Client libraries for Google Maps web services

  • Community-supported client libraries for Java, Python, Go, and Node.js are available for Google Maps Services, offering convenient access to various APIs like Geocoding, Directions, and Places.

  • These open-source libraries, under the Apache 2.0 License, simplify development with features such as automatic rate limiting, retry logic, and easy authentication.

  • Client libraries provide both synchronous and asynchronous request options, returning data as native objects in Java and structured responses in Python.

  • Usage is governed by the Google Maps Platform Terms of Service, and each web service requires an API key or client ID for authentication.

  • These client libraries are not covered by the standard Google deprecation policy or support agreement.

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. They're available for download and contributions on GitHub, where you can also find installation instructions and sample code:

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:

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 for Google Maps Platform Premium Plan 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.

The client libraries are wrappers for the Google Maps web services, which are governed by the Google Maps Platform Terms of Service.

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: