Get Ads Details Type wise

50 views
Skip to first unread message

Shweta Suthar

unread,
Sep 26, 2022, 7:54:18 AM9/26/22
to Google Ads API and AdWords API Forum
Hi Team,

we are trying to get ad details using ad group ID.

Could you please help us to get type wise ad details like headline , Description, finalurls, displayurl, FinalUrlSuffix, etc.

we're not able to get data using below methods.
$adGroupAd = $googleAdsRow->getAdGroupAd();
$ad = $adGroupAd->getAd();

$ad->getFinalUrls();
$ad->getFinalAppUrls();
$ad->getFinalUrlSuffix();


Thanks,
Shweta Suthar

Shweta Suthar

unread,
Sep 26, 2022, 8:41:38 AM9/26/22
to Google Ads API and AdWords API Forum
++ 
we're using PHP Client Library.

Google Ads API Forum Advisor

unread,
Sep 26, 2022, 10:27:22 AM9/26/22
to shweta...@comfortclick.co.uk, adwor...@googlegroups.com
Hi Shweta,

Thank you for reaching out to us.

Moving forward, you may get the Ad details by using the ad_group_ad report. I would suggest you use this builder to freely see the ad_group_ad selectable fields in the “Choose a Clause to Select From” section.

Sample query:
Select ad_group_ad.ad.app_ad.headlines, ad_group_ad.ad.app_ad.descriptions, ad_group_ad.ad.final_urls, ad_group_ad.ad.display_url, ad_group_ad.ad.final_url_suffix from ad_group_ad

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2egPyt:ref

Shweta Suthar

unread,
Sep 28, 2022, 2:04:06 AM9/28/22
to Google Ads API and AdWords API Forum
Hi Heidi,

Thanks for the update.

we're getting value like  Google\Protobuf\Internal\RepeatedField Object in below fields and for some fields there is no value.

[0] => Array ( [AdGroupId] => 124569254134 [Status] => ENABLED [ApprovalStatus] => APPROVED [Labels] => Google\Protobuf\Internal\RepeatedField Object [BaseCampaignId] => customers/9261908840/campaigns/14258668494 [Id] => 538853502622 [HeadlinePart1] => Delay Spray for Men [HeadlinePart2] => Secret To Lasting Longer [DisplayUrl] => [FinalUrls] => Google\Protobuf\Internal\RepeatedField Object [FinalMobileUrls] => Google\Protobuf\Internal\RepeatedField Object [FinalAppUrls] => Google\Protobuf\Internal\RepeatedField Object [TrackingUrlTemplate] => [FinalUrlSuffix] => [UrlCustomParameters] => Google\Protobuf\Internal\RepeatedField Object [Type] => EXPANDED_TEXT_AD [DevicePreference] => 0 [SystemManagedEntitySource] => 0 )

Could you please help us to get that values.

Thanks,
Shweta Suthar

Google Ads API Forum Advisor

unread,
Sep 28, 2022, 11:01:24 AM9/28/22
to shweta...@comfortclick.co.uk, adwor...@googlegroups.com

Hi Shweta,

Thanks for getting back to us.

Since you mentioned that some fields have no value, could you help us to understand what field values are you expecting to be retrieved in the API response? Also, could you please enable logging on your end so Analyzing the API request and response will be easier? We would require complete request and response logs with the request-id, so that we can check better.

If in case API response is not pulling values of fields but you are able to see in Ads UI, then you may send us the Ads UI screenshot showing discrepancies that the data exists on UI and API is not pulling so that we can investigate further. Kindly provide the requested details via reply privately to author option if responding via Forum thread.

Regards,

Google Logo
Yasar
Google Ads API Team
 


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