10

Looks like there is no official YouTube API to find list of YouTube networks or what channels are part of a given network. Any ideas how to find that information?

If there is no direct method, what algorithm does socialblade.com use get approximate listings?

amolk
  • 1,387
  • 13
  • 13
  • You didnt mean to get the channel the video belongs right? Something like this? http://stackoverflow.com/questions/12856445/get-xml-attribute-with-simplexml/12856747 – loQ Oct 12 '12 at 10:34

2 Answers2

10

I don't know if this is the way sites such as socialblade or channelmeter get the networked channels. But this is the way i did it.

Say i visit this video link: http://www.youtube.com/watch?v=_8AZT40gH5E

In the meta tags information of a networked channel, there is an attribute <meta name=attribution content=JamieOliver/> (As example) which actually specifies the network that channel belongs to. So what i did was one video from the channel i'm working with, and use a small function like this:

$tags = get_meta_tags("http://www.youtube.com/watch?v=_8AZT40gH5E");
echo $network = $tags['attribution'];

And you have the Network the channel is associated with.

Zy0n
  • 810
  • 2
  • 14
  • 33
3

It doesn't look like you can get this information using the v3 API at this time, but I believe what socialblade is calling networks is the content owner or 'Partner Name'.

In an API response, a feed entry contains a partner video if the entry contains a <media:credit> tag for which the value of the yt:type attribute is partner. <media:credit role='uploader' scheme='urn:youtube' yt:display='partner_name' yt:type='partner'>partner_name</media:credit>

Described here: https://developers.google.com/youtube/2.0/reference#Video_Feeds

It's probably just a matter of assigning channels which only contain videos by a distinct partner to that partner's 'network'. (Or just as likely any videos.)

Edit: Since that demonstrably appears not to be accurate, I'll point out that it appears the analytics API does have that information, but from the description it sounds like it only allows reports on channels your own "network". That being said, SocialBlade has to be getting their information about other networks from somewhere:

Content owners who participate in the YouTube Partner Program can also use the API to retrieve reports that aggregate Analytics data for all YouTube channels that are linked to their content owner account.

Kevin Stricker
  • 17,178
  • 5
  • 45
  • 71
  • hmm.. i don't think that it works like that. If you take "itsjerryandharry" channel from "SocialBlade" network, and get its videos: `curl "https://gdata.youtube.com/feeds/api/videos?v=2&author=itsjerryandharry&prettyprint=true&uploader=partner"` each video is going to include something like this `itsjerryandharry`. There is no mention of SocialBlade or whatever. – Milovan Zogovic Oct 18 '12 at 14:47
  • Well, clearly SocialBlade is a YouTube Partner. The other option is that they're using the [content owner reports](https://developers.google.com/youtube/analytics/v1/available_reports#Reports) which aren't available to the general public. It seems likely they'd nerf the public API if it ever did contain that information. It'd be good to get a "credible or official sources" confirmation on that though. – Kevin Stricker Oct 18 '12 at 15:22
  • @MilovanZogovic Channels like this won't reference the network name "Socialblade," but rather the CMS partner title (In this case "Maker Studios") – VCNinc May 06 '13 at 06:28