How to find tweets that contain a URL?

2019-02-01 22:02发布

Is there a possibility to search for tweets which link to a specific URL or, even better, domain?

There is already a service doing this, but I can't figure out how to do it myself via the twitter-Api...

http://backtweets.com/api

It seems rather impossible to just collect all tweets which include a URL, expand the URL, save them all and just then look for certain URLs..

标签: twitter
2条回答
beautiful°
2楼-- · 2019-02-01 22:28

New solution:

You can use the api method get-tweet-search from Twitters api. To find tweets containing an url you have to pass the parameter q="url:stackoverflow.com". Unfortunately you must have an access token to do this call.

More info how to use Twitters search operators can be found at https://developer.twitter.com/en/docs/tweets/search/guides/standard-operators.


This answer is now soon 8 years old. Twitter have changed their api since.

Old answer:

Hope this might be to any help.

http://search.twitter.com/search.atom?q=<query>
You can use .atom (xml) and .json. Just remeber to url-encode the string.

Example:
http://search.twitter.com/search.json?q=stackoverflow.com

Read the Documentation Here

查看更多
唯我独甜
3楼-- · 2019-02-01 22:37

Why dont you use site:"google.com" keyword. It returns the tweets that has at least one url on google.com domain link with your other constraint.

查看更多
登录 后发表回答