How to get list ad group in a campaign

40 views
Skip to first unread message

Nguyễn Trọng Quân

unread,
Apr 15, 2024, 11:51:42 AM4/15/24
to Google Ads API and AdWords API Forum
Hi, how to get list data of ad_group in a campaign when i know campaign_id . i using PHP, please help me 

Google Ads API Forum Advisor

unread,
Apr 16, 2024, 12:59:31 AM4/16/24
to qquannguy...@gmail.com, adwor...@googlegroups.com
Hi,

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

You can use the below sample query to retrieve the ad group data for the campaign using the campaign ID. Replace the campaign.id with the specific campaign ID for which you want to retrieve the adgroup data.

SELECT ad_group.id, ad_group.name, ad_group.status, ad_group.resource_name, metrics.clicks FROM ad_group WHERE campaign.id = ***********
I would recommend you to refer to this documentation to know more about the Fields/Segments/Metrics that can be used with the ad_group resource. Also, you can construct your own customized query using the ad_group query builder and  use Query Validator to validate your query. 

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

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages