Hi all im trying to make a simple python script that will return all videos created in a certain year near a ceratin latiude and longiute within 1km radius. however im getting this error saying Request contains an invalid argument when i use location paramter in the query.Anybody know how to fix this?
Request contains an invalid argument.
import googleapiclient.discoveryapi_service_name = "youtube"api_version = "v3"DEVELOPER_KEY = 'key'# API clientyoutube = googleapiclient.discovery.build( api_service_name, api_version, developerKey = DEVELOPER_KEY)request = youtube.search().list( part="id,snippet", type='video', videoDuration='short', videoDefinition='high', publishedAfter='2012-07-05T11:10:04Z', publishedBefore='2013-07-05T11:10:04Z', location='37.42307,-122.08427', locationRadius='1km')response = request.execute()for item in response['items']: # Getting the id vidId = item['id']['videoId'] # Getting stats of the video print("Publish date:",item ['snippet']['publishedAt'])