Twitter: Hash tag search query

后端 未结 3 1443
心在旅途
心在旅途 2020-12-08 05:37

I am trying to search twitter tweets by a given hashtag. I am trying to get the correct http query, but I have no idea which one. I\'ve tried a few but i can\'t find the cor

相关标签:
3条回答
  • 2020-12-08 06:18

    You can simply fetch http://search.twitter.com/search.json?q=%23test to get a list of tweets containing #test in JSON, where %23test is #test URL encoded.

    0 讨论(0)
  • 2020-12-08 06:20

    I use the http://search.twitter.com/search.json?q=%23test format shown above, but in recent weeks this format has stopped working. It returns valid JSON, yes, but the return has zero tweets while a manual search of the hashtag on twitter.com shows one or more results. This happens with every hashtag I try. Has anyone else experienced this?

    Edit: I've also noticed that adding a hyperlink to a tweet causes it to show up only in my feed, while it fails to show in either site search or JSON. I'm a Twitter novice; am I missing something basic here?

    0 讨论(0)
  • 2020-12-08 06:28

    Just for people who come this post now. This current format works

    https://api.twitter.com/1.1/search/tweets.json?q=%23test&include_entities=true
    
    0 讨论(0)
提交回复
热议问题