Campaign - Asset Level Data - Using API

42 views
Skip to first unread message

Ethinos DM

unread,
Sep 1, 2023, 8:24:18 AM9/1/23
to Google Ads API and AdWords API Forum

Hello Team,

We want below data using API.

We want to fetch campaign asset-level data (like images and YouTube videos, which are assets) and also want to fetch how particular assets are performing according to a particular date range.

So, in the meantime, we want to fetch all asset data, including their performance , impressions and spends date-wise.

Ethinos DM

unread,
Sep 1, 2023, 8:39:16 AM9/1/23
to Google Ads API and AdWords API Forum
Screenshot from 2023-09-01 18-07-40.png


We want above data using API .

Google Ads API Forum Advisor

unread,
Sep 1, 2023, 10:37:41 AM9/1/23
to ethinos....@gmail.com, adwor...@googlegroups.com

Hello,

Greetings from the Google Ads API Team.

With regards to your concern, can you please confirm if the sample GAQL query for the Google Ads API below is of help towards your concern?

Sample Query:

SELECT 
  asset.youtube_video_asset.youtube_video_id, 
  asset.youtube_video_asset.youtube_video_title, 
  campaign.id, 
  asset.image_asset.full_size.height_pixels, 
  asset.image_asset.file_size, 
  asset.image_asset.full_size.url, 
  asset.image_asset.full_size.width_pixels, 
  metrics.clicks, 
  metrics.ctr, 
  metrics.impressions, 
  metrics.all_conversions_value 
FROM ad_group_ad_asset_view 
WHERE 
  asset.id = <INSERT_ASSET_ID_HERE> 
  AND campaign.id = <INSERT_CAMPAIGN_ID_HERE>
  AND segments.date BETWEEN 'YYYMMDD' AND 'YYYMMDD

Please note that you may modify the fields present in the WHERE clause to query specific data, please refer to this query builder for more information(https://developers.google.com/google-ads/api/fields/v14/ad_group_ad_asset_view_query_builder).

I hope this information helps you. 

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

Thanks,
 
Google Logo Google Ads API Team


Ethinos DM

unread,
Oct 4, 2023, 2:32:16 AM10/4/23
to Google Ads API and AdWords API Forum
Thank you this is very helpful ! :)

Ethinos DM

unread,
Oct 4, 2023, 2:50:17 AM10/4/23
to Google Ads API and AdWords API Forum
Also, I have one question: how can we print the below values in PHP?
 
1. asset.callout_asset.end_date
2. asset.callout_asset.start_date
 
For asset.id, we are using $googleAdsRow->getAsset()->getId() to print that value, but where do we find out exactly which function we have to call? For the above callout_asset, I didn't get an exact function to print the values.
 
 
 
Reply all
Reply to author
Forward
0 new messages