TrendyT
TrendyT

Reputation: 429

Query for venues with radius

I'm running a query to search for venues using the radius value. In the case that I search for venues with a radius of 1000 (meters) I do know that the output displays a maximum of 50 top venues. How are these venues selected?

Upvotes: 1

Views: 608

Answers (1)

Jonathan Levison
Jonathan Levison

Reputation: 2617

[This information comes from experimenting with the foursquare API..]
It depends on the query, looking in the locations query api documentation at the intent parameter:

  1. If you are authenticated (using the users OAuth) then you can get results optimized to the user from the foursquare platform [intent=checkin]
  2. As you are using the radius, you probably should be using [intent=browse] to get the venues in the region (most relaxed search, get more generic results)
  3. You might also be looking for something specific, in this case look at [intent=match]

What I did is just re-capped whats written there..

To answer your question:

It depends if you are authenticated or not, but if not it will return the top 50 (most popular) in the radius you gave it. (we did not play with it too much when you are authenticated, not sure how it behaves then)

So for example with intent=browse, searching around any urban lat/lng with radius=1000 will return some 50 results, then expanding to radius=2000, if a multiplex/mall is now in range (popular as many check-in there), it will replace one of the results displayed before. So you get part of the old 50 + new, more popular results in the new radius => the top 50 in your current radius

Also, the most popular is displayed first in the result set.

Upvotes: 1

Related Questions