このプロダクトまたは機能はレガシー ステータスです。レガシー ステータスとレガシーから新しいサービスへの移行方法について詳しくは、
レガシー プロダクトと機能をご覧ください。
Google Cloud プロジェクトをセットアップする
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このガイドでは、Google Maps Platform API を使用する前に Google Cloud プロジェクトをセットアップする方法を説明します。ここで説明する手順のいくつかは、クイックスタートまたは Google Maps Platform スタートガイドのページですでに済ませているかもしれませんが、このドキュメントではプロジェクトの管理に役立つその他の手順も紹介しています。
プロジェクトを作成する
Google Maps Platform を使用するには、サービス、認証情報、課金、API、SDK を管理するためのプロジェクトが必要です。
プロジェクトごとに課金のセットアップも必要となりますが、ご請求が発生するのは、そのプロジェクトが無料サービスの割り当て分を超過した場合のみです。
課金を有効にした Cloud プロジェクトを作成するには:
Console
-
Cloud コンソールで新しい Google Cloud プロジェクトを作成します。
新しいプロジェクトを作成
-
[新しいプロジェクト] ページで、必要な情報を入力します。
-
[プロジェクト名]: デフォルト名をそのまま使用するか、別の名前を入力します。
プロジェクト名はいつでも変更できます。詳しくは、プロジェクトの識別をご覧ください。
-
プロジェクト ID: デフォルト値をそのまま使用するか、[編集] をクリックして、Google API でプロジェクトの固有識別子として使用されるカスタム ID を入力します。
プロジェクトの作成後にプロジェクト ID を変更することはできないため、そのプロジェクトに適したわかりやすい ID を選択してください。プロジェクト ID には機密情報を含めないでください。
-
請求先アカウント: プロジェクトの請求先アカウントを選択します。請求先アカウントを設定していない場合や請求先アカウントが 1 つしかない場合、このオプションは表示されません。
プロジェクトを請求先アカウントに関連付けるには、請求先アカウント管理者またはプロジェクトの支払い管理者である必要があります。詳しくは、請求のアクセス制御に関するドキュメントをご覧ください。
-
[場所]: プロジェクトをリンクする組織がある場合は、[参照] をクリックして、目的の組織を選択します。それ以外の場合は [組織なし] を選択します。
詳しくは、フォルダの作成と管理および組織、プロジェクト、請求先アカウント間の関係をご覧ください。
[作成] を選択します。
課金を有効にする
アプリをデプロイするには、課金を有効にする必要があります。1 か月あたりの割り当て範囲を超えなければ、アカウントには課金されません。1 か月あたりの割り当て分を上回るリソースがアプリケーションに必要な場合は、追加の使用分が課金されます。
Cloud プロジェクトの作成時に請求先アカウントが存在する場合は、そのプロジェクトで課金が自動的に有効になります。
Cloud プロジェクトで課金を有効にするには:
- Cloud コンソールで、[お支払い] ページに移動します。
[お支払い] ページに移動
- Cloud プロジェクトを選択または作成します。
- 請求先アカウントがあるかどうか、選択した Cloud プロジェクトがアカウントに関連付けられているかどうかに応じて、[お支払い] ページに次のいずれかが表示されます。
- 選択した Cloud プロジェクトで課金がすでに有効になっている場合は、プロジェクトの請求先アカウントの詳細が一覧表示されます。
- 請求先アカウントが存在しない場合は、請求先アカウントを作成し、選択した Cloud プロジェクトに関連付けるように求めるプロンプトが表示されます。
- 請求先アカウントが存在しても、選択した Cloud プロジェクトと関連付けられていない場合は、課金を有効にするように求めるプロンプトが表示されます。新しい請求先アカウントを作成して関連付けるには、[キャンセル]、[アカウントを作成] の順に選択します。
課金を有効にしたときには、課金額の上限は設定されていません。費用をより細かく管理するには、予算を作成し、アラートを設定してください。詳しくは、請求とお支払いをご覧ください。
API を有効にする
Google Maps Platform を使用するには、プロジェクトで使用する API または SDK を有効にする必要があります。
有効な API を表示する
Console
有効にした API や SDK を表示するには、Cloud コンソールの Google Maps Platform ページに移動します。
Google Maps Platform ページに移動
- [その他の API]: これらの API / SDK は有効化されていません。
- 各 Map API とサービスのカードが表示された場合は、API や SDK が有効になっていません。
プロジェクトをシャットダウンする
課金を無効にし、Cloud プロジェクトで使用されているすべての Cloud リソースを解放するには、プロジェクトをシャットダウンします。
次のステップ
Google Cloud プロジェクトをセットアップした後は、Directions API を使用するために API キーを作成および保護する必要があります。
API キーを使用する
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-31 UTC。
[null,null,["最終更新日 2025-08-31 UTC。"],[[["\u003cp\u003eThis guide provides instructions on setting up a Google Cloud project to use with Google Maps Platform APIs, including billing and API enablement.\u003c/p\u003e\n"],["\u003cp\u003eBefore using Google Maps Platform APIs, you must create a Cloud project, enable billing, and enable the specific APIs you need.\u003c/p\u003e\n"],["\u003cp\u003eAlthough billing setup is required, you are only charged if your project usage surpasses the free tier quota.\u003c/p\u003e\n"],["\u003cp\u003eProjects can be shut down to disable billing and release Cloud resources when they are no longer needed.\u003c/p\u003e\n"],["\u003cp\u003eAfter project setup, you'll need to create and secure an API key for using the Google Maps Platform APIs.\u003c/p\u003e\n"]]],["To use Google Maps Platform, you must first create a Google Cloud project, defining its name, ID, billing account, and organization. Billing must be enabled, though you're only charged if your usage exceeds the monthly quota. You also need to enable specific APIs or SDKs through the console or Cloud SDK. You can view enabled APIs, or shut down projects to disable billing and release resources, by using the console or command line. Then, you need to create and secure an API key.\n"],null,["# Set up your Google Cloud project\n\nThis guide shows how to set up your Google Cloud project before using\nthe Google Maps Platform APIs. While you may have completed some of these\nsteps in the\n[Quickstart](/maps/documentation/directions/quickstart)\nor\n[Getting started with Google Maps Platform](/maps/get-started) page,\nthis document provides additional, useful instructions for managing your projects.\n\nCreate a project\n----------------\n\nTo use Google Maps Platform, you must have a project to manage services,\ncredentials, billing, APIs, and SDKs.\n\n[Billing setup](#billing) is required for each project, but you will only be charged if a\nproject exceeds its [quota](/maps/billing-and-pricing/billing#monthly-credit) of no-charge services.\n\nTo create a Cloud project with billing enabled: \n\n### Console\n\n1. Create a new Google Cloud project in the Cloud console:\n\n [Create new project](https://console.cloud.google.com/projectcreate?utm_source=Docs_NewProject&utm_content=Docs_directions-backend)\n2. On the **New Project** page, fill in the required information:\n\n - **Project name:** Accept the default or enter a customized name.\n\n You can change the project name at any time. For more information, see\n [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects).\n - **Project ID:** Accept the default or click **EDIT** to enter a\n customized ID that Google APIs use as a unique identifier for your project.\n\n After you create the project, you *cannot* change the project ID, so\n choose an ID that you'll be comfortable using for the lifetime of the\n project. Don't include any sensitive information in your project ID.\n - **Billing account:** Select a billing account for the project. If you\n haven't set up a billing account or only have one billing account, you\n won't see this option.\n\n You must be a Billing Account Administrator or Project Billing Manager\n to associate a project with a billing account. For more information, see\n [the billing access control documentation](https://cloud.google.com/billing/docs/how-to/billing-access#overview_of_billing_roles_in).\n - **Location:** If you have an organization you want to link your project\n to, click **Browse** and select it; otherwise, choose \"No organization\".\n\n For more information, see [Creating and Managing Folders](https://cloud.google.com/resource-manager/docs/creating-managing-folders)\n and [Relationships between organizations, projects, and billing accounts](https://cloud.google.com/billing/docs/how-to/billing-access#relationships-between-resources).\n3. Select **Create**.\n\n### gcloud\n\n```bash\ngcloud projects create \"\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e\"\n```\n\nRead more about the\n[Google Cloud SDK](https://cloud.google.com/sdk)\n,\n[Cloud SDK installation](https://cloud.google.com/sdk/docs/install)\n, and the following commands:\n\n- [`gcloud projects create`](https://cloud.google.com/sdk/gcloud/reference/projects/create)\n\nEnable billing\n--------------\n\nTo deploy your apps, you must enable billing. Your account won't be charged\nif you stay within your [monthly quota](/maps/billing-and-pricing/billing#monthly-credit).\nIf your application needs resources that exceed the monthly quota, you will be\ncharged for the additional usage.\n\nIf you have a billing account when you create a Cloud\nproject, then billing is automatically enabled on that project.\n\nTo enable billing on a Cloud project:\n\n1. In the Cloud console, go to the Billing page: \n [Go to the Billing page](https://console.cloud.google.com/projectselector/billing?utm_source=Docs_Billing&utm_content=Docs_directions-backend)\n2. Select or create a Cloud project.\n3. Depending on if a billing account exists or if the selected Cloud project is associated with an account, the Billing page displays one of the following:\n - If billing is already enabled for the selected Cloud project, then the details about the billing account are listed.\n - If no billing account exists, you are prompted to create a billing account and associate it with the selected Cloud project.\n - If a billing account exists, you are prompted to enable billing if the selected Cloud project is not already associated with a billing account. You can also select **Cancel** and then select **Create account** to create and associate a new billing account.\n\nAfter you enable billing, there is no limit to the amount that you might\nbe charged. To gain more control over your costs, you can\n[create\na budget and set alerts](/maps/billing-and-pricing/billing#creating-budgets-and-set-alerts). For more information, see [Billing](/maps/billing-and-pricing/billing).\n\nEnable APIs\n-----------\n\nTo use Google Maps Platform, you must enable the APIs or SDKs you plan to use with your project.\n\n### Console\n\n\n[Enable the Directions API](https://console.cloud.google.com/apis/library/directions-backend.googleapis.com?utm_source=Docs_EnableAPIs&utm_content=Docs_directions-backend)\n\n### Cloud SDK\n\n```bash\ngcloud services enable \\\n --project \"\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e\" \\\n \"directions-backend.googleapis.com\"\n```\n\nRead more about the\n[Google Cloud SDK](https://cloud.google.com/sdk)\n,\n[Cloud SDK installation](https://cloud.google.com/sdk/docs/install)\n, and the following commands:\n\n- [`gcloud services enable`](https://cloud.google.com/sdk/gcloud/reference/services/enable)\n- [`gcloud services disable`](https://cloud.google.com/sdk/gcloud/reference/services/disable)\n\nView enabled APIs\n-----------------\n\n### Console\n\nTo view the APIs or SDKs you have enabled, go to the Google Maps Platform page\nin the Cloud console:\n[Go to Google Maps Platform page](https://console.cloud.google.com/project/_/google/maps-apis/api-list?utm_source=Docs_ProjectViewAPI&utm_content=Docs_directions-backend)\n\n- Additional APIs: These API or SDKs are not enabled.\n- If you see cards for each Map APIs and services, no APIs or SDKs have been enabled.\n\n### gcloud\n\n```bash\ngcloud services list --project \"\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e\"\n```\n\nRead more about the\n[Google Cloud SDK](https://cloud.google.com/sdk)\n,\n[Cloud SDK installation](https://cloud.google.com/sdk/docs/install)\n, and the following commands:\n\n- [`gcloud services list`](https://cloud.google.com/sdk/gcloud/reference/services/list)\n\nShut down a project\n-------------------\n\nYou can disable billing and release all the Cloud resources that\nare being used in your Cloud project by shutting down\nthat project: \n\n### Console\n\n1. Go to the Projects page:\n\n [Go to the Projects page](https://console.cloud.google.com/iam-admin/projects?utm_source=Docs_ProjectShutdown&utm_content=Docs_directions-backend)\n2. Select the Cloud project that you want to shut down,\n then click **Delete**.\n\nFor more information about managing your Cloud\nprojects, see [Cloud Resource Manager: creating, shutting down, and restoring projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects).\n\n### gcloud\n\n```bash\ngcloud projects delete \"\u003cvar translate=\"no\"\u003ePROJECT\u003c/var\u003e\"\n```\n\nRead more about the\n[Google Cloud SDK](https://cloud.google.com/sdk)\n,\n[Cloud SDK installation](https://cloud.google.com/sdk/docs/install)\n, and the following commands:\n\n- [`gcloud projects delete`](https://cloud.google.com/sdk/gcloud/reference/projects/delete)\n\nWhat's next\n-----------\n\nAfter setting up your Google Cloud project, you must create and secure\nyour API Key to use the Directions API:\n\n[Use API Keys](/maps/documentation/directions/get-api-key)"]]