You can retrieve key performance metrics for your products participating in the
[Youtube Affiliate Program](https://support.google.com/merchants/answer/14815513)
using the Reporting sub-API. This guide explains how to query
YouTube-specific affiliate data, such as sales, commissions, orders, views, and
clicks, attributed to different creators, video content, individual products,
product categories, and targeted campaigns.

Your use of Youtube Affiliate Program APIs and associated data must comply
with the
[YouTube Shopping developer policies](https://developers.google.com/merchant/api/policies/youtube-shopping-developer-policies).

You can use
[Merchant Center Query Language](https://developers.google.com/merchant/api/guides/reports/query-language)
(MCQL) to select metrics and dimensions from dedicated Youtube Affiliate
views, which function like tables in your queries.

## Prerequisites

Before using this guide, ensure that:

- The account used to authenticate API calls has the [Performance and insights](https://support.google.com/merchants/answer/12160472) role that grants access to performance metrics.
- Your Google Merchant Center account participates in the [Youtube Affiliate Program](https://support.google.com/merchants/answer/14815513).

> [!WARNING]
> **Experimental:** The Youtube Affiliate performance views in the Merchant Reporting sub-API are in an Alpha release. Features and functionality are subject to change, and may be updated or discontinued.

## Query the alpha endpoint

Because this feature is in public alpha, the endpoint differs. To retrieve
Youtube Affiliate performance data, you need to send the POST request to
the `v1alpha` endpoint. For more information about retrieving reports, see
[`accounts.reports.search`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports/search).
Here's a sample request:

### HTTP

    POST https://merchantapi.googleapis.com/reports/v1alpha/accounts/{ACCOUNT_ID}/reports:search

    {
      "query": "SELECT title, channel_id, gross_sales, net_sales, commissions, orders, clicks, views FROM youtube_creator_performance_view WHERE date >= '2025-05-01' AND date < '2025-05-02' ORDER BY gross_sales DESC LIMIT 3"
    }

### cURL

      curl -X POST \
      'https://merchantapi.googleapis.com/reports/v1alpha/accounts/{ACCOUNT_ID}/reports:search?key={YOUR_API_KEY}' \
      --header 'Authorization: Bearer {YOUR_ACCESS_TOKEN}' \
      --header 'Accept: application/json' \
      --header 'Content-Type: application/json' \
      --data '{
        "query": "SELECT title, channel_id, gross_sales, net_sales, commissions, orders, clicks, views FROM youtube_creator_performance_view WHERE date >= '\''2025-05-01'\'' AND date < '\''2025-05-02'\'' ORDER BY gross_sales DESC LIMIT 3"
      }' \
      --compressed

#### See performance by creator


To understand which YouTube creators are driving the most engagement and
sales, you can query the
[`youtube_creator_performance_view`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports#youtubecreatorperformanceview).
This view aggregates metrics by individual YouTube creators and includes
creator titles and channel IDs.


Here is an MCQL `SELECT` statement example you can use to get
the top 3 performing creators by sales **between May 1st and May 2nd, 2025**:

```sql
SELECT
  title,
  channel_id,
  gross_sales,
  net_sales,
  commissions,
  orders,
  clicks,
  views
FROM youtube_creator_performance_view
WHERE date >= '2025-05-01' AND date < '2025-05-02'
ORDER BY gross_sales DESC LIMIT 3
    
```


This query fetches the creator title, channel ID, and key performance
metrics for the top 3 creators ranked by the gross sales metric within the
specified date range.

#### See performance by content


To see which specific YouTube videos are performing best, you can query
the
[`youtube_content_performance_view`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports#youtubecontentperformanceview).
This view aggregates metrics by individual YouTube videos and includes
video titles and IDs. For marketplaces, include
`account_id` to break down performance by individual sub-seller
accounts. To view the commission amounts funded by
sub-sellers and the marketplace platform, include `seller_commissions` and
`platform_commissions`.


To retrieve the top 3 videos by views **between May 1st and May 2nd, 2025** ,
pass the following MCQL statement to the
[`accounts.reports.search`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports/search)
method:

```sql
SELECT
  title,
  video_id,
  account_id,
  gross_sales,
  net_sales,
  commissions,
  seller_commissions,
  platform_commissions,
  orders,
  clicks,
  views
FROM youtube_content_performance_view
WHERE date >= '2025-05-01' AND date < '2025-05-02'
ORDER BY views DESC LIMIT 3
    
```


This query retrieves the video title, video ID, sub-seller account ID
(`account_id`), total commissions (`commissions`),
seller-funded commissions (`seller_commissions`),
platform-funded commissions (`platform_commissions`), and other
key metrics for the top 3 videos ranked by the total number of
`views` in the specified date range. Note: You
cannot use `account_id` in the MCQL `WHERE` clause to
filter results.

#### See tagged products with most engagement


To understand which tagged products have the most engagement and sales,
you can query the
[`youtube_product_tagged_stats_view`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports#youtubeproducttaggedstatsview).
This view aggregates metrics by individual tagged products, including
their titles and offer IDs.


Here is an MCQL `SELECT` statement example you can use to get
the top 10 products by views **between January 20th and 21st, 2026**:

```sql
SELECT
  title,
  offer_id,
  tagged_creator_count,
  tagged_video_count,
  gross_sales,
  net_sales,
  commissions,
  views,
  clicks,
  impressions,
  orders,
  conversion_rate
FROM youtube_product_tagged_stats_view
WHERE date >= '2026-01-20' AND date < '2026-01-21'
ORDER BY views DESC LIMIT 10
    
```


This query retrieves the titles, tagged video count, and key metrics for
the top 10 products ranked by the total number of `views` in the
specified date range.

#### See performance by tagged product category


To understand which tagged product categories drive the most engagement
and sales, query the
[`youtube_product_category_tagged_stats_view`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports#youtubeproductcategorytaggedstatsview).
This view aggregates metrics by product category
(`product_type`) in your product taxonomy, including the
number of distinct creators and videos that tagged products in each
category.


Use the following MCQL `SELECT` statement to get the top
10 tagged product categories ranked by gross sales on
**September 1st, 2026**:

```sql
SELECT
  product_type,
  tagged_creator_count,
  tagged_video_count,
  gross_sales,
  net_sales,
  commissions,
  views,
  clicks,
  impressions,
  orders,
  conversion_rate
FROM youtube_product_category_tagged_stats_view
WHERE date = '2026-09-01'
ORDER BY gross_sales DESC
LIMIT 10
    
```


This query retrieves the product category (`product_type`),
tagged creator count, tagged video count, and key performance metrics
for the top 10 product categories ranked by `gross_sales` on
the specified date.

#### See most sold products


To understand which products have the most sales, you can query the
[`youtube_product_sold_stats_view`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports#youtubeproductsoldstatsview).


Here is an MCQL `SELECT` statement example you can use to get
the top 10 products ranked by gross sales **between January 20th and 21st, 2026**:

```sql
SELECT
  title,
  offer_id,
  gross_sales,
  net_sales,
  commissions,
  orders
FROM youtube_product_sold_stats_view
WHERE date >= '2026-01-20' AND date < '2026-01-21'
ORDER BY gross_sales DESC LIMIT 10
    
```


This query retrieves the sales data, commissions, and key metrics for
the top 10 products ordered by gross sales, in the specified date range.

#### See performance across all campaigns


To understand how your affiliate campaigns are performing overall, query
the
[`youtube_campaigns_stats_view`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports#youtubecampaignsstatsview).
This view aggregates metrics across all campaigns, including campaign
names, start and end dates, active creator counts, and sales and
engagement metrics.


Use the following MCQL `SELECT` statement to get the top 10
campaigns by orders on **April 23rd, 2026**:

```sql
SELECT
  campaign_id,
  campaign_name,
  start_date,
  end_date,
  active_creators,
  gross_sales,
  net_sales,
  commissions,
  views,
  clicks,
  impressions,
  orders,
  conversion_rate
FROM youtube_campaigns_stats_view
WHERE date = '2026-04-23'
ORDER BY orders DESC LIMIT 10
    
```


This query retrieves the campaign ID, campaign name, date range, active
creator count, and key performance metrics for the top 10 campaigns
ranked by the total number of `orders` on the specified date.

#### See campaign performance by creator


To analyze the performance of individual creators participating in a
specific campaign, query the
[`youtube_individual_campaign_stats_view`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports#youtubeindividualcampaignstatsview).
This view aggregates metrics per creator within a campaign, including
channel titles, video counts, and tagged product titles.


Use the following MCQL `SELECT` statement to get the top 10
creators by views for a specific campaign on **April 23rd, 2026**:

```sql
SELECT
  channel_title,
  video_count,
  product_titles,
  gross_sales,
  net_sales,
  commissions,
  views,
  clicks,
  impressions,
  orders,
  conversion_rate
FROM youtube_individual_campaign_stats_view
WHERE date = '2026-04-23'
  AND campaign_id = 'YOUR_CAMPAIGN_ID'
ORDER BY views DESC LIMIT 10
    
```


This query retrieves the creator channel title, video count, product
titles, and key performance metrics for the top 10 creators ranked by
total views within the specified campaign and date.

#### See campaign performance by video


To see how specific creator videos are performing within a campaign, query
the
[`youtube_campaign_videos_stats_view`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports#youtubecampaignvideosstatsview).
This view provides video-level performance metrics for a creator in a
campaign, including video titles, video formats, and tagged products.


Use the following MCQL `SELECT` statement to get the top 10
videos by views for a specific creator and campaign on **May 20th, 2026**:

```sql
SELECT
  video_title,
  content_type,
  product_titles,
  gross_sales,
  net_sales,
  commissions,
  views,
  clicks,
  impressions,
  orders,
  conversion_rate
FROM youtube_campaign_videos_stats_view
WHERE date = '2026-05-20'
  AND campaign_id = 'YOUR_CAMPAIGN_ID'
  AND channel_id = 'YOUR_CHANNEL_ID'
ORDER BY views DESC LIMIT 10
    
```


This query retrieves the video title, video format (`content_type`),
tagged product titles, and key performance metrics for the top 10 videos
ranked by the total number of `views` for the specified creator
channel, campaign, and date.

#### See campaign performance by product


To understand how individual products are performing within a campaign,
query the
[`youtube_campaign_products_stats_view`](https://developers.google.com/merchant/api/reference/rest/reports_v1alpha/accounts.reports#youtubecampaignproductsstatsview).
This view provides product-level performance metrics within a campaign,
including product titles, associated video details, and sales metrics.


Use the following MCQL `SELECT` statement to get the top 10
products by views for a specific campaign on **June 20th, 2026**:

```sql
SELECT
  channel_title,
  product_title,
  video_title,
  video_url,
  gross_sales,
  net_sales,
  commissions,
  views,
  clicks,
  impressions,
  orders,
  conversion_rate
FROM youtube_campaign_products_stats_view
WHERE date = '2026-06-20'
  AND campaign_id = 'YOUR_CAMPAIGN_ID'
ORDER BY views DESC LIMIT 10
    
```


This query retrieves the creator channel title, product title, video
title, video URL, and key performance metrics for the top 10 products
ranked by the total number of `views` within the specified
campaign and date.

## Important considerations

- **Dates** : Always filter your queries by `date` using `WHERE` clauses to specify the reporting period. Dates are in `YYYY-MM-DD` format.
- **Required filters** : Some campaign views require additional filters in the `WHERE` clause:
  - `youtube_individual_campaign_stats_view`: `campaign_id` and `date`.
  - `youtube_campaign_videos_stats_view`: `campaign_id`, `channel_id`, and `date`.
  - `youtube_campaign_products_stats_view`: `campaign_id` and `date`.
- **Latency**: The latency of queries depends on the volume of data requested. Queries that cover large data sets take longer and might cause timeouts.