Get Organic Search Report
Name
get_report
Description
Get Google organic search report for selected date range, dimensions and metrics (KPI) using Google Search Console API
Parameters
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description |
---|---|---|---|---|---|
Key1 |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
Key2 |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
Key3 |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
Key4 |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
Key5 |
DT_WSTR
|
nvarchar(1000)
|
1000 | False |
|
Clicks |
DT_I8
|
bigint
|
False |
||
Impressions |
DT_I8
|
bigint
|
False |
||
Ctr |
DT_R8
|
float
|
False |
||
Position |
DT_R8
|
float
|
False |
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Raw | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
There are no Static columns defined for this endpoint. This endpoint detects columns dynamically at runtime. |
Examples
SSIS
Use Google Search Console Connector in API Source component to read data or in API Destination component to read/write data:
Get Organic Search Report using API Source

Get Organic Search Report using API Destination

ODBC application
Use these SQL queries in your ODBC application data source:
Get google organic search report for pages (Impressions, Clicks, Position, ctr)
Get google organic search report for pages by date, show impressions, clicks, position and ctr
SELECT * FROM get_report
WITH(
SiteUrl='https://mycompany.com'
--You can use static date or date functions in StartDate and EndDate for dynamic reporting.
--Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)
,StartDate='monthstart' --or static 2024-12-31
,EndDate='today' --or static 2024-12-31
,Dimensions='date~page' --multiple dimensions can be separated using ~ (e.g. date~page), Allowed dimensions are date;page;query;country;device;searchAppearance
)
Get google organic search report by date (Impressions, Clicks, Position, ctr)
Get google organic search report for all pages by date, show impressions, clicks, position and ctr
SELECT * FROM get_report
WITH(
SiteUrl='https://mycompany.com'
--You can use static date or date functions in StartDate and EndDate for dynamic reporting.
--Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)
,StartDate='monthstart' --or static 2024-12-31
,EndDate='today' --or static 2024-12-31
,Dimensions='date' --multiple dimensions can be separated using ~ (e.g. date~page), Allowed dimensions are date;page;query;country;device;searchAppearance
)
Get google organic search keywords report (Impressions, Clicks, Position, ctr)
Get google organic search keywords report for all pages group by date, show impressions, clicks, position and ctr
SELECT * FROM get_report
WITH(
SiteUrl='https://mycompany.com'
--You can use static date or date functions in StartDate and EndDate for dynamic reporting.
--Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)
,StartDate='monthstart' --or static 2024-12-31
,EndDate='today' --or static 2024-12-31
,Dimensions='query' --multiple dimensions can be separated using ~ (e.g. date~page), Allowed dimensions are date;page;query;country;device;searchAppearance
)
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get google organic search report for pages (Impressions, Clicks, Position, ctr)
Get google organic search report for pages by date, show impressions, clicks, position and ctr
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_report
WITH(
SiteUrl=''https://mycompany.com''
--You can use static date or date functions in StartDate and EndDate for dynamic reporting.
--Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)
,StartDate=''monthstart'' --or static 2024-12-31
,EndDate=''today'' --or static 2024-12-31
,Dimensions=''date~page'' --multiple dimensions can be separated using ~ (e.g. date~page), Allowed dimensions are date;page;query;country;device;searchAppearance
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_SEARCH_CONSOLE_IN_GATEWAY];
Get google organic search report by date (Impressions, Clicks, Position, ctr)
Get google organic search report for all pages by date, show impressions, clicks, position and ctr
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_report
WITH(
SiteUrl=''https://mycompany.com''
--You can use static date or date functions in StartDate and EndDate for dynamic reporting.
--Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)
,StartDate=''monthstart'' --or static 2024-12-31
,EndDate=''today'' --or static 2024-12-31
,Dimensions=''date'' --multiple dimensions can be separated using ~ (e.g. date~page), Allowed dimensions are date;page;query;country;device;searchAppearance
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_SEARCH_CONSOLE_IN_GATEWAY];
Get google organic search keywords report (Impressions, Clicks, Position, ctr)
Get google organic search keywords report for all pages group by date, show impressions, clicks, position and ctr
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM get_report
WITH(
SiteUrl=''https://mycompany.com''
--You can use static date or date functions in StartDate and EndDate for dynamic reporting.
--Supported functions are now|today|yesterday|weekstart|weekend|monthstart|monthend|yearstart|yearend and supported intervals for add/subtract are ms|s|sec|min|h|hour|y|year|d|day|m|month|y|year. Example monthstart-3d (subtract 3days from month start)
,StartDate=''monthstart'' --or static 2024-12-31
,EndDate=''today'' --or static 2024-12-31
,Dimensions=''query'' --multiple dimensions can be separated using ~ (e.g. date~page), Allowed dimensions are date;page;query;country;device;searchAppearance
)';
EXEC (@MyQuery) AT [LS_TO_GOOGLE_SEARCH_CONSOLE_IN_GATEWAY];