'Foursquare API Venues/Explore Radius and Limit Parameter issue
I'm having issues with venues/explore?
results.
I'm exploring some neighborhoods in Seattle. In some requests the API is returning as much as 30 venues when parameters are set to LIMIT=10
and the RADIUS=500
.
I understand the ultimately this results are a no brainer for what I'm trying to achieve. I just wanna make sure I'm using the API properly.
i.e. It looks like the API is not respecting the set limit used in the parameter.
What am I doing wrong?!
Below are the parameters and request:
CLIENT_SECRET=
CLIENT_ID=
VERSION = '20180604'
RADIUS = 500
LIMIT = 10
x_lat = str(fs_coord_df.loc[0,'Latitude'])
x_lng = str(fs_coord_df.loc[0, 'Longitude'])
url = 'https://api.foursquare.com/v2/venues/explore?client_id={}&client_secret={}&v={}&radius={}&limit{}&ll={},{}'.format(CLIENT_ID, CLIENT_SECRET, VERSION, RADIUS, LIMIT, x_lat,x_lng)
request = requests.get(url).json()
print(len(request['response']['groups'][0]['items']))
print(request['response']['groups'][0]['items'])
Thanks in advance.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|