I am trying to collect reviews from Walmart API using the URL:
http://api.walmartlabs.com/v1/reviews/10307695?apiKey={apiKey}&format=json
The api returns results page wise.Another parameter page={pagenumber} can be added to the url.
http://api.walmartlabs.com/v1/reviews/10307695?page={pagenumber}&apiKey={apiKey}&format=json
The problem is the product has around 21000 reviews but the API returns only reviews until page number 25(125 reviews). Is there a way to collect all the reviews?
Related
The Walmart Open API doesn't seem to honor storeID as a filter parameter.
For example, I want my backend code (java) to search for BREAD filtered to a particular store. Is this possible with Any Open API ?
Here is my query
https://developer.api.walmart.com/api-proxy/service/affil/product/v2/searchquery=bread&facet=on&facet.filter=brand:Wonder&numItems=3&storeId=5294
The returned result seems to always ignore the storeId.
Any thoughts ?
I have a list of "n" Twitter ID representing users I would like to download.
To retrieve their user profile info, should I use n times the api call get_user or there exist a method to pass the entire list and retrieve all the info within one single api call, within the twitter rate time limit?
I tried something like
api.search_users(A)
api.search_users(id in A)
where A contains the list of id
but it does not work.
Anyone helping?
You can use the Twitter API resource https://dev.twitter.com/rest/reference/get/users/lookup. It can return user objects for at most 100 users at a time.
You can use this in Tweepy like:
user_objects = api.lookup_users(user_ids=list_of_at_most_100_user_ids)
Much of this answer first appeared as part of https://stackoverflow.com/a/42946854/1921546
For example, there are 884 channels under beauty and fashion, however, Youtube only shows about 50 of them. How do i get the complete list? Either through API or web.
https://www.youtube.com/channels/beauty_fashion
Thanks,
The first thing to do is to get the Guide Category ID that you're interested in. If you do a call to
https://www.googleapis.com/youtube/v3/guideCategories?part=snippet&hl=en®ionCode=US&key={YOUR_API_KEY}
where the hl parameter is the language and the regionCode is the country code (as some categories may not be available for particular languages/regions), you'll get a list of all the categories and their IDs.
For example, that call tells us that the Beauty and Fashion guide category ID is GCQmVhdXR5ICYgRmFzaGlvbg. With that ID, we can then do a channels list call:
https://www.googleapis.com/youtube/v3/channels?part=snippet&maxResults=50&categoryId=GCQmVhdXR5ICYgRmFzaGlvbg&key={YOUR_API_KEY}
This will give you 50 channels in that category. It will also give you a 'nextPageToken' ... you do the same request as above, but add "&pageToken={WHATEVER THAT NEXT PAGE TOKEN VALUE IS}" to get the next 50, and so on.
You can retrieve up to 500 that way ... that's the limit through the API.
Note that all of these calls require an API key from console.developers.google.com
Visit this site: http://www.channelcrawler.com/
You can list the channel in selected category and many other options.
I have a problem with twitter API. I tweeted in the past (around 400) but recently I haven't tweeted anything. When I try to fetch tweets by me using the twitter api, there are no results. How can I retrieve the older tweets?
Twitter doesn't return tweets older than a week through search api. Take a look at the limitations section from the below link:
https://dev.twitter.com/docs/using-search
I have the same problem as you, so after see that Twitter Web Search works I've started to implement my own solution, you can see on my GitHub. It is implemented in Java, but it will make a post on my blog to explain how to do in other languages. I've downloaded tweets without any problems, my last test I parse more than 600k within 2014 from some specific users.
You can use the REST API resource GET statuses/user_timeline to retrieve the most recent 3200 tweets from any public timeline.
This is possible in Twitter web search portal but not through their API. Bummer
https://twitter.com/search-home
This elaborates on #bennett-mcelwee 's answer where getting up to 3200 most recent user tweets can be done in series of API calls. Currently the max # of tweets you can get by a user in 1 request is 200, using the GET statuses/user_timeline API call. To get all tweets a user has posted on their timeline do the following:
STEP 1
Make a GET call to this endpoint passing parameter count=200.
STEP 2
From the returned data in step 1, get the ID of the last tweet
Make the same GET call but this time pass in parameter max_id= followed by the ID of last tweet returned form the first call, or -1. So for example max_id=9987999
STEP 3
Repeat step 2 until you don't get any new(older) data.
For my purpose I was able to do this in Ruby using https://github.com/sferik/twitter
Once a client object is instantiated, it's as simple as:
tweets = client.user_timeline('foobar', count: 200)
max_id = tweets.last.id - 1
tweets << client.user_timeline('foobar', count: 200, max_id: max_id)
From here you get idea and it's fairly trivial to write a loop until you've gotten all the tweets you can grab from the API.
I want to make a simple Twitter API get using JSON. The idea is to get only the posts from a known corporation (say BigCorporation) sent to the main corporation (#BigCorporation). The idea is to just get the main annoncements and filter out anytime the BigCoporation answer a question from a follower (i.e. BigCoporation tweets: #someguy we are anwering your question)
So Tweets from:BigCoporation with the #BigCorporation
I came up with this API get but I seem to get both #BigCorporation or from:BigCorporation tweets. I want only the Tweets that are #BigCorp AND from:BigCorp
http://search.twitter.com/search.json?q=#BigCorporation&q=from:BigCorporation&result_type=mixed
Your search query is malformed.
It should be:
http://search.twitter.com/search.json?q=#edent%20from:edent&result_type=mixed
That will show you all the tweets I have sent which contains the string "#edent"
You can use this URL :
https://api.twitter.com/1/statuses/user_timeline.json?screen_name=BigCorporation&exclude_replies=true
The REST method GET https://api.twitter.com/1/statuses/user_timeline.json returns the most recent tweets (20 by default) of a user whose username (here BigCorporation) is in the parameter screen_name. When set to true (or t or 1), the exclude_replies parameter excludes the tweets that you want to avoid ("#someguy we are anwering your question").
You can visit this page on the Twitter API website for further details.