Google Search Console Connector for Alteryx : Get organic search report via SQL
Learn how to get organic search report using the Google Search Console Connector for Alteryx. This connector enables you to read and write Google Search Console data effortlessly. Query, analyze, and manage sites and organic search reports — almost no coding required. We'll walk you through the exact setup.
Let's dive in!
Create data source using Google Search Console ODBC Driver
-
Download and install ODBC PowerPack (if you haven't already).
-
Search for
odbcand open the ODBC Data Sources (64-bit):
-
Create a User data source (User DSN) based on the ZappySys API Driver driver:
ZappySys API Driver
- Create and use a User DSN if the client application runs under a User Account. This is the ideal option at design time (e.g., when developing in Visual Studio). Use it for both types of applications (64-bit and 32-bit).
- Create and use a System DSN if the client application runs under a System Account (e.g., as a Windows Service). This is usually the required option in a production environment. If your Windows Service is a 32-bit application, you must use the 32-bit ODBC Data Source Administrator to configure this
-
When the Configuration window appears give your data source a name if you haven't done that already, then select "Google Search Console" from the list of Popular Connectors. If "Google Search Console" is not present in the list, then click "Search Online" and download it. Then set the path to the location where you downloaded it. Finally, click Continue >> to proceed with configuring the DSN:
GoogleSearchConsoleDSNGoogle Search Console
-
Now it's time to configure the Connection Manager. Select Authentication Type, e.g. Token Authentication. Then select API Base URL (in most cases, the default one is the right one). More info is available in the Authentication section.
Google Search Console authentication
User accounts represent a developer, administrator, or any other person who interacts with Google APIs and services. User accounts are managed as Google Accounts, either with Google Workspace or Cloud Identity. They can also be user accounts that are managed by a third-party identity provider and federated with Workforce Identity Federation. [API reference]
Follow these steps on how to create Client Credentials (User Account principle) to authenticate and access Google Calendar API in SSIS package or ODBC data source:
WARNING: If you are planning to automate processes, we recommend that you use a Service Account authentication method. In case, you still need to use User Account, then make sure you use a system/generic account (e.g.automation@my-company.com). When you use a personal account which is tied to a specific employee profile and that employee leaves the company, the token may become invalid and any automated processes using that token will start to fail.Step-1: Create project
This step is optional, if you already have a project in Google Cloud and can use it. However, if you don't, proceed with these simple steps to create one:
-
First of all, go to Google API Console.
-
Then click Select a project button and then click NEW PROJECT button:
-
Name your project and click CREATE button:
-
Wait until the project is created:
- Done! Let's proceed to the next step.
Step-2: Enable Google Calendar API
In this step we will enable Google Calendar API:
-
Select your project on the top bar:
-
Then click the "hamburger" icon on the top left and access APIs & Services:
-
Now let's enable several APIs by clicking ENABLE APIS AND SERVICES button:
-
In the search bar search for
Search Consoleand then locate and select Search Console API:
-
Enable Search Console API:
- Done! Let's proceed to the next step.
Step-3: Create OAuth application
-
First of all, click the "hamburger" icon on the top left and then hit VIEW ALL PRODUCTS:
-
Then access Google Auth Platform to start creating an OAuth application:
-
Start by pressing GET STARTED button:
-
Next, continue by filling in App name and User support email fields:
-
Choose Internal option, if it's enabled, otherwise select External:
-
Optional step if you used
Internaloption in the previous step. Nevertheless, if you had to useExternaloption, then click ADD USERS to add a user:
-
Then add your contact Email address:
-
Finally, check the checkbox and click CREATE button:
- Done! Let's create Client Credentials in the next step.
Step-4: Create Client Credentials
-
In Google Auth Platform, select Clients menu item and click CREATE CLIENT button:
-
Choose
Desktop appas Application type and name your credentials:
-
Continue by opening the created credentials:
-
Finally, copy Client ID and Client secret for the later step:
- Done! We have all the data needed for authentication, let's proceed to the last step!
Step-5: Configure connection
-
Now go to SSIS package or ODBC data source and use previously copied values in User Account authentication configuration:
- In the ClientId field paste the Client ID value.
- In the ClientSecret field paste the Client secret value.
-
Press Generate Token button to generate Access and Refresh Tokens.
-
Finally, click Test Connection to confirm the connection is working.
- Done! Now you are ready to use Google Calendar Connector!
API Connection Manager configuration
Just perform these simple steps to finish authentication configuration:
-
Set Authentication Type to
User Account [OAuth] - Optional step. Modify API Base URL if needed (in most cases default will work).
- Fill in all the required parameters and set optional parameters if needed.
- Press Generate Token button to generate the tokens.
- Finally, hit OK button:
GoogleSearchConsoleDSNGoogle Search ConsoleUser Account [OAuth]https://searchconsole.googleapis.com/webmasters/v3Required Parameters UseCustomApp Fill-in the parameter... Optional Parameters ClientId ClientSecret Scope https://www.googleapis.com/auth/webmasters.readonly RetryMode RetryWhenStatusCodeMatch RetryStatusCodeList 403|429 RetryCountMax 5 RetryMultiplyWaitTime True Redirect URL (Only for Web App)
Google Search Console authentication
Service accounts are accounts that do not represent a human user. They provide a way to manage authentication and authorization when a human is not directly involved, such as when an application needs to access Google Cloud resources. Service accounts are managed by IAM. [API reference]
Follow these steps on how to create Service Account to authenticate and access Google Calendar API in SSIS package or ODBC data source:
Step-1: Create project
This step is optional, if you already have a project in Google Cloud and can use it. However, if you don't, proceed with these simple steps to create one:
-
First of all, go to Google API Console.
-
Then click Select a project button and then click NEW PROJECT button:
-
Name your project and click CREATE button:
-
Wait until the project is created:
- Done! Let's proceed to the next step.
Step-2: Enable Google Calendar API
In this step we will enable Google Calendar API:
-
Select your project on the top bar:
-
Then click the "hamburger" icon on the top left and access APIs & Services:
-
Now let's enable several APIs by clicking ENABLE APIS AND SERVICES button:
-
In the search bar search for
Search Consoleand then locate and select Search Console API:
-
Enable Search Console API:
- Done! Let's proceed to the next step.
Step-3: Create Service Account
Use the steps below to create a Service Account in Google Cloud:
-
First of all, go to IAM & Admin in Google Cloud console:
-
Once you do that, click Service Accounts on the left side and click CREATE SERVICE ACCOUNT button:
-
Then name your service account and click CREATE AND CONTINUE button:
-
Continue by clicking Select a role dropdown and start granting service account Project Viewer roles:
-
Find Project group and select Viewer role:
-
Finish adding roles by clicking CONTINUE button:
You can always add or modify permissions later in IAM & Admin. -
Finally, in the last step, just click button DONE:
-
Done! We are ready to add a Key to this service account in the next step.
Step-4: Add Key to Service Account
We are ready to add a Key (P12 certificate) to the created Service Account:
-
In Service Accounts open newly created service account:
-
Next, copy email address of your service account for the later step:
-
Continue by selecting KEYS tab, then press ADD KEY dropdown, and click Create new key menu item:
-
Finally, select P12 option and hit CREATE button:
- P12 certificate downloads into your machine. We have all the data needed for authentication, let's proceed to the last step!
Step-5: Grant Access in Google Search Console
Now it's time to grant Google Search Console read/write permissions to the created service account:
- Go to Google Search Console.
- Open your verified site property (e.g.,
https://example.com). - In the left-hand menu, click Settings.
- Under Users and permissions, click it to open the user management panel.
- Click the Add user button.
- In the email field, enter the service account email, e.g.,
my-bot@your-project-id.iam.gserviceaccount.com. - Choose the permission level:
- Full – can view all data and take actions.
- Restricted – can only view data.
- Click Add to save.
Note: This is required so the API calls from the service account can access your site's data.
Step-6: Configure connection
-
Now go to SSIS package or ODBC data source and configure these fields in Service Account authentication configuration:
- In the Service Account Email field paste the service account Email address value you copied in the previous step.
- In the Service Account Private Key Path (i.e. *.p12) field use downloaded certificate's file path.
- Done! Now you are ready to use Google Search Connector!
API Connection Manager configuration
Just perform these simple steps to finish authentication configuration:
-
Set Authentication Type to
Service Account (Using *.json OR *.p12 key file) [OAuth] - Optional step. Modify API Base URL if needed (in most cases default will work).
- Fill in all the required parameters and set optional parameters if needed.
- Finally, hit OK button:
GoogleSearchConsoleDSNGoogle Search ConsoleService Account (Using *.json OR *.p12 key file) [OAuth]https://searchconsole.googleapis.com/webmasters/v3Required Parameters Service Account Email Fill-in the parameter... Service Account Private Key Path (i.e. *.p12) Fill-in the parameter... Optional Parameters Scope https://www.googleapis.com/auth/webmasters.readonly RetryMode RetryWhenStatusCodeMatch RetryStatusCodeList 403|429 RetryCountMax 5 RetryMultiplyWaitTime True Impersonate As (Enter Email Id)
-
-
Then go to Preview tab to start building a SQL query.
-
Once you do that, proceed by opening Query Builder:
ZappySys API Driver - Google Search ConsoleRead and write Google Search Console data effortlessly. Query, analyze, and manage sites and organic search reports — almost no coding required.GoogleSearchConsoleDSN
-
Then simply select the Get Organic Search Report endpoint (action).
-
Continue by configuring the Required parameters. You can also set optional parameters too.
-
Move on by hitting Preview Data button to preview the results.
-
If you see the results you need, simply copy the generated query:
-
Click OK to use built SQL query and close the Query Builder.
-
Now hit Preview Data button to preview the data using the generated SQL query. If you are satisfied with the result, use this query in Alteryx:
ZappySys API Driver - Google Search ConsoleRead and write Google Search Console data effortlessly. Query, analyze, and manage sites and organic search reports — almost no coding required.GoogleSearchConsoleDSNSELECT * FROM get_report WITH( SiteUrl='sc-domain:mycompany.com', StartDate='monthstart', EndDate='today', Dimensions='date~page' )
You can also access data quickly from the tables dropdown by selecting <Select table>.AWHEREclause,LIMITkeyword will be performed on the client side, meaning that thewhole result set will be retrieved from the Google Search Console API first, and only then the filtering will be applied to the data. If possible, it is recommended to use parameters in Query Builder to filter the data on the server side (in Google Search Console servers).
Let's not stop here and explore SQL query examples, including how to use them in Stored Procedures and Views (virtual tables) in the next steps.
Google Search Console SQL query examples
Use these SQL queries in your Alteryx data source:
Get organic search report for pages (impressions, clicks, position, CTR)
Returns the organic search report broken down by page and date: impressions, clicks, position, and CTR. Supply the site URL (e.g. sc-domain:mycompany.com or full URL) and date range. Use Dimensions='date~page' for per-page breakdown; you can use static dates or date functions (e.g. monthstart, today) for dynamic reporting.
SELECT * FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='monthstart',
EndDate='today',
Dimensions='date~page'
)
Get organic search report by date (impressions, clicks, position, CTR)
Returns the organic search report aggregated by date (all pages). Supply site URL and date range. Use Dimensions='date' for daily totals. Date parameters support static values or date functions.
SELECT * FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='monthstart',
EndDate='today',
Dimensions='date'
)
Get organic search keywords report (impressions, clicks, position, CTR)
Returns the organic search report grouped by search query (keywords). Supply site URL and date range. Use Dimensions='query' to see impressions, clicks, position, and CTR per keyword.
SELECT * FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='monthstart',
EndDate='today',
Dimensions='query'
)
Get brand search trend by date
Daily brand awareness trend: filter search queries that contain your brand name to measure brand lift from campaigns. Use Dimensions='date' and a DimensionFilterGroups filter on query with operator contains. Replace brand-name with your brand.
SELECT *
FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='monthstart',
EndDate='today',
Dimensions='date',
DimensionFilterGroups='{ "filters":[
{ "dimension":"query", "operator":"contains", "expression":"brand-name" }
] }'
)
Get exact brand keyword performance by date
Impressions, clicks, CTR, and average position for an exact brand keyword (strong brand intent). Use Dimensions='date~query' and filter with operator":"equals" for the exact phrase. Replace brand-name with your keyword.
SELECT *
FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='today-30d',
EndDate='today',
Dimensions='date~query',
DimensionFilterGroups='{ "filters":[
{ "dimension":"query", "operator":"equals", "expression":"brand-name" }
] }'
)
Get brand and product keyword searches (OR condition)
Search performance for brand and product-related keywords using OR logic. Use multiple filters in DimensionFilterGroups (e.g. contains "brand-name shoes", contains "brand-name hats") to track product awareness from brand searches.
SELECT *
FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='today-30d',
EndDate='today',
Dimensions='query',
DimensionFilterGroups='{ "filters":[
{ "dimension":"query", "operator":"contains", "expression":"brand-name shoes" },
{ "dimension":"query", "operator":"contains", "expression":"brand-name hats" }
] }'
)
Get brand evaluation searches (reviews, comparisons)
High-intent brand evaluation searches such as reviews, ratings, or comparisons — often indicating users close to a purchase decision. Filter by multiple contains expressions (e.g. "brand-name reviews", "brand-name vs").
SELECT *
FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='today-60d',
EndDate='today',
Dimensions='query',
DimensionFilterGroups='{ "filters":[
{ "dimension":"query", "operator":"contains", "expression":"brand-name reviews" },
{ "dimension":"query", "operator":"contains", "expression":"brand-name rating" },
{ "dimension":"query", "operator":"contains", "expression":"brand-name vs" }
] }'
)
Get mobile brand searches
Brand-related searches on mobile devices. Use Dimensions='date' for daily totals and combine a query filter (contains your brand) with a device filter (dimension":"device", expression":"mobile"). Useful for measuring mobile or app campaign impact.
SELECT *
FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='today-30d',
EndDate='today',
Dimensions='date',
DimensionFilterGroups='{ "filters":[
{ "dimension":"query", "operator":"contains", "expression":"brand-name" }
] } , {
"filters":[
{ "dimension":"device", "operator":"equals", "expression":"mobile" }
]
}'
)
Exclude low-intent or internal searches from brand report
Exclude internal or low-intent queries (e.g. login, support) so the brand report focuses on genuine discovery. Use contains for brand and notContains for terms to exclude.
SELECT *
FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='today-30d',
EndDate='today',
Dimensions='query',
DimensionFilterGroups='{ "filters":[
{ "dimension":"query", "operator":"contains", "expression":"brand-name" },
{ "dimension":"query", "operator":"notContains", "expression":"login" },
{ "dimension":"query", "operator":"notContains", "expression":"support" }
] }'
)
Get brand searches landing on specific pages
Which pages receive brand-related search traffic. Use Dimensions='page~query' and combine a query filter (brand) with a page filter (e.g. URL contains /products/) to see brand traffic per page.
SELECT *
FROM get_report
WITH(
SiteUrl='sc-domain:mycompany.com',
StartDate='today-30d',
EndDate='today',
Dimensions='page~query',
DimensionFilterGroups='{ "filters":[
{ "dimension":"query", "operator":"contains", "expression":"brand-name" }
] } , {
"filters":[
{ "dimension":"page", "operator":"contains", "expression":"/products/" }
]
}'
)
Create SQL view in ODBC data source
ZappySys API Drivers support flexible Query language so you can override Default Properties you configured on Data Source such as URL, Body. This way you don't have to create multiple Data Sources if you like to read data from multiple EndPoints. However not every application support supplying custom SQL to driver so you can only select Table from list returned from driver.
If you're dealing with Microsoft Access and need to import data from an SQL query, it's important to note that Access doesn't allow direct import of SQL queries. Instead, you can create custom objects (Virtual Tables) to handle the import process.
Many applications like MS Access, Informatica Designer wont give you option to specify custom SQL when you import Objects. In such case Virtual Table is very useful. You can create many Virtual Tables on the same Data Source (e.g. If you have 50 URLs with slight variations you can create virtual tables with just URL as Parameter setting.
-
Go to Custom Objects Tab and Click on Add button and Select Add Table:
-
Enter the desired Table name and click on OK:
-
And it will open the New Query Window Click on Cancel to close that window and go to Custom Objects Tab.
-
Select the created table, Select Text Type AS SQL and write the your desired SQL Query and Save it and it will create the custom table in the ZappySys Driver:
Here is an example SQL query for ZappySys Driver. You can insert Placeholders also. Read more about placeholders here
SELECT "ShipCountry", "OrderID", "CustomerID", "EmployeeID", "OrderDate", "RequiredDate", "ShippedDate", "ShipVia", "Freight", "ShipName", "ShipAddress", "ShipCity", "ShipRegion", "ShipPostalCode" FROM "Orders" Where "ShipCountry"='USA'
-
That's it now go to Preview Tab and Execute your custom virtual table query. In this example it will extract the orders for the USA Shipping Country only:
SELECT * FROM "vt__usa_orders_only"
Get organic search report in Alteryx via SQL view
-
Open Alteryx Designer.
-
First, verify your DCM Settings to ensure you can access ODBC drivers. Go to Options > User Settings > Edit User Settings.
If DCM Mode is set to DCM Only, change it to DCM Optional if you would like to access the legacy Generic ODBC Connection.
After changing this setting, you may need to click Save and restart the connection window for the "Generic ODBC" icon to appear. -
Drag an Input Data tool onto your Alteryx canvas.
-
In the Configuration pane, click Set Up a Connection.
-
Note for DCM Users: If your environment has DCM (Data Connection Manager) enabled, the classic "Generic ODBC" icon may be hidden. To find it, select Data sources on the left and type "ODBC" in the search bar.
-
Once the ODBC window opens, click Connect Asset and select your GoogleSearchConsoleDSN DSN from the list.
Ensure you have configured a 64-bit System DSN in the Windows ODBC Data Source Administrator before this step. -
After selecting your DSN, configure your SQL Query in the Input Data tool configuration:
-
To save your data, drag an Output Data tool and connect it to the Input Data tool.
-
Configure the Output Data tool to write to a CSV file:
-
Press Run (Ctrl+R) to execute the workflow. Verify the results in the Results Window at the bottom.
Advanced topics
Creating SQL stored procedures
You can create procedures to encapsulate custom logic and then only pass handful parameters rather than long SQL to execute your API call.
Steps to create Custom Stored Procedure in ZappySys Driver. You can insert Placeholders anywhere inside Procedure Body. Read more about placeholders here
-
Go to Custom Objects Tab and Click on Add button and Select Add Procedure:
-
Enter the desired Procedure name and click on OK:
-
Select the created Stored Procedure and write the your desired stored procedure and Save it and it will create the custom stored procedure in the ZappySys Driver. Here is an example stored procedure for ZappySys Driver. You can insert Placeholders anywhere inside Procedure Body. Read more about placeholders here
CREATE PROCEDURE [usp_get_orders] @fromdate = '<<yyyy-MM-dd,FUN_TODAY>>' AS SELECT * FROM Orders where OrderDate >= '<@fromdate>';
-
That's it now go to Preview Tab and Execute your Stored Procedure using Exec Command. In this example it will extract the orders from the date 1996-01-01:
Exec usp_get_orders '1996-01-01';
Conclusion
And there you have it — a complete guide on how to get organic search report in Alteryx without writing complex code. All of this was powered by Google Search Console ODBC Driver, which handled the REST API pagination and authentication for us automatically.
Download the trial now or ping us via chat if you have any questions or are looking for a specific feature (you can also reach out to us by submitting a ticket):
More actions supported by Google Search Console Connector
Got another use case in mind? We've documented the exact setups for a variety of essential Google Search Console operations directly in Alteryx, so you can skip the trial and error. Find your next step-by-step guide below: