Google Ads Connector

ZappySys Google Ads Connector provide read / write capability inside your app (see list below), using these drag and drop, high performance connector you can perform many Google Ads operations without any coding. You can use this connector to integrate Google Ads data inside apps like SSIS, SQL Server or popular ETL Platforms / BI Tools/ Reporting Apps / Programming languages (i.e. Informatica, Power BI, SSRS, Excel, C#, JAVA, Python).

Download for SSIS Download for Other Apps Documentation

Integrate Google Ads with these apps

Actions supported by Google Ads Connector

Google Ads Connector support following actions for REST API integration. If some actions are not listed below then you can easily edit Connector file and enhance out of the box functionality.
 Get Report: Campaign Performance (By Date)
Get campaign performance data by date. If you like to customize this report then use get_query_result endpoint.    [ Read more... ]
 Get Report: Campaign Performance (By Year and Month)
Get campaign performance data by year and month. If you like to customize this report then use get_query_result endpoint.    [ Read more... ]
 Query Google Ads data (Using GAQL - Google Ads Query Language)
Get Google Ads report data using GAQL (Google Ads Query Language) SQL query. Use Query builder from this link to select fields, segments, and metrics https://developers.google.com/google-ads/api/fields/v18/overview_query_builder (Click on Resource type you like to query) for SELECT, FROM and ORDER BY    [ Read more... ]
Parameter Description
Filter
Option Value
$.results[*] $.results[*]
$.results[*].campaign $.results[*].campaign
$.results[*].customer $.results[*].customer
$.results[*].anything_here $.results[*].anything_here
Enter Query (i.e. GAQL sql)
 Get Resources (For GAQL)
Get resources you can query for GAQL    [ Read more... ]
 Get Resource Segments (For GAQL)
Get segments (Group By Fields) for all or selected resource using GAQL    [ Read more... ]
Parameter Description
Resource
 Get Resource Metrics (For GAQL)
Get metrics you can query (for all or selected resource) using GAQL, Numeric fields which can be aggregated (e.g. clicks, impressions)    [ Read more... ]
Parameter Description
Resource
 Get Resource Attributes (For GAQL)
Get attributes you can query (for all or selected resource) using GAQL    [ Read more... ]
Parameter Description
Resource
 Get Resource Data (Query Attributes, Segments, Metrics)
Get Google Ads resource data without supplying GAQL, easy to use Query Builder to fetch data from any object by its Resource name.    [ Read more... ]
Parameter Description
Filter
Option Value
$.results[*] $.results[*]
$.results[*].campaign $.results[*].campaign
$.results[*].customer $.results[*].customer
$.results[*].anything_here $.results[*].anything_here
Resource
Attributes (Leave blank to select all)
Segments (Group By)
Metrics (Aggregate Fields)
Where Clause
Option Value
Example1 segments.date DURING LAST_30_DAYS
Example2 segments.date > '<>' AND segments.date < '<>'
Example3 metrics.impressions > 10 AND segments.date > '<>' AND segments.date < '<>'
Example4 campaign.status='ENABLED' AND metrics.impressions > 10 AND segments.date > '<>' AND segments.date < '<>'
OrderBy Clause
Option Value
Example1 segments.date
Example2 segments.date DESC
Example3 segments.year DESC,segments.month ASC
Limit Clause (i.e. Max Rows) - Blank means all rows
Option Value
Example1 (All Rows - Keep Blank)
Example2 1000
 Get Linked Customers (For Manager Account)
Get Linked Customers (Must be using Manager Account)    [ Read more... ]
 Get Customers
Get Google Ads customer data    [ Read more... ]
 Get Campaigns
Get Google Ads campaign data    [ Read more... ]
 Get Campaign Keywords
Get Campaign Keywords (For all AdGroup)    [ Read more... ]
 Generic Request
This is generic endpoint. Use this endpoint when some actions are not implemented by connector. Just enter partial URL (Required), Body, Method, Header etc. Most parameters are optional except URL.    [ Read more... ]
Parameter Description
Url API URL goes here. You can enter full URL or Partial URL relative to Base URL. If it is full URL then domain name must be part of ServiceURL or part of TrustedDomains
Body Request Body content goes here
IsMultiPart Set this option if you want to upload file(s) (i.e. POST RAW file data) or send data using Multi-Part encoding method (i.e. Content-Type: multipart/form-data). Multi-Part request allows you to mix key/value and upload files in same request. On the other hand raw upload allows only single file upload (without any key/value) ==== Raw Upload (Content-Type: application/octet-stream) ===== To upload single file in raw mode check this option and specify full file path starting with @ sign in the Body (e.g. @c:\data\myfile.zip ) ==== Form-Data / Multipart Upload (Content-Type: multipart/form-data) ===== To treat your Request data as multi part fields you must specify key/value pairs separated by new lines into RequestData field (i.e. Body). Each key value pair is entered on new-line and key/value are separated using equal sign (=). Preceding and trailing spaces are ignored also blank lines are ignored. If field value has some any special character(s) then use escape sequence (e.g. For NewLine: \r\n, For Tab: \t, For at (@): \@). When value of any field starts with at sign (@) its automatically treated as File you want to upload. By default file content type is determined based on extension however you can supply content type manually for any field using this way [ YourFileFieldName.Content-Type=some-content-type ]. By default File Upload Field always includes Content-Type in the request (non file fields do not have content-type by default unless you supply manually). For some reason if you dont want to use Content-Type header in your request then supply blank Content-Type to exclude this header altogather [e.g. SomeFieldName.Content-Type= ]. In below example we have supplied Content-Type for file2 and SomeField1, all other fields are using default content-type. See below Example of uploading multiple files along with additional fields. If some API requires you to pass Content-Type: multipart/form-data rather than multipart/form-data then manually set Request Header => Content-Type: multipart/mixed (it must starts with multipart/ else will be ignored). file1=@c:\data\Myfile1.txt file2=@c:\data\Myfile2.json file2.Content-Type=application/json SomeField1=aaaaaaa SomeField1.Content-Type=text/plain SomeField2=12345 SomeFieldWithNewLineAndTab=This is line1\r\nThis is line2\r\nThis is \ttab \ttab \ttab SomeFieldStartingWithAtSign=\@MyTwitterHandle
Filter Enter filter to extract array from response. Example: $.rows[*] --OR-- $.customers[*].orders[*]. Check your response document and find out hierarchy you like to extract
Option Value
No filter
Example1 $.store.books[*]
Example2 (Sections Under Books) $.store.books[*].sections[*]
Example3 (Equals) $.store.books[?(@author=='sam')]
Example4 (Equals - Any Section) $..[?(@author=='sam')]
Example5 (Not Equals - Any Section) $..[?(@author!='sam')]
Example6 (Number less than) $.store.books[?(@.price<10)] Example7 (Regular Expression - Contains Pattern)=$.store.books[?(@author=~ /sam|bob/ )]
Example8 (Regular Expression - Does Not Contain Pattern) $.store.books[?(@author=~ /^((?!sam|bob).)*$/ )]
Example9 (Regular Expression - Exact Pattern Match) $.store.books[?(@author=~ /^sam|bob$/ )]
Example10 (Regular Expression - Starts With) $.store.books[?(@author=~ /^sam/ )]
Example11 (Regular Expression - Ends With) $.store.books[?(@author=~ /sam$/ )]
Example12 (Between) $.store.employees[?( @.hiredate>'2015-01-01' && @.hiredate<'2015-01-04' )]
Headers Headers for Request. To enter multiple headers use double pipe or new line after each {header-name}:{value} pair
 Generic Request (Bulk Write)
This is a generic endpoint for bulk write purpose. Use this endpoint when some actions are not implemented by connector. Just enter partial URL (Required), Body, Method, Header etc. Most parameters are optional except URL.    [ Read more... ]
Parameter Description
Url API URL goes here. You can enter full URL or Partial URL relative to Base URL. If it is full URL then domain name must be part of ServiceURL or part of TrustedDomains
IsMultiPart Set this option if you want to upload file(s) (i.e. POST RAW file data) or send data using Multi-Part encoding method (i.e. Content-Type: multipart/form-data). Multi-Part request allows you to mix key/value and upload files in same request. On the other hand raw upload allows only single file upload (without any key/value) ==== Raw Upload (Content-Type: application/octet-stream) ===== To upload single file in raw mode check this option and specify full file path starting with @ sign in the Body (e.g. @c:\data\myfile.zip ) ==== Form-Data / Multipart Upload (Content-Type: multipart/form-data) ===== To treat your Request data as multi part fields you must specify key/value pairs separated by new lines into RequestData field (i.e. Body). Each key value pair is entered on new-line and key/value are separated using equal sign (=). Preceding and trailing spaces are ignored also blank lines are ignored. If field value has some any special character(s) then use escape sequence (e.g. For NewLine: \r\n, For Tab: \t, For at (@): \@). When value of any field starts with at sign (@) its automatically treated as File you want to upload. By default file content type is determined based on extension however you can supply content type manually for any field using this way [ YourFileFieldName.Content-Type=some-content-type ]. By default File Upload Field always includes Content-Type in the request (non file fields do not have content-type by default unless you supply manually). For some reason if you dont want to use Content-Type header in your request then supply blank Content-Type to exclude this header altogather [e.g. SomeFieldName.Content-Type= ]. In below example we have supplied Content-Type for file2 and SomeField1, all other fields are using default content-type. See below Example of uploading multiple files along with additional fields. If some API requires you to pass Content-Type: multipart/form-data rather than multipart/form-data then manually set Request Header => Content-Type: multipart/mixed (it must starts with multipart/ else will be ignored). file1=@c:\data\Myfile1.txt file2=@c:\data\Myfile2.json file2.Content-Type=application/json SomeField1=aaaaaaa SomeField1.Content-Type=text/plain SomeField2=12345 SomeFieldWithNewLineAndTab=This is line1\r\nThis is line2\r\nThis is \ttab \ttab \ttab SomeFieldStartingWithAtSign=\@MyTwitterHandle
Filter Enter filter to extract array from response. Example: $.rows[*] --OR-- $.customers[*].orders[*]. Check your response document and find out hierarchy you like to extract
Headers Headers for Request. To enter multiple headers use double pipe (||) or new line after each {header-name}:{value} pair

SQL examples for Google Ads Connector

Use these example Google Ads SQL queries in any ODBC-compatible application:

Get Campaigns    [ Read more... ]

Get all Campaigns for Google Ads account

SELECT * FROM get_campaigns

Get Customers    [ Read more... ]

Get all customers you can query in your account

SELECT * FROM get_customers

Get campaign performance report by date    [ Read more... ]

Get campaign performance data, group by date and campaign

SELECT * FROM get_report_campaign_performance_by_date WITH(ReportStartDate='monthstart', ReportEndDate='today-1d')

Get campaign performance report by month    [ Read more... ]

Get campaign performance data, group by year, month and campaign

SELECT * FROM get_report_campaign_performance_by_month WITH(ReportStartDate='monthstart', ReportEndDate='today-1d')

Get keywords information (all campaigns / ad groups)    [ Read more... ]

Get keywords for all campaigns and all ad groups (criterion_id is basically keyword_id)

select * from get_campaign_keywords

Get resource data (e.g. ad_group, ad_group_ad, keyword_view    [ Read more... ]

Get data for any resource

SELECT * FROM get_resource_data
WITH (
Resource='Campaign'

--//Optional Parameters 
--, Attributes='' --Keep blank to output all attributes
--OR--
--, Attributes='campaign.id~campaign.name~campaign.end_date' 

--, Metrics='metrics.clicks~metrics.impressions'
--, Segments='segments.year~segments.month'
--//must supply where clause if certain segments used (e.g. date, year, month)
--, Where='segments.date between ''<<yearstart,FUN_TO_DATE>>'' AND ''<<today-1d,FUN_TO_DATE>>'' '
--, OrderBy='segments.year DESC, segments.month ASC'
)

/*
--OR-- Simple Mode (Query by Resource Name in FROM clause).

Step-1: Findout all resource you can query using  
select * from get_resources

Step-2: Use resource name like below (in FROM)
Example resources (If data is missing it may throw error)

select * from ad_group
select * from ad_group_ad
select * from ad_group_ad_asset_combination_view
select * from ad_group_ad_asset_view
select * from ad_group_asset
select * from ad_group_audience_view
select * from ad_schedule_view
select * from age_range_view
select * from android_privacy_shared_key_google_ad_group
select * from android_privacy_shared_key_google_campaign
select * from android_privacy_shared_key_google_network_type
select * from asset
select * from asset_field_type_view
select * from asset_group
select * from asset_group_asset
select * from asset_group_product_group_view
select * from asset_group_top_combination_view
select * from asset_set_asset
select * from asset_set_type_view
select * from bidding_strategy
select * from campaign
select * from campaign_aggregate_asset_view
select * from campaign_asset
select * from campaign_audience_view
select * from campaign_budget
select * from campaign_group
select * from campaign_search_term_insight
select * from channel_aggregate_asset_view
select * from click_view
select * from content_criterion_view
select * from conversion_action
select * from customer
select * from customer_asset
select * from customer_search_term_insight
select * from detail_placement_view
select * from display_keyword_view
select * from distance_view
select * from dynamic_search_ads_search_term_view
select * from expanded_landing_page_view
select * from gender_view
select * from geographic_view
select * from group_placement_view
select * from hotel_group_view
select * from hotel_performance_view
select * from hotel_reconciliation
select * from income_range_view
select * from keyword_view
select * from landing_page_view
select * from location_view
select * from managed_placement_view
select * from paid_organic_search_term_view
select * from parental_status_view
select * from per_store_view
select * from performance_max_placement_view
select * from product_group_view
select * from search_term_view
select * from shared_set
select * from shopping_performance_view
select * from shopping_product
select * from smart_campaign_search_term_view
select * from topic_view
select * from travel_activity_group_view
select * from travel_activity_performance_view
select * from user_location_view
select * from video
select * from webpage_view
*/

Query Google Ads data using GAQL (Google Ads Query Language)    [ Read more... ]

Get Google Ads report data using GAQL (Google Ads Query Language) SQL query. Use Query builder from this link to select fields, segments, and metrics https://developers.google.com/google-ads/api/fields/v18/overview_query_builder (Click on Resource type you like to query) for SELECT, FROM and ORDER BY

--Use Query Builder here https://developers.google.com/google-ads/api/fields/v18/overview_query_builder
--Paste Generated query in Query='here'				

SELECT 
	[campaign.id] as id, 
	[campaign.name] as name, 
	[metrics.impressions] as impressions, 
	[metrics.clicks] as clicks, 
	[metrics.costMicros] / 1000000 as cost --//API returns Unit in Micro so to get actual value divide by 1000000
FROM get_query_result
WITH(
	  Filter='$.results[*]'
	, Query='SELECT  campaign.id, campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros 
FROM campaign 
WHERE campaign.status = ''ENABLED''
 AND metrics.impressions > 10
ORDER BY campaign.id
--LIMIT 1000
'
	--Set different Customer Id here if not supplied in connection settings
	--, CustomerId='1112223333'
)

Query Google Ads data (Simple Mode) - using #DirectSQL prefix    [ Read more... ]

Get Google Ads report data using GAQL (Google Ads Query Language) - SQL query using simple mode. This example passes GAQL query to get_query_result endpoint with specifying endpoint details. You must prefix query with special tag #DirectSQL

#DirectSQL 

--Use Query Builder here https://developers.google.com/google-ads/api/fields/v18/overview_query_builder
--Paste Generated query below
				
SELECT  campaign.id, campaign.name, metrics.impressions, metrics.clicks, metrics.cost_micros
FROM campaign 
--WHERE campaign.status = 'ENABLED'
--ORDER BY campaign.id
--LIMIT 1000

Query Google Ads Campaign Performance Data (Metrics / Segments) - using #DirectSQL prefix    [ Read more... ]

Get Google Ads report data using GAQL (Google Ads Query Language) group by Date and Campaign. You must prefix query with special tag #DirectSQL

#DirectSQL 

--Use Query Builder here https://developers.google.com/google-ads/api/fields/v18/overview_query_builder
--Paste Generated query below

SELECT 
  segments.date 
, campaign.id
, campaign.name
, metrics.all_conversions
, metrics.average_cpc
, metrics.average_cost
, metrics.average_cpv
, metrics.average_cpm
, metrics.average_cpe
, metrics.average_impression_frequency_per_user
, metrics.average_page_views
, metrics.bounce_rate
, metrics.clicks
, metrics.conversions
, metrics.content_impression_share
, metrics.content_budget_lost_impression_share
, metrics.cost_micros
, metrics.cost_per_all_conversions
, metrics.cost_per_conversion
, metrics.ctr
, metrics.engagement_rate
, metrics.engagements
--, metrics.general_invalid_click_rate
--, metrics.general_invalid_clicks
, metrics.impressions
, metrics.interaction_rate
, metrics.interactions
, metrics.invalid_clicks
, metrics.search_absolute_top_impression_share
, metrics.search_budget_lost_absolute_top_impression_share
, metrics.search_budget_lost_impression_share
, metrics.search_budget_lost_top_impression_share
, metrics.search_click_share
, metrics.search_impression_share
, metrics.video_view_rate
, metrics.video_quartile_p75_rate
, metrics.video_quartile_p50_rate
, metrics.video_quartile_p25_rate
, metrics.video_quartile_p100_rate
, metrics.video_views
, metrics.view_through_conversions
, metrics.unique_users
, metrics.top_impression_percentage
, metrics.search_rank_lost_top_impression_share
, metrics.search_rank_lost_impression_share
, metrics.search_rank_lost_absolute_top_impression_share
, metrics.search_top_impression_share
, metrics.search_exact_match_impression_share
, metrics.absolute_top_impression_percentage
, metrics.active_view_cpm
, metrics.active_view_ctr
, metrics.active_view_impressions
FROM campaign 
WHERE segments.date BETWEEN '<<monthstart,FUN_TO_DATE>>' and '<<today-1d,FUN_TO_DATE>>'

--WHERE segments.date BETWEEN '2025-01-25' and '2025-02-25'
--AND WHERE campaign.status = 'ENABLED'
--ORDER BY segments.date,campaign.id
--LIMIT 1000