Fetching additional column names and categories

28 views
Skip to first unread message

Bimal Ram

unread,
Jul 23, 2024, 10:44:00 AM7/23/24
to Google Ads API and AdWords API Forum
Hi Team,

I would like to know whether there's an API or query that supports in getting all the fields for a resource. i.e., Lets say my application has  a table which lists all the metrics of the campaigns, instead just providing some of the key metrics, I want to list down all the available fields for that campaigns.
Also is it possible to get those fields categorized like the UI of Google Ads. (attaching the google ads UI)


Screenshot 2024-07-23 201236.png

Google Ads API Forum Advisor

unread,
Jul 23, 2024, 3:27:59 PM7/23/24
to bima...@techtaliya.com, adwor...@googlegroups.com

Hi,

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

Based on the mentioned screenshot, I understand that you would like to retrieve the highlighted field through the Google Ads API. I would suggest trying the campaign resource to retrieve the data for your campaign. Here is the suggested query:

SELECT segments.click_type, metrics.average_cost, metrics.cost_micros, metrics.ctr, metrics.impressions, metrics.average_cpc FROM campaign

Also, you can utilize GoogleAdsService.SearchStream or GoogleAdsService.Search to retrieve the objects. I would suggest you use the Query Builder to build your query and Query Validator to validate your query.

This message is in relation to case "ref:!00D1U01174p.!5004Q02vE3W5:ref" (ADR-00259216)

Thanks,

 
Google Logo Google Ads API Team

Register for the upcoming workshop: Performance Max and the Google Ads API!
 


Reply all
Reply to author
Forward
0 new messages