Connect to Google Search Console
Connect Google Search Console to Retool and query search performance, sitemaps, and site data using the Search Console API.
Google Search Console is a Google service that reports how a website performs in Google Search. Retool connects to Google Search Console through the Search Console API using either OAuth 2.0 or a Google service account.
After you create a Google Search Console resource in Retool, you can:
- Pull search analytics such as clicks, impressions, click-through rate, and average position.
- List the sites your account can access in Search Console.
- List, submit, and delete sitemaps.
- Display search performance data in tables, charts, and dashboards.
Before you begin
To connect Google Search Console to Retool, you need the following:
- Cloud
- Self-hosted
- Beta feature enabled: The Google Search Console integration is an opt-in beta. In Retool, go to Settings → Beta and turn on Google Search Console integration.
- Google account: A Google account or Google Workspace user with access to the Search Console properties you want to query.
- Retool permissions: Ability to create and manage resources in your organization.
- Beta feature enabled: The Google Search Console integration is an opt-in beta. In Retool, go to Settings → Beta and turn on Google Search Console integration.
- Google account: A Google account or Google Workspace user with access to the Search Console properties you want to query.
- Custom OAuth 2.0 client: A Google OAuth 2.0 client configured for your Retool instance. Self-hosted instances cannot use Retool's hosted OAuth app and must provide their own client ID and secret. Service account authentication does not require an OAuth client.
- Network access: Your Retool instance must be able to reach
accounts.google.com,oauth2.googleapis.com,www.googleapis.com, andsearchconsole.googleapis.comover HTTPS. - Retool permissions: Ability to create and manage resources in your organization.
Create a Google Search Console resource
Follow these steps to create a Google Search Console resource in your Retool organization.
Create a new resource
In your Retool organization, navigate to Resources in the main navigation and click Create new → Resource. Search for Google Search Console and click the Google Search Console tile to begin configuration.
Use folders to organize your resources by team, environment, or data source type. This helps keep your resource list manageable as your organization grows.
Configure general settings
Specify a name and description for the resource that indicates which Google account or Search Console properties it connects to. The description provides more context to users and the app builder about how to use the resource.
| Example name | Example description |
|---|---|
Google Search Console | Default Google Search Console resource for the marketing team. Reads search performance data for company websites. |
Google Search Console (read only) | Read-only Google Search Console resource for displaying search traffic on internal dashboards. |
When configuring a resource with OAuth, you typically only need one resource. Each user authenticates individually and can only access the Search Console properties they have access to. Creating multiple resources is usually unnecessary unless you need to support multiple OAuth applications or mix OAuth with service account authentication.
Configure authentication
Configure the connection settings for your Google Search Console resource under the Credentials section of the resource configuration form.

Google Search Console resource configuration form.
Authentication
Google Search Console supports two authentication methods. Choose based on whether queries should run as the signed-in user or as a non-interactive service identity.
| Authentication method | Use cases |
|---|---|
| OAuth 2.0 | Interactive apps where each user authenticates with their own Google account. Each user only sees the properties they have access to in Search Console. |
| Google Service Account | Automated workflows, scheduled queries, and shared internal apps that need to act as a non-interactive service identity. The service account must be added as a user on each Search Console property it queries. |
- Cloud
- Self-hosted
Option A: OAuth 2.0 with Retool's hosted app (recommended)
Retool provides a hosted OAuth 2.0 client for cloud instances, so no external configuration is required.
- Select OAuth 2.0 as the Authentication method.
- Choose the Type described in the next section.
- Optionally enable Share credentials between users to allow all users of the resource to share a single set of credentials. By default, each user authenticates individually.
- Click Connect with OAuth and authorize Retool to access Google Search Console.
- Click Create resource to save.
Option B: Google service account
Use a service account when queries should run as a non-interactive service identity rather than as the signed-in user.
- Create a service account in the Google Cloud Console and generate a JSON key.
- Enable the Search Console API for your Google Cloud project.
- In Search Console, add the service account's email address as a user on each property it needs to query. Only a property owner can add users.
- In Retool, select Google Service Account as the Authentication method.
- Choose the Type described in the next section.
- Paste the JSON contents of your service account key into the Service account key field.
- Click Create resource to save.
Refer to Google's service account documentation for setup details and key rotation guidance.
Option A: OAuth 2.0 with a custom app (recommended)
Self-hosted instances must provide their own Google OAuth 2.0 client. Retool's hosted OAuth app is only available for Cloud organizations.
- In Retool, select OAuth 2.0 as the Authentication method and copy the OAuth callback URL.
- Create an OAuth 2.0 client in the Google Cloud Console and add the OAuth callback URL as an authorized redirect URI.
- Enable the Search Console API for your Google Cloud project.
- In Retool, enter the Client ID and Client secret from your OAuth 2.0 client.
- Choose the Type described in the next section.
- Optionally enable Share credentials between users to allow all users of the resource to share a single set of credentials.
- Click Connect with OAuth and authorize Retool to access Google Search Console.
- Click Create resource to save.
Option B: Google service account
Use a service account when queries should run as a non-interactive service identity rather than as the signed-in user. Service accounts do not require a custom OAuth client.
- Create a service account in the Google Cloud Console and generate a JSON key.
- Enable the Search Console API for your Google Cloud project.
- In Search Console, add the service account's email address as a user on each property it needs to query. Only a property owner can add users.
- In Retool, select Google Service Account as the Authentication method.
- Choose the Type described in the next section.
- Paste the JSON contents of your service account key into the Service account key field.
- Click Create resource to save.
Type
The Type setting controls the OAuth scope used for Search Console API calls. Choose the most restrictive option that still supports your apps.
| Type | Scope | API access |
|---|---|---|
| Read only | https://www.googleapis.com/auth/webmasters.readonly | Read search analytics, site lists, and sitemaps. Use for apps that only display Search Console data. |
| Read and write | https://www.googleapis.com/auth/webmasters | Read and write access, including adding or removing sites and submitting or deleting sitemaps. |
To change the Type after a resource has been created, update the authentication settings and re-authorize the resource. For OAuth 2.0, users are prompted to re-consent on their next query.
- Cloud
Configure advanced options
Configure optional settings available under the Advanced options section of the resource configuration form.
Outbound region
By default, requests originate from your organization's outbound region (for example, us-west-2). Enable Override default outbound Retool region to route requests through a different region. This is useful when Search Console API access is restricted by IP. Outbound regions do not change where Retool stores your apps or data. For details, refer to Configure Retool outbound regions.
Save the resource
Click Create resource to save your Google Search Console resource. You can now use it in queries across your Retool apps and automations.
To verify your configuration, save the resource and run a query, such as listing your sites with /webmasters/v3/sites GET.
Interact with Google Search Console data
Once you've created a Google Search Console resource, you can interact with Google Search Console data using Retool.
Retool recommends using the new app builder so you can use natural language to build React-based apps using AI.
- To use Google Search Console data in the app builder, reference the resource in the prompt with
@, such as@Google Search Console. Refer to the data and functions documentation to learn more. - For classic apps, workflows, and agents, refer to the resource queries documentation to learn how to write a resource query. For the full list of available operations, refer to the Search Console API reference.
Best practices
- Choose the narrowest scope that meets your needs: Use Read only for apps that only display search data. Use Read and write only when your app manages sites or sitemaps.
- Share property access deliberately: A service account can query every Search Console property it's added to as a user. Add it only to the properties your apps need, and use the lowest permission level that works.
- Be careful with shared credentials: When you enable Share credentials between users, every user of the resource queries Search Console as the account that authorized it, regardless of their own access.
- Use environments for separate credentials: If you manage production and staging sites separately, configure different credentials for each using Retool environments.
Related resources
Google OAuth credentials
Set up a custom Google OAuth 2.0 client for self-hosted Retool.
Connect to Google Analytics
Combine site traffic data with search performance data.
Connect to Google Sheets
Export search performance data to spreadsheets for reporting.
Create a resource
Learn how to create and manage resources in Retool.
Retool community
Community discussions and solutions for connecting resources to Retool.
Search Console API reference
Official Search Console API documentation.