Does TripAdvisor have pagination? - api

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.

Related

Google Custom Search Engine pricing

The pricing regarding CSE is a little bit vague:
For CSE users, the API provides 100 search queries per day for free. If you need more, you may sign up for billing in the API Console. Additional requests cost $5 per 1000 queries, up to 10k queries per day
Does one query equal one keyword regardless of pagination used, or one request? (in this sense XML is more efficient than JSON, as it allows 20 in num parameter, as opposed to JSONs 10)
Are the queries counted per API key, or per cx key?
It is vague and you are not the first to be puzzled. When I did my research I found this blog post helpful.
Assume you are talking about Custom Search Engine (terms you noted in your Q) and NOT Google Site Search (paid from the start). The reason I ask is that the XML function is only for Google Site Search customers. There is the JSON/Atom API and Custom Search API available for CSE.
For Q1, one Query = one request. You can use as many keywords or other parameters in your request (see comments in the blog post I referenced), but you will always be limited to 100 results.
For Q2, the billing is enabled through the API console. Once enabled (and in order to allow the 101st query) your code must include both your cx and API key. So in theory you could set up multiple search engines within your API and stay under the 100 request limit, but I have not seen a way to allow an API to support multiple cx keys.

What is the maximum results returned for YouTube Data API v3 call

Context
I am in the process of providing some consultancy on doing a HTTP GET using YouTube Data API V3; in order to develop a Windows based application to GET a list of results from Youtube, for say a specific CATEGORY, or a specific TAG.
We are open to using any programming language(I'm from a C++ background and am hoping You tube will support direct HTTP connections without using Google client SDK and so on) to connect to YouTube and (HTTP) GET data.(Once a month or so, so YouTube API quotas should not be problem).
The Issue
We are being told by some of my client's web developers that YouTube API v3 will only return a maximum of 500 records/results, for say a query that returns JUST the Total viewers, the Video's link, and basic meta data such as that.
S, say I wish to find 5,000 results for category "House music" or "basketball" - and I have the Developer Key etc are all set up, would that be possible?
If so, what GET fields would I need to populate(such as "max_results_per_page")?
Thank you.
The API won't provide more than ~500 search results for any arbitrary query. It's by design. Technically, it means that the nextPageToken field won't be returned once you hit ~500 results. No additional parameter can change that.
If you want more than ~500 results for a query, you have to split it into more specific sub-queries. I'd suggest using the publishedAfter and publishedBefore parameters to achieve that, but feel free to experiment with the other ones here.
This only holds for the search-Query. Other queries like "PlaylisItem:list" deliver more results. I have tested with 100.000 items to get the videos of a playlist.

Why do I get the 'Oops' error from Instagram API location search (when using coordinates)?

I'm tring to search locations with the Instagram API in my application but also when testing with Apigee, I get 500 Internal server error, and Oops, an error occurred.
Apigee: https://apigee.com/console/instagram
Authenticate yourself and add this URL: https://api.instagram.com/v1/locations/search?lat=40.758896&lng=-73.985131
It should return Time Square locations. It worked a few times in the past, but currently it doesn't.
It would be an overkill to use the Foursquare api to search for locations, then pass the location id to Instagram. Is that the only way to get around this? Because once you know the location's ID it works ok.
My possible solution would be to let the user find the desired location here: http://worldc.am/id/47383924f964a520444c1fe3
And use the v2 foursquare API location ID for Instagram.
The Instagram API is pretty bad in that regards - it often just says "Oops an error occured!", without giving you any more info.
I believe their servers have a really low time out limit. Add the parameter distance=500, or even less, and you won't get this error any more. Basically, in a high density area (like a big city), you need to specify a small distance number, otherwise Instagram's server just times out while serving your request.

Get informations of a list of venues

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.

Twitter Search API - Unusable?

After many tests, I've been unable to get the Twitter Search API to return more than 80% of tweets containing a specific keyword or hashtag. This is not related to the maximum number of results, one test involved a hashtag which had been tweeted 50 times and only 15 of them were returned by the Twitter Search API. The same results were returned when using Twitter's own search tool.
Is the Twitter Search API simply a tool for getting estimates and trends, rather than accurate data?
Has anyone found a way to capture 100% of tweets containing a specific keyword or hashtag?
Twitter filters search api for better results. Here is a quote from developer site:
Both the Streaming API and the Search
API filter, and on some end-points,
discard, statuses created by a small
proportion of accounts based upon
status quality metrics. For example,
frequent and repetitious status
updates may, in some instances, and in
combination with other metrics, result
in a different status quality score
for a given account.
Search api simply returns a subset of the found tweets.