how to access Google ads video metric data using Java API?

51 views
Skip to first unread message

mingxing shao

unread,
Aug 15, 2023, 4:30:39 AM8/15/23
to Google Ads API and AdWords API Forum
I want to access google ads video on YouTube video's metric, but response is empty.
How can I access google ads video metric?
My SQL is
SELECT metrics.video_quartile_p100_rate, metrics.video_quartile_p25_rate, metrics.video_quartile_p50_rate, metrics.video_quartile_p75_rate, video.channel_id, video.id, video.title, ad_group.id FROM video WHERE ad_group.id = 148689528701

but GoogleAdsRow list in Response is empty.

Google Ads API Forum Advisor

unread,
Aug 15, 2023, 6:40:54 AM8/15/23
to shaomi...@kuaishou.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to Google Ads API Forum.

In order for us to investigate further why you are getting empty results in the API, can you provide us with the complete API logs (request and response with request-id and request header) generated on your end? 

Additionally, can you also please share to us the whole Google Ads UI screenshot (without cropping with the CID shown) of the data in the UI you are trying to retrieve via API? This is so we can check on our end as well and provide more appropriate guidance accordingly.

For the Java client library, logging can be enabled by referring to this guide (https://developers.google.com/google-ads/api/docs/client-libs/java/logging). 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.

Reference links included in this email:

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

Thanks,
 
Google Logo Google Ads API Team


mingxing shao

unread,
Aug 15, 2023, 7:16:00 AM8/15/23
to Google Ads API and AdWords API Forum
Hi,
Thanks you for help me.
my Java code

1692097939193.jpg
Its result of execution is 0

request log detail is

SUCCESS REQUEST SUMMARY. Method: google.ads.googleads.v12.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: **********, RequestID: uFaERo1jnTmsZzE56RkmOw, ResponseCode: OK, Fault: null.

1692097884972.jpg

Google Ads API Forum Advisor

unread,
Aug 15, 2023, 9:50:41 AM8/15/23
to shaomi...@kuaishou.com, adwor...@googlegroups.com

Hi,

Thank you for getting back to us.

I noticed that you have redacted some parts of your UI screenshot. Please note that, for us to investigate further I would like to request that you provide us with an unredacted and uncropped screenshot of this Google Ads UI view.

You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com

With that being said, can you please try on your end if this sample query is of any help towards your concern?

Sample:

SELECT
asset.id,
asset.type,
asset.youtube_video_asset.youtube_video_title,
asset.youtube_video_asset.youtube_video_id,
metrics.clicks,
metrics.impressions,
metrics.ctr
FROM ad_group_ad_asset_view
WHERE 
  asset.id = <INSERT ASSET ID HERE>
Reply all
Reply to author
Forward
0 new messages