FourSquare API returns venues that I have not called for - foursquare

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

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

Related

Instagram API - FACEBOOK_PLACES_ID

I wrote a mini instagram wordpress plugin for my cafe's website that shows the photos taken there on our homepage. You can see it in action here: dem-istanbul.com
However, since instagram now uses facebook places instead of foursquare, the location id I'm using is outdated, plus I want to add a second place as we have opened a new branch. I've been using this code to list the photos:
$result = fetchData("https://api.instagram.com/v1/locations/83910054/media/recent/?access_token={$accessToken}&count=8");
However, when I want to add a second location, I am unable to find the location-id as it now fetches data from facebook places. This value had newly been added to the Instagram API, however I'm at a loss on using it:
https://api.instagram.com/v1/locations/search?lat=48.858844&lng=2.294351&access_token=ACCESS-TOKEN
Search for a location by geographic coordinate.
PARAMETERS:
DISTANCE Default is 1000m (distance=1000), max distance is 5000.
FACEBOOK_PLACES_ID Returns a location mapped off of a Facebook places id. If used, a Foursquare id and lat, lng are not required.
FOURSQUARE_ID Returns a location mapped off of a foursquare v1 api location id. If used, you are not required to use lat and lng. Note that this method is deprecated; you should use the new foursquare IDs with V2 of their API.
LAT Latitude of the center search coordinate. If used, lng is required.
LNG Longitude of the center search coordinate. If used, lat is required.
FOURSQUARE_V2_ID Returns a location mapped off of a foursquare v2 api location id. If used, you are not required to use lat and lng.
From what I understand, I should now be able to use facebook places id to list images, but I'm not sure where to get it.
Sorry if that sounds complicated, but I'll be very happy if anyone can help me with this. Thanks very much in advance.
You can find your location facebook place id, foursquare id or by geographic coordinate.
Your second cafe is probably dem bebek. You can get it's () id via http://graph.facebook.com/DemBebek .
By the way you can get your second cafe's medias via https://api.instagram.com/v1/locations/385502821/media/recent

What does the Foursquare venues/search return?

Does anyone know what the Foursquare venues/search return? Does it give the up-to-date Foursquare venues or all the venues ever created for an area? I read this page https://developer.foursquare.com/docs/venues/search but it was not that specific. It goes like: "Returns a list of venues near the current location, optionally matching a search term". Does anyone have more information about this?
In my experience, the search request doesn't distinguish user created places like "Joe Bob's House" from a business like "Starbucks." It returns all of the nearby places best matched to this particular user if the intent is to checkin, or all of the nearby places if the intent is to browse for "coffee," for example.
Does that answer your question?
You should take a closer look at the intent parameter on that page. You can specify the type of results you're looking for. Depending on your needs, you might also want to check out venues/explore

Colleting a neighborhood in foursquare

im making a app in using the Foursquare API, using their API i can get some places in a neighborhood.
I'm using one like that:
https://api.foursquare.com/v2/venues/explore
?ll=40.7,-74
&limit=50
&venuePhotos=1
Using that API i can take 50 venues around my point, but how can I take more others venues like a second page of that?
You can use the "offset" parameter to query for subsequent pages of results. For example, to get the second page, you would supply "offset=50" to indicate skipping the first 50 results.

Feature request: Add search radius to the Suggestion Complete Venues api method

I'm integrating the suggestion complete venues search into my site. It's pulling back results from places that are way to far away from the city we want to search in. Can you add a search radius param to the api method?
A radius parameter is in fact available, though documentation for this parameter was missing. Thanks for pointing this out, documentation will be added.

Foursquare get venue details

We are planning to use foursquare api to get venue in a particular city. I want data of all the food outlets in a particular city. I have managed to get the categories list but not sure how to get venues from that particular category in a particular city or area.
Please share some tutorials or document which i can check out.
One way of doing what you want will be using the Venues Platform for browsing according to a category ID.
Look at venue search API reference.
Example of using it:
I know that 4bf58dd8d48988d11f941735 is nightlife (just picked the first one I saw)
So I will call the API (the ll is someplace in New York):
https://api.foursquare.com/v2/venues/search?ll=40.7268,-73.9972&categoryId=4bf58dd8d48988d11f941735&limit=50&intent=browse&radius=1500&your ids/oauth
Or use the explorer to see results right away.
Important, read the search API and the parameters used here to alter behavior to your needs.
Another very important thing, the API parameters are case sensitive!! (so if they want categoryId, categoryid will not work :) )

Resources