Is there a field for knowing if the youtube channel is verified from the Youtube API?
Categories:
Detecting Verified YouTube Channels via the YouTube Data API
Explore how to programmatically identify verified YouTube channels using the YouTube Data API, understanding its limitations and alternative approaches.
When working with the YouTube Data API, a common requirement is to determine if a specific channel is 'verified'. This verification status, often indicated by a checkmark next to the channel name on YouTube, signifies that the channel belongs to an official creator, artist, or company. However, directly querying for a 'verified' field in the API response isn't as straightforward as one might hope. This article delves into the nuances of identifying verified channels and provides practical guidance for developers.
Understanding YouTube Channel Verification
YouTube's verification badge serves to distinguish official channels from others. Historically, there were different criteria and types of verification (e.g., 'verified' for channels with 100k+ subscribers and 'official artist channel' for musicians). As of late 2019, YouTube updated its policy, and the verification badge is now primarily for channels that are public figures, artists, or brands, regardless of subscriber count, provided they meet certain authenticity criteria. The key takeaway for API users is that this status is not explicitly exposed as a boolean field in the standard channel resource.
flowchart TD A[YouTube Channel] --> B{Is it Verified?} B -- No direct API field --> C[API Channel Resource] C --> D{Snippet Part} C --> E{Statistics Part} D -- Contains 'customUrl', 'title' --> F[Infer Verification (Indirectly)] E -- Contains 'subscriberCount' --> F F -- No definitive 'isVerified' field --> G[Manual Check / Heuristics]
Flowchart illustrating the indirect nature of checking YouTube channel verification via API.
API Fields and Their Limitations
The YouTube Data API provides extensive information about channels through the channels
resource. When you make a channels.list
request, you can specify various part
parameters like snippet
, statistics
, brandingSettings
, etc. Let's examine the relevant fields and why they don't directly provide a 'verified' status:
{
"kind": "youtube#channelListResponse",
"etag": "...",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
},
"items": [
{
"kind": "youtube#channel",
"etag": "...",
"id": "UC_x5XG1OV2P6wMqysIDanWA",
"snippet": {
"title": "Google Developers",
"description": "...",
"customUrl": "@GoogleDevelopers",
"publishedAt": "2007-08-23T00:00:00Z",
"thumbnails": {
"default": { ... },
"medium": { ... },
"high": { ... }
}
},
"statistics": {
"viewCount": "...",
"subscriberCount": "...",
"hiddenSubscriberCount": false,
"videoCount": "..."
}
}
]
}
Example channels.list
API response for a channel.
As you can see from the example above, there is no explicit isVerified: true
or similar field within the snippet
or statistics
parts. The brandingSettings
part also doesn't contain this information. This means you cannot directly query the API to filter or identify verified channels.
statistics.subscriberCount
) to infer verification is unreliable. YouTube's verification criteria changed, and many channels with fewer than 100,000 subscribers can be verified if they represent a public figure, artist, or brand.Alternative Approaches and Heuristics
Since the API doesn't offer a direct field, developers must resort to indirect methods. Here are a few strategies, along with their caveats:
1. Manual Inspection (for small datasets)
For a limited number of channels, the most accurate method is to manually visit each channel's YouTube page and visually check for the verification badge. This is obviously not scalable for large-scale applications.
2. Scraping (not recommended)
Some developers might consider scraping YouTube's web pages to look for the verification badge in the HTML. This approach is against YouTube's Terms of Service, highly fragile (prone to breaking with UI changes), and resource-intensive. It is strongly discouraged.
3. Heuristics (least reliable)
You could try to infer verification based on other channel attributes, such as a very high subscriber count, a customUrl
being present, or a very high number of views. However, these are merely indicators and not definitive proof of verification. Many unverified channels have high subscriber counts, and not all verified channels have custom URLs.
4. Official Artist Channels (specific case)
For music artists, YouTube offers 'Official Artist Channels'. While not a general 'verified' status, the API does provide a way to identify these. If a channel is an Official Artist Channel, the brandingSettings.channel.unsubscribedTrailer
field might contain a specific video ID, or you might find clues in the brandingSettings.channel.keywords
or brandingSettings.channel.featuredChannelsTitle
if they are configured in a specific way. However, this is not a universal solution for all verified channels.
brandingSettings
part of the channels
resource for potential indicators of an 'Official Artist Channel', which is a form of verification for musicians.Conclusion and Best Practices
As of now, the YouTube Data API does not expose a direct field to determine if a channel is 'verified'. This design choice likely stems from the dynamic and subjective nature of YouTube's verification process, which involves human review and policy adherence beyond simple metrics. Developers should be aware of this limitation and avoid building features that strictly depend on programmatic verification status. If this feature is critical for your application, consider submitting a feature request to the YouTube API team, but be prepared for the possibility that it may not be implemented due to policy or technical constraints.