pulling search terms, for clicks and impressions (and pull the other metrics)

27 views
Skip to first unread message

Larry Kolinek

unread,
May 20, 2024, 12:20:13 PM5/20/24
to Google Ads API and AdWords API Forum
hello

var query = "SELECT Query, CampaignName, AdGroupName, Impressions, Clicks, Cost, AllConversions, ConversionValue, Conversions " +

              "FROM SEARCH_QUERY_PERFORMANCE_REPORT " +

              "WHERE Impressions > 0 " +

              "AND CampaignName = '" + WhichCampaign + "' " +

              "AND AdGroupName = '" + WhichAdGroup + "' " +

              "DURING " + dateRange;


Is that the only way, or just "a" way to get this data?

does anyone else find it hard to figure out WHERE or WHAT table to use?




Google Ads API Forum Advisor

unread,
May 20, 2024, 1:28:33 PM5/20/24
to larry....@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Kindly note that there is no report called 'SEARCH_QUERY_PERFORMANCE_REPORT' in the Google Ads API. You can use the below query to retrieve the search terms and other metrics (clicks, impressions, etc.) using the search_term_view resource:
SELECT search_term_view.search_term, campaign.name, ad_group.name, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.all_conversions, metrics.conversions_value, metrics.conversions, segments.date FROM search_term_view WHERE metrics.impressions > 0 AND segments.date DURING LAST_MONTH
Also, I would suggest you use the Query Builder to build your query and Query Validator to validate your query. you can utilize GoogleAdsService.SearchStream or GoogleAdsService.Search to retrieve the objects. Hope this helps. Let us know if you have any further queries.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tJ28x:ref" (ADR-00235755)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages