** You can only get up to 100 items at a time, so if you have 100 or more items, you have to retake the next page or ** ~~ obediently use the Streaming API. .. .. ~~ ** User Streams API will be discontinued on June 20, 2018 ** http://www.itmedia.co.jp/news/articles/1712/20/news101.html
--I want to get the number of tweets related to a certain keyword using twitter API --Implementation assumes python
-~~ There is a REST API for searching, so it seems easiest to hit it regularly ~~ --API limit is 450req / 15min. You can get up to about 40,000 keywords if you update once a day. --If you want to use more frequency and keywords, consider using Streaming API.
You can get it by using https://api.twitter.com/1.1/search/tweets.json
Official API Reference https://dev.twitter.com/rest/public/search https://dev.twitter.com/rest/reference/get/search/tweets
Japanese materials https://syncer.jp/twitter-api-matome/get/search/tweets
-$ .search_metadata.count is the number of searches ―― ~~ You can specify the period, and you can get it retroactively ~~ (up to 1 week) --Limited to 450 requests per 15 minutes --Authentication is OAuth
-~~ Simply put, you can get 450 keywords in 15-minute units ~~ -~~ If the acquisition frequency is good on a daily basis, it is possible to acquire the number of keyword searches of 1000 keywords or more (maximum 450 * ((60 * 24) / 15) = 43200 requests) ~~ -~~ For past minutes, it is also possible to specify a longer specified period and count the number by yourself without using search_metadata.count of the response ~~ --You can use this if the number of tweets is 100 or less, but you can't get 100 or more keywords without re-searching the next page.
Search Twitter using Python --Qiita http://qiita.com/mima_ita/items/ba59a18440790b12d97e
There seem to be some libraries for twitter, but it seems simpler to implement by yourself using only the OAuth library.
Get a large amount of Starbucks Twitter data with python and try data analysis Part 1 http://qiita.com/kenmatsu4/items/23768cbe32fe381d54a2
Access the Twitter API in Python http://qiita.com/yubais/items/dd143fe608ccad8e9f85
User Streams API will be deprecated on June 20, 2018 http://www.itmedia.co.jp/news/articles/1712/20/news101.html
If you want a lot of real-time data, you can use the Steaming API to get all the current tweets.
--Since sampled data can be used in a general account, the correct number cannot be obtained. --Past data cannot be obtained --Since the amount of data is large, it seems a little more difficult to handle than the REST API.
Keep getting tweets containing specific keywords using Streaming API in Python --Qiita http://qiita.com/mima_ita/items/ecdf7de2fe619378beee
A note about the Twitter Streaming API http://lealog.hateblo.jp/entry/2013/03/10/100845
Recommended Posts