Using Youtube API to try and get a list of Youtube channels with a range of subscribers but I get an error
Parameter '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 this code:
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)