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.
![]() |
Google Ads API Team |