Endpoint 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
Parameter | Required | Options | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name:
Label: SiteUrl |
YES | |||||||||||||||||||||||||||||||||
Name:
Label: StartDate The date for which to retrieve the report in YYYY-MM-DD format. Supported functions 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) |
YES |
|
||||||||||||||||||||||||||||||||
Name:
Label: EndDate The date for which to retrieve the report in YYYY-MM-DD format. Supported functions 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) |
YES |
|
||||||||||||||||||||||||||||||||
Name:
Label: Dimensions |
YES |
|
Output Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
---|---|---|---|---|
Key1 |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
Key2 |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
Key3 |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
Key4 |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
Key5 |
DT_WSTR
|
nvarchar(1000)
|
1000 | |
Clicks |
DT_I8
|
bigint
|
||
Impressions |
DT_I8
|
bigint
|
||
Ctr |
DT_R8
|
float
|
||
Position |
DT_R8
|
float
|
Input Columns
Label | Data Type (SSIS) | Data Type (SQL) | Length | 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 or in API Destination SSIS Data Flow components to read or write data.
API Source
Required Parameters | |
---|---|
SiteUrl | Fill-in the parameter... |
StartDate | Fill-in the parameter... |
EndDate | Fill-in the parameter... |
Dimensions | Fill-in the parameter... |
Optional Parameters | |
PagingMode | ByPostData |
PagingByUrlAttributeName | {%offset%} |
PagingIncrementBy | 2000 |
EnableArrayFlattening | True |
PagingByUrlCurrentPage | 0 |

API Destination
Required Parameters | |
---|---|
SiteUrl | Fill-in the parameter... |
StartDate | Fill-in the parameter... |
EndDate | Fill-in the parameter... |
Dimensions | Fill-in the parameter... |
Optional Parameters | |
PagingMode | ByPostData |
PagingByUrlAttributeName | {%offset%} |
PagingIncrementBy | 2000 |
EnableArrayFlattening | True |
PagingByUrlCurrentPage | 0 |

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];