# 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](https://developers.google.com/search-ads/reporting/query/query-language) to the SearchAds360Service.
Assets are represented by the [`asset`](https://developers.google.com/search-ads/reporting/api/reference/fields/v0/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`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.common#unifiedsitelinkasset) or
[`MobileAppAsset`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.common#mobileappasset).

For example, the following query lists the mobile app IDs for all
[`MobileAppAsset`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.common#mobileappasset) objects in an account by
filtering the [`asset.type`](https://developers.google.com/search-ads/reporting/api/reference/fields/v0/asset#asset.type) value for
[`MobileAppAsset`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.common#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:

- [`ad_group_asset`](https://developers.google.com/search-ads/reporting/api/reference/fields/v0/ad_group_asset)
- [`campaign_asset`](https://developers.google.com/search-ads/reporting/api/reference/fields/v0/campaign_asset)
- [`customer_asset`](https://developers.google.com/search-ads/reporting/api/reference/fields/v0/customer_asset)

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