In v2 of the youtube api, I could get the country of a channel by getting it\'s user information (https://gdata.youtube.com/feeds/api/users/userId) and looking at the Locati
The only workaround is using guideCategories.
You can list guideCategories by region.
Then in your channels->list call you can plug that category ids.
The regionCode
parameter DOES NOT do what you're thinking :)
It just sends back videos that ARE AVAILABLE in that country, not the one PUBLISHED in the country.
It appears V2 of the API has finally been shut down.
Has anyone managed to come up with a workaround for this since V3 of the API does not support it ?
I have read through the API docs and while there does appear to be fields available for this data (snippet.country) it doesn't seem to be populated in the vast majority of channels.
What I require is to find the general region (country) that the channel / Video is associated with. Nothing more fine grained than that.
As this answer suggests, do a Search: list
and filter by region code.
If you want to know country info of a channel where it is located , it can be get via channel list API by using following code you can get a channel's country if it has mentioned in its ABOUT Section .
id = 'Enter_your_channel_id_here'
url = 'https://www.googleapis.com/youtube/v3/channels?part=snippet,statistics&id=' + str(id)
channel_url = url + '&key=' + str(key)
raw_json = requests.get(channel_url).text
dataa = json.loads(raw_json)
channel_country = dataa['items'][0]['snippet']['country']
this code will return country code of a specific channel, and by doing some google research you can obtain country names easily for country code. Thanks!