Configure access to the Google Cloud Search REST API

You must configure access to the Google Cloud Search REST API before you can use this API either directly or through an SDK. This document covers the steps required to use the Google Cloud Search REST API.

Create an API project

To enable the API, you must first create an Google Cloud Platform project. This project forms the basis for creating, enabling, and using all Google Cloud Platform (GCP) services, including managing APIs, enabling billing, adding and removing collaborators, and managing permissions.

  1. From the Cloud Platform Console, click the arrow_drop_down icon to the right of the Google Cloud Console banner. Adialog listing current projects appears.
  2. Click NEW PROJECT. The New Project screen appears.
  3. Enter a project name in the Project Name field.
  4. (optional) Click Edit to edit the Project ID. The project ID can't be changed after the project is created, so choose an ID that meets your needs for the lifetime of the project.
  5. Click Create. The console navigates to the Dashboard page. The project is created within a few minutes.

For further information on creating and managing projects, refer to Creating and Managing Projects.

Enable the API

You need to enable the Cloud Search REST API and create a service account to obtain credentials.

  1. To ensure you are on the newly created project, click the arrow_drop_down icon to the right of the Google Cloud Console banner and select your newly-created project.
  2. Navigate to the Google Cloud Search API.
  3. Click Enable. The Overview page appears.

For further information on enabling and disabling APIs, refer to Manage APIs in the Google Cloud Console

Create service account credentials

  1. In the Cloud Platform Console, click Credentials in the left navigation. The Credential page appears.
  2. Click the Credentials in APIs & Services link. An APIs Credentials page appears.
  3. From the Create credentials drop-down list, select Service account key from the Create credentials drop-down list. The Create service account key page appears.
  4. From the Service account drop-down list, select New service account .
  5. Enter a name in the Service account name field.
  6. (optional) Edit the service account ID.
  7. Click JSON.
  8. Click Create. A Service account has new role dialog appears.
  9. Click Create Without Role. A Private key saved to your computer dialog appears and a copy of the private key downloads to your computer.
  10. Click Close.

For further information on service accounts, refer to Service accounts, web applications, and installed applications

View credentials

  1. From the Cloud Platform Console, select the project you created at the top of the page.
  2. Click the Navigation menu to the left of the Google Cloud Console banner.
  3. Click IAM and Admin > Service accounts.
  4. In the list, under Service account ID, make note of the generated email address that identifies the service account you configured. This email address is used when adding a data source to Cloud Search.

Next Steps

Here are few next steps you might take:

  1. If you plan on using Google Cloud Search with a non-Google data repository, such as Microsoft® SharePoint®, you must create a data source. For instructions on adding a data source, refer to Add a data source to search.

  2. Once you set up your data source, you can create and register schema to identify how Google Cloud Search should represent the data in the repository.

Send feedback about...

Cloud Search
Cloud Search