In this guide

Run a Report

Any metrics, split any way YouTube Analytics allows.

Action referenceRead

What this action does #

First, connect YouTube Analytics in Services. Then open Actions → + → YouTube Analytics and choose Run a Report.

More about this action

For what the other reports don't cover — views by country, by device, by traffic source, month by month. Each row is keyed by the dimension and metric names chosen: rows[0].views. Revenue metrics need a Partner Program channel.

Inputs to fill in #

Open an input to choose its value. Keep a fixed value with Text, receive it from Shortcuts, ask when the action runs, or use an Earlier Step. Read how input sources work.

Metrics

RequiredList

One or more numbers to report.

A list of choice values. Use a comma-separated list.

Choices: views, engagedViews, redViews, estimatedMinutesWatched, averageViewDuration, averageViewPercentage, subscribersGained, subscribersLost, likes, dislikes, comments, shares, estimatedRevenue, estimatedAdRevenue, cpm, playbackBasedCpm

Example value (replace with your own):
views

Split By

OptionalList

A row for each value. Empty gives one row of totals.

A list of choice values. Use a comma-separated list.

Choices: day, month, video, country, deviceType, operatingSystem, insightTrafficSourceType, subscribedStatus, liveOrOnDemand, youtubeProduct, creatorContentType

From

RequiredDate

The first day counted — a date, or words like 28 days ago.

Default: 28 days ago

Example value (replace with your own):
28 days ago

To

RequiredDate

The last day counted. The latest two or three days aren't in yet.

Default: today

Example value (replace with your own):
today

Only

OptionalText

Narrow the report — video==ID or country==US. Join several with ;.

Sort By

OptionalText

A dimension or metric; a leading - puts the biggest first. Splitting by video needs one.

Example value (replace with your own):
-views

How Many

OptionalWhole number

Most rows back. Splitting by video needs 200 or fewer.

Example value (replace with your own):
10

Currency

OptionalText

For revenue metrics. USD when empty.

Example value (replace with your own):
EUR

What comes back #

In the action editor, open Output → Returned Value to choose fields for your shortcut. These are the response fields described by the app; a service may omit an optional field or return an empty list. JSON File contains the full response.

Returned fieldTypeMeaning
rowsarrayA row per value of Split By, keyed by the names chosen.
columnHeadersarrayThe columns, in order.
columnHeaders[].namestringText value.
columnHeaders[].columnTypestringDIMENSION or METRIC.
columnHeaders[].dataTypestringSTRING, INTEGER or FLOAT.

Run it from Shortcuts #

  1. Give the action a recognizable name and tap Save.
  2. In Apple Shortcuts, add Shortcutify’s Execute Action and select the saved action.
  3. Supply any Param or File slots you bound in the inputs, then run the shortcut.

If the result is unexpected, open Logs in Shortcutify, select the run, and inspect this step’s inputs and response.

Advanced reference #

Request, permissions, and identifiers

Request: GET https://youtubeanalytics.googleapis.com/v2/reports

Action identifier: youtubeanalytics.reports.query.v1

Permissions declared for this action: https://www.googleapis.com/auth/youtube.readonly, https://www.googleapis.com/auth/yt-analytics.readonly. The account’s own access rules also apply.

InputRequest keyLocation
Metricsmetricsquery
Split Bydimensionsquery
FromstartDatequery
ToendDatequery
Onlyfiltersquery
Sort Bysortquery
How ManymaxResultsquery
Currencycurrencyquery

YouTube Analytics API reference