Stay organized with collections
Save and categorize content based on your preferences.
Enable the API
This page explains how to enable the Recommender API. Enabling the API
is required in order to view and manage recommendations and insights using the
gcloud and
REST
interfaces.
To enable the Recommender API:
gcloud
If you don't already have a Google Cloud project, create one
now.
Set the default project, where PROJECT_ID is the ID of your
project:
gcloud config set project PROJECT_ID
Enable the required APIs:
gcloud services enable recommender.googleapis.com
console
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# Enable the API\n==============\n\nThis page explains how to enable the Recommender API. Enabling the API\nis required in order to view and manage recommendations and insights using the\n[`gcloud`](/sdk/gcloud/reference/recommender) and\n[REST](/recommender/docs/reference/rest/v1/projects.locations.recommenders.recommendations)\ninterfaces.\n\nTo enable the Recommender API: \n\n### gcloud\n\n1. If you don't already have a Google Cloud project, [create one](/resource-manager/docs/creating-managing-projects#creating_a_project)\n now.\n\n2. Set the default project, where \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e is the ID of your\n project:\n\n ```\n gcloud config set project PROJECT_ID\n ```\n3. Enable the required APIs:\n\n ```\n gcloud services enable recommender.googleapis.com\n ```\n\n### console\n\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n\n\n Enable the Recommender API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=recommender.googleapis.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n\n\n Enable the Recommender API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=recommender.googleapis.com)\n\n\u003cbr /\u003e"]]