Nitendra
Nitendra

Reputation: 494

Foursquare Venue API returning empty venue list

I am working on the FourSquare venue API. The following API link was giving results until this morning at 3 AM:

https://api.foursquare.com/v2/venues/search?ll=-6.21944223,106.80315059&intent=browse&radius=30&client_id=XXXX&client_secret=XXXX&v=20180512&m=foursquare

but now there is an empty venue array with status code 200. There is no update on the developer website.

Please help me understand why this is happening. Thanks in advance.

Upvotes: 1

Views: 444

Answers (3)

Felipe Ferri
Felipe Ferri

Reputation: 3588

I had a similar problem with my app. Up until a couple of weeks ago we were able to make requests to the Foursquare api without specifying category ids. By doing this all place categories were considered. But now if you ommit categoryId no place is returned at all. I don't know if this is a bug on the Foursquare api or just a feature change (a VERY BREAKING change).

While we don't know the real answer, try adding a "categoryId" to your request, such as:

https://api.foursquare.com/v2/venues/search?
    client_id={YOUR_CLIENT_ID}
    &client_secret={YOUR_CLIENT_SECRET}
    &v=20130815&ll={LATITUDE},{LONGITUDE}
    &limit=50
    &intent=browse
    &radius=50
    &categoryId=4d4b7104d754a06370d81259,4d4b7105d754a06372d81259

(the indentation on the URL above is just for legibility, you should pass this URL as a single line when doing your request)

Upvotes: 1

Alper Dincer
Alper Dincer

Reputation: 1

Same thing happens to me. I've changed the API version (v) also without any

Upvotes: 0

Related Questions