We're using Foursquare's venues API for Mobile app integration. We noticed that some gyms are not included into Foursquare response even if user's location is 20-30 meters away from the center.
Here is example. There is "Gates Fitness Center" in Denver. API request :
https://api.foursquare.com/v2/venues/search?ll=39.7524669,-105.0032014&intent=checkin&radius=50&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&v=20131118&categoryId=4bf58dd8d48988d175941735
Gym returned as expected if search radius is 50 meters.
Once search radius increased up to 3218 meters (2 miles) then "Gates Fitness Center" gym is not there:
https://api.foursquare.com/v2/venues/search?ll=39.7524669,-105.0032014&intent=checkin&radius=3218&client_id=<CLIENT_ID>&client_secret=<CLIENT_SECRET>&v=20131118&categoryId=4bf58dd8d48988d175941735
My understanding is intent=checkin
should prioritize venues by distance.
So my question is how to build API request to make sure ANY venues around appear in response?
Thank you!
To answer your question directly, it is specifically, and it appears purposefully, not possible to build a request that ensures any (or every) venue around a location appear in the response.
There is currently no way to prioritize a search for venues by their distance from a given location (latitude/longitude).
The way in intent=checkin
works is it returns a list of venues prioritized by the venue someone would most likely check-in at, given the location. There is not an exact algorithm stated in any foursquare documentation, but foursquare says that distance from the location AS WELL AS popularity of the venues factor into the order of the results.
I would also refer you to the answer and comments on this similar question: