Клиентские библиотеки для веб-служб Google Maps
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Клиент Java, клиент Python, клиент Go и клиент Node.js для служб Google Maps — это клиентские библиотеки, поддерживаемые сообществом, с открытым исходным кодом по лицензии Apache 2.0 . Они доступны для скачивания и участия на GitHub, где вы также найдете инструкции по установке и пример кода:
Зачем использовать клиентские библиотеки?
Клиент Java, клиент Python, клиент Go и клиент Node.js для служб Google Maps позволяют вам работать с веб-службами Google Maps на вашем сервере. Они обертывают функциональность следующих API:
В дополнение к функциональности, предоставляемой этими API, клиентские библиотеки немного упрощают некоторые распространенные задачи.
- Автоматическое ограничение скорости . По умолчанию запросы отправляются с ожидаемым ограничением скорости для каждой веб-службы. Вы можете предоставить собственные ограничения QPM с помощью
new GeoApiContext().setQueryRateLimit(qpm)
. - Повтор в случае сбоя Клиентские библиотеки автоматически повторяют любой запрос, если API отправляет ошибку
5xx
. При повторных попытках используется экспоненциальная задержка, которая помогает в случае периодических сбоев. - Простая аутентификация Клиентские библиотеки упрощают аутентификацию с помощью бесплатно доступного ключа API. Клиенты плана Премиум платформы Google Maps могут использовать свой идентификатор клиента и секретный код .
- POJO Библиотеки Java возвращают собственные объекты для каждого ответа API. Библиотеки Python возвращают структуру в том виде, в котором она получена от API.
- Асинхронный или синхронный. Все запросы поддерживают синхронный или асинхронный стиль вызова.
Условия и положения
Клиентские библиотеки для веб-служб Google Maps лицензируются по лицензии Apache 2.0 .
Клиентские библиотеки представляют собой оболочки веб-служб Google Maps. Веб-службы Google Maps регулируются Условиями использования платформы Google Maps .
Важно ! На эти библиотеки не распространяется стандартная политика прекращения поддержки Google или соглашение о поддержке.
Ключи API и идентификаторы клиентов
Для каждой веб-службы Google Maps требуется ключ API или идентификатор клиента. Руководство о том, когда использовать ключ API, когда использовать идентификатор клиента и как получить ключ API или идентификатор клиента, см. в руководстве по аутентификации для используемого вами API:
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-08-29 UTC.
[null,null,["Последнее обновление: 2025-08-29 UTC."],[[["\u003cp\u003eCommunity-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.\u003c/p\u003e\n"],["\u003cp\u003eThese open-source libraries, under the Apache 2.0 License, simplify development with features such as automatic rate limiting, retry logic, and easy authentication.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries provide both synchronous and asynchronous request options, returning data as native objects in Java and structured responses in Python.\u003c/p\u003e\n"],["\u003cp\u003eUsage is governed by the Google Maps Platform Terms of Service, and each web service requires an API key or client ID for authentication.\u003c/p\u003e\n"],["\u003cp\u003eThese client libraries are not covered by the standard Google deprecation policy or support agreement.\u003c/p\u003e\n"]]],["Community-supported Java, Python, Go, and Node.js client libraries for Google Maps Services are available on GitHub under the Apache 2.0 License. These clients wrap APIs like Address Validation, Directions, and Places, offering features such as automatic rate limiting, retry on failure, and easy authentication via API keys or client IDs. They facilitate server-side interaction with Google Maps web services. The libraries support both synchronous and asynchronous requests.\n"],null,["# Client Libraries for Google Maps Web Services\n\nThe Java Client, Python Client, Go Client and\nNode.js Client for Google Maps Services are community supported client libraries, open sourced under the\n[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0). They are\navailable for download and contributions on GitHub, where you will also find installation\ninstructions and sample code: \n\n- [Java Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-java)\n- [Python Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-python)\n- [Go Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-go)\n- [Node.js Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-js)\n\nWhy use the client libraries?\n-----------------------------\n\nThe Java Client, Python Client, Go Client\nand Node.js Client for Google Maps Services enable you to work with Google Maps web services on your server.\nThey wrap the functionality of the following APIs:\n\n- [Address Validation API](/maps/documentation/address-validation/overview)\n- [Directions API (Legacy)](/maps/documentation/directions/start)\n- [Distance Matrix API (Legacy)](/maps/documentation/distancematrix/start)\n- [Elevation API](/maps/documentation/elevation/start)\n- [Geocoding API](/maps/documentation/geocoding/start)\n- [Places API](/maps/documentation/places/web-service/overview)\n- [Roads API](/maps/documentation/roads/overview)\n- [Time Zone API](/maps/documentation/timezone/start)\n\nIn addition to the functionality provided by these APIs, the client libraries\nmake some common tasks a little easier.\n\n- **Automatic Rate Limiting** By default, requests are sent at the expected rate limit for each web service. You can provide custom QPM limits with `new GeoApiContext().setQueryRateLimit(qpm)`.\n- **Retry on Failure** The client libraries will automatically retry any request if the API sends a `5xx` error. Retries use exponential back-off, which helps in the event of intermittent failures.\n- **Easy Authentication** The client libraries make it easy to authenticate with your freely available API Key. [Google Maps Platform Premium Plan](/maps/premium) customers can use their [client ID and secret](/maps/premium/overview#client-id).\n- **POJOs** The Java libraries return native objects for each of the API responses. The Python libraries return the structure as it is received from the API.\n- **Asynchronous or synchronous** All requests support synchronous or asynchronous calling style.\n\nTerms and conditions\n--------------------\n\nThe client libraries for the Google Maps web services are licensed under the\n[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).\n\nThe client libraries are wrappers for the Google Maps web services. The Google Maps\nweb services are governed by the [Google Maps Platform Terms of Service](https://cloud.google.com/maps-platform/terms).\n\n**Important** : These libraries are **not covered**\nby the standard Google deprecation policy or support agreement.\n\nAPI keys and client IDs\n-----------------------\n\nEach Google Maps web service requires an API key or client ID. For a guide on\nwhen to use an API key, when to use a client ID, and how to get hold of your\nAPI key or client ID, see the authentication guide for the API you're using:\n\n- [Address Validation API](/maps/documentation/address-validation/get-api-key)\n- [Directions API (Legacy)](/maps/documentation/directions/get-api-key)\n- [Distance Matrix API (Legacy)](/maps/documentation/distancematrix/get-api-key)\n- [Elevation API](/maps/documentation/elevation/get-api-key)\n- [Geocoding API](/maps/documentation/geocoding/get-api-key)\n- [Places API](/maps/documentation/places/web-service/get-api-key)\n- [Roads API](/maps/documentation/roads/get-api-key)\n- [Time Zone API](/maps/documentation/timezone/get-api-key)"]]