是否可以获取带有特定主题标签的推文数量?
是否可以获取带有特定主题标签的推文数量?我一直在查看 twitter API,但没有找到任何东西,有什么帮助吗?
谢谢!
Is it possible to get the number of tweets with a certain hashtag? I have been looking in the twitter API but havent found anything, any help?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
基本上,您有两种选择来获取基于主题标签的推文(其中任何一个都不会为您提供过去的所有推文): 搜索 api(请参阅此处了解用法)以获得有限的金额过去的推文或 streaming api(使用过滤器获取当前发生的推文) 。
搜索 API 对返回的推文数量有限制。通常只发布几天前的推文,最多可达 2500 条左右。这在很大程度上取决于主题标签。
流式 API 可用于获取某个主题标签的所有推文(假设该主题标签没有那么流行,不会让您达到流式 API 带宽限制)。 ——但不是来自过去,只有新的推文,而且只要你监控流。
You have basically two options to get tweets based on a hashtag (none of which will give you all tweets from the past): the search api (see here for usage) to get a limited amount of tweets from the past or the streaming api (using a filter to get current tweets as they happen).
The search api has a limit on the number of tweets it returns. Usually only a couple of days back and maxing out at around 2500 tweets. This very much depends on the hashtag.
The streaming api can be used to get all tweets of a hashtag (assuming that the hashtag is not so popular as to make you hit the streaming api bandwidth limit). -- But not from the past, only new tweets and only as long as you monitor the stream.
我的回答有点晚了,但我发现这个 API 可能对你有用:
https://code.google.com/p/otterapi/
这是一个小教程让您开始:
http://clarklab.com/posts/finding-the-number-of-tweets-for-a-hashtag-or-twitter-account-mentions-using-the-topsy-api/
不幸的是,它不是免费的,但它提供 30 天的试用期,因此您可以尝试一下,看看它是否适合您的需求。
A bit late for my answer, but I have found this API which may be of use to you:
https://code.google.com/p/otterapi/
And here is a small tutorial to get you started:
http://clarklab.com/posts/finding-the-number-of-tweets-for-a-hashtag-or-twitter-account-mentions-using-the-topsy-api/
Unfortunately, it is not free but it offers a 30-day trial so you could try it out and see if it suits your needs.