Fetching Asset Attributes and Metrics

Asset attributes

You can get a list of assets and their attributes by sending a Search Ads 360 Query Language query to the SearchAds360Service. Assets are represented by the asset entity, which exposes a number of asset-specific fields.

The following query lists all assets in an advertiser's account along with their resource name and type.

SELECT
  asset.id,
  asset.name,
  asset.resource_name,
  asset.type
FROM asset

Note that there are type-specific attributes that you could add to the above query to read properties specific to assets such as SitelinkAsset or MobileAppAsset.

For example, the following query lists the mobile app IDs for all MobileAppAsset objects in an account by filtering the asset.type value for MobileAppAsset.

SELECT
  asset.id,
  asset.name,
  asset.resource_name,
  asset.mobile_app_asset.app_store
FROM asset
WHERE asset.type = 'MOBILE_APP'

Asset metrics

Asset metrics are made available through a few resources:

With these resources, asset metrics can be queried at each respective level. For instance, when querying the ad_group_asset resource, the ad_group.id field can be used to segment the results, thereby retrieving metrics for each unique combination of ad_group and asset:

SELECT
  ad_group.id,
  asset.id,
  metrics.clicks,
  metrics.impressions
FROM ad_group_asset
WHERE segments.date DURING LAST_MONTH
ORDER BY metrics.impressions DESC