Trying To get Ad Data

56 views
Skip to first unread message

Shweta Suthar

unread,
Sep 28, 2022, 8:40:14 AM9/28/22
to Google Ads API and AdWords API Forum
Hi Team,

we're trying to get ad details using below query. but using below query we're able to get data for EXPANDED_TEXT_AD Ad type only.

Could you please help us to get data for all types like TEXT_AD ,DYNAMIC_SEARCH_AD, EXPANDED_DYNAMIC_SEARCH_AD, GMAIL_AD, GOAL_OPTIMIZED_SHOPPING_AD, IMAGE_AD, MULTI_ASSET_RESPONSIVE_DISPLAY_AD, PRODUCT_AD, RESPONSIVE_DISPLAY_AD, RESPONSIVE_SEARCH_AD, SHOWCASE_AD, TEMPLATE_AD, TEXT_AD ?

Could you please provide single query to get data for all above type?

 $query =
            'SELECT ad_group.id, '
            . 'ad_group_ad.status, '
            . 'ad_group.labels, '
            . 'ad_group_ad.ad.id, '
            . 'ad_group_ad.ad.type, '
            . 'ad_group_ad.ad.name, '
            . 'campaign.base_campaign, '
            . 'ad_group_ad.ad.expanded_text_ad.headline_part1, '
            . 'ad_group_ad.ad.expanded_text_ad.headline_part2, '
            . 'ad_group_ad.ad.expanded_text_ad.description, '
            . 'ad_group_ad.ad.expanded_text_ad.description2, '
            . 'ad_group_ad.policy_summary.approval_status, '
            . 'ad_group_ad.ad.final_urls, '
            . 'ad_group_ad.ad.display_url, '
            . 'ad_group_ad.ad.final_mobile_urls, '
            . 'ad_group_ad.ad.tracking_url_template, '
            . 'ad_group_ad.ad.final_url_suffix, '
            . 'ad_group_ad.ad.url_custom_parameters, '
            . 'ad_group_ad.ad.device_preference, '
            . 'ad_group_ad.ad.system_managed_resource_source '
            . 'FROM ad_group_ad '
            . 'WHERE ad_group_ad.ad.type = EXPANDED_TEXT_AD';
        if ($adGroupId !== null) {
            $query .= " AND ad_group.id = $adGroupId";
        }

Thanks,
Shweta Suthar

Google Ads API Forum Advisor

unread,
Sep 28, 2022, 2:04:28 PM9/28/22
to shweta...@comfortclick.co.uk, adwor...@googlegroups.com
Hi Shweta,

Thank you for reaching out.

Our team unfortunately would not be able to create a query on your behalf. However, I would recommend that you check out this query builder for generating and constructing an ad_group_ad report query.

The attributes of the ad types you mentioned can then be extracted by using the sample ad type specific fields below : I hope this helps.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2euAvk:ref
Reply all
Reply to author
Forward
0 new messages