List services

This document describes how to list the APIs and services that are enabled or available in a Google Cloud project, folder, or organization. The list of available or enabled APIs and services can contain both public Google Cloud services, such as Pub/Sub, as well as any APIs and services shared privately with you, such as services created using Cloud Endpoints. For more information on the differences between public and private APIs and services, see Public and private services.

To program against the Service Usage API, you can also use one of the Service Usage client libraries.

Before you begin

To list the enabled and available APIs and services, you need:

List enabled services in an organization or folder

To list the enabled services in an organization or folder, complete the following steps:

gcloud

To list the enabled APIs and services for an organization or folder, use the gcloud beta services list command:

gcloud beta services list RESOURCE_TYPE=RESOURCE_ID

Replace the following:

  • RESOURCE_TYPE: use --organization or --folder to list the enabled services for an organization or folder, respectively.

  • RESOURCE_ID: enter the ID of the organization or folder that you want to list enabled services for.

REST API

To list enabled services for an organization or folder, call the consumerPolicies.get method:

curl -H "Authorization: Bearer $(gcloud auth print-access-token)" "https://serviceusage.googleapis.com/v2beta/RESOURCE_TYPE/RESOURCE_ID/consumerPolicies/default?filter=state:ENABLED"

Replace the following:

  • RESOURCE_TYPE: use organizations or folders to list the enabled services for an organization or folder, respectively.

  • RESOURCE_ID: enter the ID of the organization or folder that you want to list enabled services for.

If successful, the response body contains a ConsumerPolicy, which contains a list of enabled APIs:

{
  "name": "organizations/organization-name/consumerPolicies/default",
  ...
  "enableRules": [
    {
    "services": [
      "services/apphub.googleapis.com",
      "services/appoptimize.googleapis.com",
      "services/artifactregistry.googleapis.com",
      ...
      ]
    }
  ]
}

List enabled services in a project

To list the enabled services in a project, complete the following steps:

Console

To list the enabled APIs and services in a project:

  1. In the Google Cloud console, go to the APIs & Services page.

    Go to APIs & Services

  2. Select the Google Cloud project by doing one of the following:

    • Select a recent project from the available list.

    • Click Select project, find your project, and click the name of the project.

    The APIs & Services page opens, listing the APIs enabled in your Google Cloud project.

gcloud

To list the enabled APIs and services in your current project, use the gcloud services list command:

gcloud services list

The output is similar to the following:

NAME: analyticshub.googleapis.com
TITLE: Analytics Hub API

NAME: appoptimize.googleapis.com
TITLE: App Optimize API

NAME: artifactregistry.googleapis.com
TITLE: Artifact Registry API

NAME: bigquery.googleapis.com
TITLE: BigQuery API
...

REST API

To list enabled services for your project, call the services.list method with the state:ENABLED filter:

curl -H "Authorization: Bearer $(gcloud auth print-access-token)" "https://serviceusage.googleapis.com/v1/projects/PROJECT_ID/services?filter=state:ENABLED"

Replace PROJECT_ID with your Google Cloud project ID or number.

List available services in a project

To list the available services in a project, complete the following steps. The set of available services rarely changes and can be cached for extended periods of time.

Console

To list the APIs and services available to you in a project:

  1. In the Google Cloud console, go to the API Library page.

    Go to API Library

  2. Select the Google Cloud project by doing one of the following:

    • Select a recent project from the available list.

    • Click Select project, find your project, and click the name of the project.

    The API Library page opens. You can search for or browse through available APIs.

gcloud

To list the APIs and services available to you in your current project, use the gcloud services list command with the --available flag:

gcloud services list --available

The results include any services that have already been enabled, as well as services that are available to be enabled for the current project. The output is similar to the following:

NAME: places-backend.googleapis.com
TITLE: Google Places API Web Service

NAME: clouderrorreporting.googleapis.com
TITLE: Stackdriver Error Reporting API

NAME: analyticsreporting.googleapis.com
TITLE: Google Analytics Reporting API

NAME: youtube.googleapis.com
TITLE: YouTube Data API v3
...

REST API

To list available services for your project, call the services.list method:

curl -H "Authorization: Bearer $(gcloud auth print-access-token)" "https://serviceusage.googleapis.com/v1/projects/PROJECT_ID/services"

Replace PROJECT_ID with your Google Cloud project ID or number.

The result includes all public services, all services for which the calling user has the servicemanagement.services.bind permission, and all services that have already been enabled on the project.

You can filter the results to exclude the services that are enabled on the project by including the query parameter ?filter=state:DISABLED as part of the request.

What's next