Understanding filters#
Overview#
Filters allow for unwanted data to be omitted, leaving only the relevant data. This is useful when you only want data for a specific demographic, or in some cases, when setting what type of information you want. The vast majority of report types do not require you to provide a filter, though many report types can accept multiple filters.
Valid filters#
The table of supported filters and their possible values, sorted in alphabetical order by filter:
Filter |
Possible values |
---|---|
adType |
|
ageGroup |
|
audienceType |
|
channel |
Any channel ID |
claimedStatus |
|
continent |
|
country |
Any ISO 3166-1 alpha-3 country code |
day |
Any day in YYYY-MM-DD format |
deviceType |
|
elapsedVideoTimeRatio |
Any value (to a maximum of two significant figures) between 0.01 and 1 inclusive |
gender |
|
group |
Any group ID |
insightPlaybackLocationDetail |
Not specified |
insightPlaybackLocationType |
|
insightTrafficSourceDetail |
|
insightTrafficSourceType |
|
isCurated |
|
liveOrOnDemand |
|
month |
Any month in YYYY-MM format |
operatingSystem |
|
playlist |
Any playlist ID |
province |
Any ISO 3166-2 alpha-3 subdivision code |
sharingService |
|
subContinent |
|
subscribedStatus |
|
uploaderType |
|
video |
Any video ID |
youtubeProduct |
|
- 1
This value can only be used from 11 Aug 2022.
For more information about what each filter does, look at the official documentation.
Important filters#
isCurated
#
To get information on playlists, this value needs to be set to 1
(as a string). If this is not provided, information on videos will be collected instead.
filters={"isCurated": "1"}
Special cases#
country
#
This must be set to one of the following values when province
is provided as a dimension:
US
insightPlaybackLocationType
#
This must be set to one of the following values when insightPlaybakLocationDetail
is provided as a dimension:
EMBEDDED
insightTrafficSourceType
#
This must be set to one of the following values when insightTrafficSourceDetail
is provided as a dimension:
ADVERTISING
CAMPAIGN_CARD
END_SCREEN
EXT_URL
NOTIFICATION
RELATED_VIDEO
SUBSCRIBER
YT_CHANNEL
YT_OTHER_PAGE
YT_SEARCH
video
#
Normally, this filter can accept a comma-separated list of video IDs. This is not the case when elapsedVideoTimeRatio
is provided as a dimension.