Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

How to pull a list of YT channels with a range of 1000 to 2000 subscribers

$
0
0

Using youtube API to try and get a list of youtube channels with a range of subscribers but I get an error of "Paramater 'order' value 'subscriberCount' is not an allowed value."

I am assuming that subscriberCount is not an actual parameter to search by in Youtube API? If this is the case how or what options would I have to try and get this information? I have the Youtube API with a key and have been trying to use jupyter and python to get data on individual YT channels (I am successful in this) but I am trying to compile lists of YT channels now by subscriber count and trying to get youtube ID.

I would not need the data to be organized by subscriber count (meaning small to large) just to return a list of YT channels that fit this one search field of having a subscriber count between x and x.

Have been trying the below sequence

api_service_name = "youtube"api_version = "v3"# Get credentials and create an API clientyoutube = build(api_service_name, api_version, developerKey=api_key)# Create a request to the YouTube APIrequest = youtube.channels().list(part='id,statistics',maxResults=50,order='subscriberCount',minSubscribers=1500,maxSubscribers=2000)# Execute the request and get the responseresponse = request.execute()# Extract the channel IDs from the responsechannel_ids = []for item in response['items']:channel_ids.append(item['id'])# Print the channel IDsprint(channel_ids)

Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>