Fetch video asset thumbnail

593 views
Skip to first unread message

Tiana S.

unread,
Jun 13, 2022, 7:15:24 AM6/13/22
to Google Ads API and AdWords API Forum
Is it possible to fetch the thumbnail for video assets through the API?

When fetching the ad_group_ad resource, in-feed video ads are returned with the following adGroupAd fields filled:

"adGroupAd.resourceName":"customers/<customer-id>/adGroupAds/<adgroup-ad-id>",

"adGroupAd.status": "ENABLED",

"adGroupAd.ad.type": "IN_FEED_VIDEO_AD",

"adGroupAd.ad.videoAd.video.asset": "customers/<customer-id>/assets/<asset-id>",

"adGroupAd.ad.videoAd.inFeed.headline": "<headline>",

"adGroupAd.ad.videoAd.inFeed.description1": "<description 1>",

"adGroupAd.ad.videoAd.inFeed.description2": "<description 2>",

"adGroupAd.ad.videoAd.inFeed.thumbnail": "DEFAULT_THUMBNAIL",

"adGroupAd.ad.resourceName": "customers/<customer-id/ads/<ad-id>",

"adGroupAd.ad.id": "<ad-id>",

"adGroupAd.ad.finalUrls": [<Youtube-url>],

"adGroupAd.ad.trackingUrlTemplate": "{lpurl}",

"adGroupAd.ad.addedByGoogleAds": false,

"adGroupAd.ad.name": "<ad-name>",

"adGroupAd.adGroup": "customers/<customer-id>/adGroups/<adgroup-id>"

The thumbnail field (adGroupAd.ad.videoAd.inFeed.thumbnail) just describes the type of thumbnail, so I thought maybe I can use the asset resource that's returned (adGroupAd.ad.videoAd.video.asset) to fetch the video asset with a thumbnail.

But, there's no image field available for YouTube video assets it seems, only ID and video title: https://developers.google.com/google-ads/api/fields/v10/asset#asset.youtube_video_asset.youtube_video_id

And the other image_url fields available for assets don't return a URL for video assets...

Is there any way to fetch the thumbnail for video assets?

Thanks in advance!

Tiana

Google Ads API Forum Advisor

unread,
Jun 13, 2022, 10:13:38 AM6/13/22
to ti...@swydo.com, adwor...@googlegroups.com
Hi Tiana,

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

Could you please provide full screen screenshot of the UI of what you are looking for, so that i can further investigate the issue? Please reply via privately author option.

Thanks,
Google Logo
Nirmita
Google Ads API Team
 


ref:_00D1U1174p._5004Q2bvkCb:ref

Tiana S.

unread,
Jun 13, 2022, 11:08:54 AM6/13/22
to Google Ads API and AdWords API Forum
Thanks Nirmita! Sent the screenshot privately.
Let me know if more info is needed!

Google Ads API Forum Advisor

unread,
Jun 14, 2022, 6:40:45 AM6/14/22
to ti...@swydo.com, adwor...@googlegroups.com
Hi Tiana,

Thank you for providing the requested information.

Upon searching for possible fields in the Google Ads API, I found this ad_group_ad.ad.video_ad.in_feed.thumbnail. With this, you may try this field ad_group_ad.ad.video_ad.in_feed.thumbnail to know what the thumbnail is currently in use by your ad. Let me know what goes after.

Best regards,
Google Logo
Jinky
Google Ads API Team
 


ref:_00D1U1174p._5004Q2bvkCb:ref

Tiana S.

unread,
Jun 14, 2022, 7:41:11 AM6/14/22
to Google Ads API and AdWords API Forum
Hi Jinky,

Thanks for getting back to me! 

That is one of the fields I also showed in my initial message:

"adGroupAd.ad.videoAd.inFeed.thumbnail": "DEFAULT_THUMBNAIL",

Unfortunately, that field returns an enum of the type of thumbnail (DEFAULT_THUMBNAIL, THUMBNAIL_1, THUMBNAIL_2, THUMBNAIL_3) that's show but not an actual reference to the thumbnail itself.
I need the actual image that is used by the ad. Is there any way to fetch that?

Thank you,

Tiana

Google Ads API Forum Advisor

unread,
Jun 14, 2022, 9:28:47 AM6/14/22
to ti...@swydo.com, adwor...@googlegroups.com
Hi Tiana,

This stackoverflow article about using Youtube Id for every type of URL may be of assistance - https://stackoverflow.com/a/2068371. I tried some and they work just using the 11 letter Id from “asset.youtube_video_asset.youtube_video_id”.

For example, the 11 letter Id can be placed in the regular Youtube url starting "https://www.youtube.com/watch?v=" you can add to the end "B5PylOONGww" for the result - https://www.youtube.com/watch?v=B5PylOONGww and you can see a Google Ads tutorial. The default high quality image is https://img.youtube.com/vi/B5PylOONGww/hqdefault.jpg. I can guess this works for all Youtube videos.

Please get back to us.

Regards,
Google Logo
Aryeh
Google Ads API Team
 


ref:_00D1U1174p._5004Q2bvkCb:ref

Tiana S.

unread,
Jun 15, 2022, 3:04:54 AM6/15/22
to Google Ads API and AdWords API Forum
Hi Aryeh,

Awesome, that works like a charm. Thank you so much for your help! 

Best,

Tiana

Google Ads API Forum Advisor

unread,
Jun 15, 2022, 3:11:21 AM6/15/22
to ti...@swydo.com, adwor...@googlegroups.com

Hi Tiana,

Thank you for the reply.

If you have additional questions regarding the topic being discussed in this thread, feel free to send those over to our team and we would be happy to assist you further.

Best regards,

Google Logo
Heidi
Google Ads API Team
 


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