How to upload video to use it with Performance Max Campaigns. (YOUTUBE_VIDEO)

5,261 views
Skip to first unread message

Mohamed Samir

unread,
Jun 12, 2023, 9:49:08 PM6/12/23
to Google Ads API and AdWords API Forum
I'm trying to Create a Performance Max Campaign with Google Ads API, but I can not see any documentation for the part of uploading video to youtube to use it as an Asset (YOUTUBE_VIDEO). So my first question is how to achieve that.

The second question is: How to allow my customers to fetch the videos from their accounts that were previously used in other campaigns or just exist on their accounts?
This feature exists in the Ads Manager UI but I couldn't find any documentation to it.

Google Ads API Forum Advisor

unread,
Jun 16, 2023, 12:07:37 PM6/16/23
to gm.moha...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to Google Ads API Forum.

But I can not see any documentation for the part of uploading video to youtube to use it as an Asset (YOUTUBE_VIDEO). So my first question is how to achieve that.
>> As per this guide (https://developers.google.com/google-ads/api/docs/performance-max/assets#ensure_minimum_asset_requirements_are_met) about asset requirements in Performance Max campaigns, YOUTUBE_VIDEO is a supported asset type that can be added in Performance Max campaigns. You may try following the code example shown in the guide, but replace the setTextAsset in the code example to setYoutubeVideoAsset and let us know how it goes.



How to allow my customers to fetch the videos from their accounts that were previously used in other campaigns or just exist on their accounts?

>> Can you confirm if this feature is available in Google Ads UI? If yes, can you share to us the Google Ads UI screenshot (without cropping) of the data you are trying to retrieve via Google Ads API? This is so we can check better and provide more appropriate answers accordingly. You can provide it via the Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

 
This message is in relation to case "ref:_00D1U1174p._5004Q2mCHKq:ref"

Thanks,
 
Google Logo Google Ads API Team


Krishna K

unread,
Aug 2, 2023, 12:34:18 PM8/2/23
to Google Ads API and AdWords API Forum
On Friday, June 16, 2023 at 12:07:37 PM UTC-4 Google Ads API Forum Advisor wrote:

Hi,

Thank you for reaching out to Google Ads API Forum.

But I can not see any documentation for the part of uploading video to youtube to use it as an Asset (YOUTUBE_VIDEO). So my first question is how to achieve that.
>> As per this guide (https://developers.google.com/google-ads/api/docs/performance-max/assets#ensure_minimum_asset_requirements_are_met) about asset requirements in Performance Max campaigns, YOUTUBE_VIDEO is a supported asset type that can be added in Performance Max campaigns. You may try following the code example shown in the guide, but replace the setTextAsset in the code example to setYoutubeVideoAsset and let us know how it goes.

I'm facing the same problem. The original question was how to upload a video to YouTube to use it as an Asset of type YOUTUBE_VIDEO when creating the campaign. I'm assming in order to use the setYouTubeVideoAsset function, you'd need an asset of type https://developers.google.com/google-ads/api/reference/rpc/v14/YoutubeVideoAsset. How do we create one of those programatically?

Google Ads API Forum Advisor

unread,
Aug 2, 2023, 3:15:19 PM8/2/23
to krish...@gmail.com, adwor...@googlegroups.com

Hi Krishna,

Thanks for posting your query on this forum thread.

You may use AssetService.MutateAssets request and use the asset_data with YoutubeVideoAsset fields. Please be noted that the this asset type does not support uploading youtube video. You need youtube_video_title and youtube_video_id only. For client library example, you may check this sample code example but this sample is for image assets. For the REST, you may refer to this API explorer.

I hope this helps. 

Krishna K

unread,
Aug 2, 2023, 5:19:08 PM8/2/23
to Google Ads API and AdWords API Forum
Thanks for the prompt response. However, it doesn't answer the question fully. Is there a way to upload a video to YouTube through the API first? I'm clear on how AssetService.MutateAssets works once I have youtube_video_title and youtube_video_id. But how do I upload to YouTube programatically and get those in the first place?

Google Ads API Forum Advisor

unread,
Aug 2, 2023, 6:44:27 PM8/2/23
to krish...@gmail.com, adwor...@googlegroups.com

Hi Krishna,

Kindly note that to upload a video to YouTube, you may need to use the YouTube Data API v3 and not a Google Ads API. For further information on uploading a video to YouTube, you may also reach YouTube Data API support team via this link.

Feel free to get back to us with any questions related to the Google Ads API. 

Krishna Kottamasu

unread,
Aug 2, 2023, 11:28:58 PM8/2/23
to Google Ads API Forum Advisor, adwor...@googlegroups.com
Thank you for your response..that clarified it.

Google Ads API Forum Advisor

unread,
Aug 3, 2023, 2:36:07 AM8/3/23
to krish...@gmail.com, adwor...@googlegroups.com

Hi Krishna,

Thank you for the reply.

If you have additional questions that are specific to the Google Ads API (https://developers.google.com/google-ads/api/docs/start), feel free to send those over to our team in a new thread, and we would be happy to assist you further.
 

Reply all
Reply to author
Forward
0 new messages