You can get a list of assets and their attributes by sending a [Google Ads Query Language
(GAQL) query](https://developers.google.com/google-ads/api/docs/query/overview) to the
[`GoogleAdsService`](https://developers.google.com/google-ads/api/reference/rpc/v26/GoogleAdsService). Assets are represented by
the [`asset`](https://developers.google.com/google-ads/api/fields/v26/asset) entity, which exposes a number of asset-specific
fields.

## Asset attributes

The following GAQL query lists all assets in a Google Ads account along with
their resource name and type.

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

You can add type-specific attributes to this query to read properties
specific to assets such as [`ImageAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/ImageAsset) or
[`YoutubeVideoAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/YoutubeVideoAsset).

For example, the following query lists the YouTube video IDs for all
[`YoutubeVideoAsset`](https://developers.google.com/google-ads/api/reference/rpc/v26/YoutubeVideoAsset) objects in a Google Ads
account by filtering the [`asset.type`](https://developers.google.com/google-ads/api/fields/v26/asset#asset.type) value. See a
list of [possible `asset.type` values](https://developers.google.com/google-ads/api/fields/v26/asset#asset.type).

    SELECT
      asset.id,
      asset.name,
      asset.resource_name,
      asset.youtube_video_asset.youtube_video_id
    FROM asset
    WHERE asset.type = 'YOUTUBE_VIDEO'

## Asset metrics

Asset metrics are made available through a few resources:

- [`ad_group_asset`](https://developers.google.com/google-ads/api/fields/v26/ad_group_asset)
- [`campaign_asset`](https://developers.google.com/google-ads/api/fields/v26/campaign_asset)
- [`customer_asset`](https://developers.google.com/google-ads/api/fields/v26/customer_asset)

With these resources, you can query asset metrics at each respective level.
For example, when you query the `ad_group_asset` resource, you can use the
`ad_group.id` field 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

## Ad-level metrics

Key point: The [`ad_group_ad_asset_view`](https://developers.google.com/google-ads/api/fields/v26/ad_group_ad_asset_view) only
returns information for assets that are related to App ads, Demand Gen, and
responsive search ads.

Ad-level performance metrics for assets are aggregated in the
[`ad_group_ad_asset_view`](https://developers.google.com/google-ads/api/fields/v26/ad_group_ad_asset_view). This view collects
metrics for assets per individual ad. Thus, querying this view returns one row
per ad group and ad.

The [`ad_group_ad_asset_view`](https://developers.google.com/google-ads/api/fields/v26/ad_group_ad_asset_view) exposes the
view-specific attribute
[`performance_label`](https://developers.google.com/google-ads/api/reference/rpc/v26/AdGroupAdAssetView#performance_label) that
gives insight into the performance characteristics of this specific asset-ad
pairing. The following table enumerates the possible values of the
`performance_label` fields.

| `performance_label` | Description |
|---|---|
| `BEST` | Best performing assets. |
| `GOOD` | Good performing assets. |
| `LOW` | Worst performing assets. |
| `LEARNING` | The asset has started getting impressions but the stats are not statistically significant enough to get an asset performance label. |
| `PENDING` | This asset doesn't yet have any performance information. This may be because it is still under review. |
| `UNKNOWN` | Represents value unknown in this version. |
| `UNSPECIFIED` | Not specified. |

The following GAQL query returns impressions, clicks, costs, and conversions for
all assets in a Google Ads account during the last month, sorted by their
`performance_label`:

    SELECT
      ad_group_ad_asset_view.ad_group_ad,
      ad_group_ad_asset_view.asset,
      ad_group_ad_asset_view.field_type,
      ad_group_ad_asset_view.performance_label,
      metrics.impressions,
      metrics.clicks,
      metrics.cost_micros,
      metrics.conversions
    FROM ad_group_ad_asset_view
    WHERE segments.date DURING LAST_MONTH
    ORDER BY ad_group_ad_asset_view.performance_label

## Asset source

[`Asset.source`](https://developers.google.com/google-ads/api/reference/rpc/v26/AssetSourceEnum.AssetSource) is only accurate for [mutable](https://developers.google.com/google-ads/api/docs/assets/overview#asset-types-linked-to-customers-campaigns-and-ad-groups)
assets.

For the source of RSA assets use
[`ad_group_ad_asset_view.source`](https://developers.google.com/google-ads/api/fields/v26/ad_group_ad_asset_view#ad_group_ad_asset_view.source).