You can retrieve key performance metrics for your products participating in the Youtube Affiliate Program 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, and targeted campaigns.
You can use Merchant Center 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 role that grants access to performance metrics.
- Your Google Merchant Center account participates in the Youtube Affiliate Program.
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.
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.
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:
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.
This view aggregates metrics by individual YouTube videos and includes
video titles and IDs.
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
method:
SELECT title, video_id, gross_sales, net_sales, 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, and key metrics for the
top 3 videos ranked by the total number of views in the
specified date range.
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.
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:
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 most sold products
To understand which products have the most sales, you can query the
youtube_product_sold_stats_view.
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:
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.
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:
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.
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:
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.
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:
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.
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:
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
dateusingWHEREclauses to specify the reporting period. Dates are inYYYY-MM-DDformat. - Required filters: Some campaign views require additional filters in the
WHEREclause:youtube_individual_campaign_stats_view:campaign_idanddate.youtube_campaign_videos_stats_view:campaign_id,channel_id, anddate.youtube_campaign_products_stats_view:campaign_idanddate.
- Latency: The latency of queries depends on the volume of data requested. Queries that cover large data sets take longer and might cause timeouts.