このプロダクトまたは機能はレガシー ステータスです。レガシー ステータスとレガシーから新しいサービスへの移行方法について詳しくは、
レガシー プロダクトと機能をご覧ください。
Google マップ ウェブサービスのクライアント ライブラリ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Google マップ サービス向けの Java クライアント、Python クライアント、Go クライアント、Node.js クライアントは、コミュニティがサポートするクライアント ライブラリであり、Apache 2.0 ライセンスの下でオープンソース化されています。これらのライブラリは GitHub からダウンロードや更新ができます。インストール手順とサンプルコードも GitHub で確認可能です。
クライアント ライブラリを使用するメリット
Google マップサービス向け Java クライアント、Python クライアント、Go クライアント、Node.js クライアントを使用すると、サーバー上で Google マップ ウェブサービスを使用できます。これらのライブラリには、次の API の機能がラップされています。
これらの API から機能が提供される以外に、クライアント ライブラリによって一部の一般的なタスクが簡単になります。
- 自動レート制限: デフォルトでは、リクエストは各ウェブサービスの想定されるレート制限で送信されます。
new GeoApiContext().setQueryRateLimit(qps)
を使用してカスタム QPS 制限を指定できます。
- 失敗時の再試行: API から
5xx
エラーが返された場合、クライアント ライブラリは自動的にリクエストを再試行します。再試行では、間欠的失敗時に役立つ指数バックオフが使用されます。
- 簡単な認証: クライアント ライブラリを使用すると、無料で提供される API キーを使用して簡単に認証できます。Google Maps Platform プレミアム プランのユーザーは、クライアント ID とシークレットを使用できます。
- POJO: Java ライブラリは、API レスポンスごとにネイティブ オブジェクトを返します。Python ライブラリは、API から受信した構造体を返します。
- 非同期または同期: すべてのリクエストで同期または非同期の呼び出しスタイルがサポートされています。
利用規約
Google マップ ウェブサービス向けクライアント ライブラリは、Apache 2.0 ライセンスの下に使用が許諾されています。
クライアント ライブラリは、Google マップ ウェブサービスのラッパーです。Google マップ ウェブサービスには、Google Maps Platform の利用規約が適用されます。
重要: これらのライブラリには、Google 標準の非推奨ポリシーやサポート契約は適用されません。
API キーとクライアント ID
各 Google マップ ウェブサービスには、API キーまたはクライアント ID が必要です。API キーとクライアント ID の取得方法や使い分けについては、使用している API の認証ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2023-09-20 UTC。
[null,null,["最終更新日 2023-09-20 UTC。"],[[["\u003cp\u003eCommunity-supported client libraries for Google Maps Services are available in Java, Python, Go, and Node.js, offering convenient access to various Google Maps APIs like Directions, Geocoding, 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 mechanisms, and easy authentication.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries provide synchronous and asynchronous calling styles while adhering to the Google Maps Platform Terms of Service.\u003c/p\u003e\n"],["\u003cp\u003eThey are not covered by Google's standard deprecation policy or support agreement and require an API key or client ID for usage, obtainable through API-specific authentication guides.\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)"]]