Antonello Gatto
Antonello Gatto

Reputation: 1611

Foursquare API venues search returns empty venues

I'm writing an Android app using Foursquare APIs. I'm trying to make a request to this URL:

    String url = "https://api.foursquare.com/v2/venues/search?ll=16.31503,38.973039&"
        +"client_id="+CLIENT_ID+"&client_secret="+CLIENT_SECRET+"&limit=25&v="+date;

where date is formatted in YYYYMMDD. I actually have a response, but the venues array is empty:

{
    meta: {
        code: 200
    }
    notifications: [
       {
         type: "notificationTray"
         item: {
             unreadCount: 0
         }
       }
    ]
    response: {
        venues: [ ]
    }
}

Why is it empty?

Upvotes: 0

Views: 673

Answers (2)

Antonello Gatto
Antonello Gatto

Reputation: 1611

I confused longitude with latitude and vice versa. My mistake! Thank you (:

Upvotes: 0

octopi
octopi

Reputation: 2004

This is because there unfortunately isn't much in the area you're searching in. Take a look at the result from running the same search on the web: https://foursquare.com/explore?near=16.31503%2C38.973039 (zoom out a bit to see where there are results)

Upvotes: 1

Related Questions