Skip to content

How to Use a Service Account with Index Worker

Index Worker currently uses OAuth-based API requests. Switching these requests to use a service account may help avoid some rate limit errors.

✅ Reference: What are service accounts?

📌 This is unrelated to the 2,000 URLs per day limit for each property.

  1. Log in to the Google Cloud Console.

  2. Select a project or create a new project. Google Cloud project selector for the amethyst-data project

  3. From the navigation menu, select “IAM & Admin” > “Service Accounts.” Google Cloud navigation menu with IAM and admin selected

  4. Click “Create service account.” Google Cloud service accounts page with create service account button

  5. Enter the service account name, ID, and description, then click “Create.”

  6. Select the service account you created from the list, then click “Manage keys.” Search Console user permissions actions menu

  7. Select “Add key” > “Create new key,” choose JSON as the format, then click “Create.” Google Cloud service account key creation menu

  8. Store the downloaded JSON file in a safe place.

  9. Next, grant permissions to the service account you just created from Search Console. Log in to Search Console.

  10. From “Settings” -> “Users and permissions” in the lower-left corner of the screen, add the service account you just created (for example, hoge@fuga.iam.gserviceaccount.com) with “Full” permissions (full permissions/full user).

Google Cloud settings menu for a service account

Search Console settings menu with users and permissions highlighted

Google Search Console add user button in user permissions

  1. Log in to Amethyst.

  2. From “Workspace settings” -> “Service accounts” -> “Choose file” in the lower-left corner of the screen, upload the JSON file you downloaded. Workspace settings item in the Amethyst sidebar

Search Analytics BigQuery service account ID field

  1. This completes service account registration in Amethyst. The final step is to use the service account.

  2. Select “Search Console Properties” in Index Worker. Search Console property item in the Amethyst sidebar

  3. Select ”+ Add” in the upper-right corner of the screen. Search Console property list with add button

  4. Set the account used to reference properties to the service account you created. Search Console property selection dialog

  5. Select any Search Console property.

  6. Complete the property addition from “Review selection.”

  7. You can now select Search Console properties through the service account when creating or editing Index Worker jobs, which may help avoid some rate limit errors.