What does the Foursquare venues/search return? - search

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

Related

Sending specific words to webhook

I'm trying to make an agent that can give me details about movies.
For example, the user says "Tell me about (movie-name)", which sends a post request to my API with the (movie-name) which then returns the response.
However, I don't understand how to grab the movie name from the user's speech without creating a movieName entity with a list of all the movies out there. I just want to grab the next word the user says after "tell me about" and store it as a parameter. How do I go about achieving that?
Yes, you must create a movieName entity, but you do not need to create a list of all movies. Maybe you are experienced with Alexa which requires a list of suggested values, but in api.ai you don't need to do that.
I find that api.ai is not very good at figuring out which words are part of a free-form entity like movieName, but hopefully adding enough user expressions will help it with that.
edit: the entity I was thinking of is '#sys.any' but maybe it would be better to use a list of movie names with the 'automated expansion' feature. I haven't tried that, but it sounds like the way that Alexa's custom slots work, which is actually a lot more flexible (just using the list as a guideline) then people seem to think.

Can I get list of all categories that foursquare API could return to me?

Can I get list of all categories that foursquare could return to me ?
https://developer.foursquare.com/docs/responses/category.html (link to category object description)
I know that the new categories could be created, and some deleted. But I just would like to prepare my app to be able to handle some categories in special way, and I need to know in advance what they could be.
Thanks for time in advance.
This should include all possible Foursquare categories. It's this endpoint: https://developer.foursquare.com/docs/api/venues/categories
Foursquare also provides an up-to-date category hierarchy without using the API. Useful if you just want to take a look at the list without doing a call.
Interestingly on that page, they also provide "Supported Countries" where the category "can only appear on venues in those countries".
https://developer.foursquare.com/categorytree

How can I get checkins in a certain location on Foursquare?

I guess the title is pretty self-explanatory. I want to get all the checkins in a certain area given the latitude and longitude.
All I've been able to find is https://developer.foursquare.com/docs/checkins/recent and https://developer.foursquare.com/docs/venues/venues, but neither of them are useful for me.
I'm pretty sure there has to be a way, but I can't find it.
Use this api and filter by "hereNow" count for each venue, this will give you count of people currently in that location
https://api.foursquare.com/v2/venues/search
more details here: https://developer.foursquare.com/docs/venues/search

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 :) )

Find if Foursquare venue mayor is currently at the venue

I am looking for a way to know whether the Foursquare venue mayor is currently checked in. Several 4sq apps show whether the mayor is at the venue when you check i but I am not able to find how to do this using the 4sq API. Any help would be appreciated.
The venue aspect returns a hereNow block which lists all people who have publicly shared their location.
It also returns a mayor block, listing the ID of the current mayor.
This means that you can simply iterate through the hearNow list and see if the mayor shows up. Easy!

Resources