I want to see how many restaurant items are in the response from sending a get request to the yelp API, even though the maximum I can see is 50 (it is a limit the Yelp API has). For instance, when I send GET https://api.yelp.com/v3/businesses/search?location=newyork&categories=chinese&limit=50, I want to know how many Chinese restaurants are in NYC, not just the ones that are in the response. How can I view this?
Related
I made a giveaway on LinkedIn where I would randomly choose someone that shares my post (https://www.linkedin.com/feed/update/urn:li:activity:6919156662570242048/). I expected max 50 shares, now I currently have over 500.
Now I want to use the API to retrieve a list of people who shared my post so that I can randomly select one. Does anybody know which endpoint I can use to do that? I didn't find anything on the official LinkedIn API Docs or there official Postman Team.
I understand the Twitter REST API has strict request limits (few hundred times per 15 minutes), and that the streaming API is sometimes better for retrieving live data.
My question is, what exactly are the streaming API limits? Twitter references a percentage on their docs, but not a specific amount. Any insight is greatly appreciated.
What I'm trying to do:
Simple page for me to view the latest tweet (& date / time it was posted) from ~1000 twitter users. It seems I would rapidly hit the limit using the REST API, so would the streaming API be required for this application?
You should be fine using the Streaming API, unless those ~1000 users combined are tweeting more than (very) roughly 60 tweets per second at any moment.
Using the Streaming API endpoint statuses/filter with the follow parameter, you are allowed up to 5000 users. There is no rate limit except when the stream returns more than about 1% of the all tweets being tweeted at that moment. (60 tweets per second is 1% of the average rate of tweets, which is always fluctuating, so don't rely on that number.)
If your stream does go above the 1% threshold, you can detect this. (See the LIMIT notice.) Then you would use the REST API to find missed tweets.
Twitter simply will not allow multiple streams from one registered app/account. Doing so will result in the older one being closed.
Also too many connection tries are not allowed as well and will result in a user being blocked.
Reference docs: Public Streaming API (outdated)
tested this on media endpoint querying on different hashtags... only a few photos is returned from #artona (like 20 something) out of the 5000+ photos available. #iphone returns nothing right now.
this problem is not limited to this client.
i notice this problem on http://statigr.am/search/iphone where it too returns nothing for iPhone and a few photos for #artona...
also tried the instagram iPhone app...
the number (limited) of photos returned are consistent between instagram clients so i suspect something is wrong with the api / instagram server.
The hashtag #iphone and many others are blocked by Instagram so it returns error:
{"meta":{"error_type":"APINotAllowedError","code":400,"error_message":"This tag cannot be viewed"}}
http://www.gramfeed.com/instagram/tags#iphone
As far as the hashtag not returning all results, Instagram posted on dev blog that they are having issues with hashtag API currently: http://developers.instagram.com/post/72497508869/platform-issues-with-hashtags
IS there any way I could retrieve all the reviews of a business Using the API ?
The sample response here just shows 3
http://www.yelp.com/developers/documentation/v2/business
In v3 yelp has a reviews API and it returns only three reviews per business.
Yelp Business Reviews v3
Unfortunately, yelp restricts reviews access via APIs. With the V2.0, it is restricted to just one review snippet, which is also truncated after 40 chars.
An alternate that you could try is to use web scraping platforms such as scrapy. Again, the challenge here is that, yelp changes its layout pretty often just to make sure you don't scrape out their data and hence, your scripts will likely fail after sometime.
I'd like to pull all of a user's tweets. I could do this the hard way (manually scraping twitter) or the easy way: using their api. The problem with the easy (api) way is that I seem to be limited to the 200 most recent tweets. What's a simple way to get all tweets?
Thanks
Yes you can get up to 3,200 historical tweets by requesting as follows...
Make a request to:
http://api.twitter.com/1/statuses/user_timeline.format
And use the count parameter 200 and iterate through the page parameter from page 1 to 16 or until there are no more tweets.
Thats the only thing you can currently do because Twitter specifically say they prevent this in their API Doc...
https://apiwiki.twitter.com/Things-Every-Developer-Should-Know#6Therearepaginationlimits
I would add, please don't screen-scrape because it will cause undue load on Twitter and in bulk requests it would probably get your server blocked from accessing Twitter.
you can make sure you get all future tweets by subscribing to your Twitter RSS feed with Google Reader. Then you can use their infinite scrolling feature to look back to the first tweet tracked.