Search code examples
foursquare

FourSquare API returns venues that I have not called for


We are interested in producing a list of venues in an app that we are building. We call the FourSquare API for this, and we want it to return only venues that fit the parameters we specify in the call. We have specified that we want venues in the category "gay bar", within 100 meters of the coordinates that the call is made from.

When we make the call from coordinates in Oslo, the API returns one gay bar, but does not return two other gay bars that are within 100m of the coordinates (these are in FourSquare's database). Instead, the API returns a set of places that are not in the category we have specified (offices, convention centres, regular pubs, etc). We are obviously not interested in these venues - we are interested in the two venues that the API does not return.

The URL for the call is below. Please, if you can help me understand how to correct this, I would be very grateful.

Ben

https://api.foursquare.com/v2/venues/search?categoryIds=4bf58dd8d48988d1d8941735&ll=59.915286,10.740464&radius=100&limit=15&v=20210826&intent=browse


Solution

  • The documentation suggests that the parameter name is categoryId (not plural). Try that.