I have a list of venues id and I want to get informations about each venue. I have to make a request for each venue with https://api.foursquare.com/v2/venues/VENUE_ID ?
There are no way to make one request for the list of venues ?
Thanks
There's no way to provide a list of venues to get back venue details. (As Martin mentions, there's a /multi/ endpoint, but each sub-request still counts against your rate limits).
Foursquare allows you to cache venue details for up to 30 days, so you be sure to do local caching to avoid unnecessary calls to the API. See the Retention section of https://foursquare.com/legal/api/platformpolicy for more details
Although it doesn't seem to be listed in the current version of the documentation, there is a multi endpoint which allows you to combine (up to) five API requests into one. Hopefully this will help somewhat with reducing the number of calls you need to make to get the details for the list of venues.
Related
Does anyone know if TripAdvisor has pagination in any of their functions but it's undocumented? Seems bizarre to me that you wouldn't have pagination functionality built in but I don't see anything about it in their documentation?
If it's not there, how could I replicate it to get a decent spread on the returned locations?
https://www.tripadvisor.com/developers
Any help is much appreciated!
As of today, TripAdvisor API v1.0 limits all endpoints to a pretty low number of max returned items, so paging becomes pointless.
The (low) limit is different for each endpoint - all is listed in the API reference, which I cite below.
Note that their public API - used when you browse the TripAdvisor website - is https://www.tripadvisor.com/data/graphql/ids, and unsurprisingly it has an offset property for paging.
But be adivsed to not go the scraping route, as it violates their Terms of Use.
Here are the API response items limits:
Find Search
The Location Search request returns up to 10 locations found by the given
search query.
Nearby Search
The Nearby Location Search request returns up to 10 locations found
near the given latitude/longtitude.
Location Photos
The Location Photos request returns up to 2 high-quality photos for a
specific location. The photos are ordered by recency.
Location Reviews
The Location Reviews request returns up to 3 of the most recent
reviews for a specific location.
In case you're in a need for more (and you probably do), you are required to contact them, but only if the following apply (FAQ):
Once your website/app has been up and running successfully with our content for a while and you required more reviews and photos, please reach out to [...] to request more data.
I am currently evaluating several different APIs in order to get venue information. A key component of any provider is the ability to not just return all venues nearby but tailor the list based on previously entered user preferences.
Foursquare does not allow 'munging' their venue data with other data, like Google's places to create an aggregated service. But can I take Foursquare's venues for a given area, apply some filtering based on user preferences and recommendation engine techniques, and present a modified, personalized version of their information? Do they frown on only using their venue info as a jumping off point, even if attribution on the final results is given?
This customization would be above and beyond using retailer categories, something that can be included in the facebook request. Asking because other services require results presented exactly as returned from the API, including ads.
First, check out the policies at https://developer.foursquare.com/overview/community
We welcome you to use foursquare as your location database. You can associate additional content with our venue data in your system, but you may not combine our database with another database or export it on your own.
I think that they even encourage you to manipulate the data and create creative solutions with it, as long as you do not break their ground rule of not merging it with another database (see the full text at the link).
The API even lets you filter the results according to your needs with the categoryId and intent parameters. For example in our app, we filter out places that have less than 2 unique people checked in, because we assume its faked places.. we do other filtering on the result set as well, but we display only data from from foursquare venues database, and we attribute.
I know you see if your friend(s) are checked in in a venue on foursquare but is there a way to see if a new venue was created in a certain place/city
No, this functionality is not available through the foursquare API.
Related discussion in this thread: https://groups.google.com/forum/?fromgroups=#!topic/foursquare-api/vdKwGYCnuy0
There is no direct way to get this info via the API at the moment, but theoretically you could search for venues in certain areas in the city, cache venue IDs and check their createdAt value (see https://developer.foursquare.com/docs/responses/venue). Repeat these steps on regular basis and compare against cached venue IDs. That way you can discover newly created venues. Of course, it may not be 100% reliable, especially in larger cities.
I understand that we can search for the venues using a search term and ll. I want to be able to cache all the venues. Is it possible?
There's no way to retrieve all of foursquare's venues -- they're only available via search API endpoints. Results that are retrieved via these endpoints may be cached for up to 30 days.
We would like to be able to pull out certain places from foursquare an categorize them on our website along with comments from foursquare users. I have the following questions:
1- Can we pull out places and categorize them the way we want on our website? e.g: restaurants/bar/lounge/club/landmarks/others.
2- can we pull out as well phone numbers (when available) and addresses (longitude-lattitude) of places ?
3- Does foursquare have any general descriptive summaries of each place?
Thanks for the help.
Chris
Foursquare has an API, more information can be found at this link
To answer your questions:
Yes, check out the Venues Platform in 4sq API, specifically, the search. When you query the API, as part of the result set for each venue, you get a category
If available, you will get them back under the 'contact' field, check out the response venue object from the search function
Yes, description field, you will need to make an API request to get the complete venue object.
Edit: one last thing, attribute and play nice :)
From my experience, you do not get a lot of venues with 'contact' and 'description' information. But foursquare is not very popular where I test my application, so it might be bad experience - experiment with it yourself.
FourSquare has a great category tree that you can use for categorizing restaurants
http://aboutfoursquare.com/foursquare-categories/
Actually, I'm using this tree in my website:
Dishes Map