Search query with "since:" and "until:" return no rresults, but twitter.com/search does! why's that?


#1

I’m looking to get tweets published in the past through the API. The thing is that I get no results for something like one year back, the API returns nothing. However, twitter.com/search do return tweets if I put the very same query I tried on my application. I don’t get errrors from the API either.

The test query is: hello since:2014-02-01 until:2014-02-28

Why does this happen? is possible to make the API do what I need?

Thanks!

P.S.: If you wonder, I’m using this little test program written in Go for testing purposes:

package main

import (
	"fmt"
	"github.com/ChimeraCoder/anaconda"
)

func main() {
	anaconda.SetConsumerKey("xxxxxxxxxxx")
	anaconda.SetConsumerSecret("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

	api := anaconda.NewTwitterApi("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

	searchresult, err := api.GetSearch("hello since:2014-02-01 until:2014-02-28", nil)
	if err != nil {
		fmt.Println(err)
	}
	for _, tweet := range searchresult.Statuses {
		fmt.Println(tweet.Text, tweet.CreatedAt)
	}
}

#2

The Search API can only return results going back a few weeks, no further. The Web Search contains nearly all Tweets posted, with no limitation, but these are not accessible using the API.


#3

In other words, is not possible to search tweets from the past? After reading this blog post called “Building a complete Tweet index” I though it was possible!


#4

It is possible, but not exposed to the API. So using the API, no, it’s not possible.


#5

Correct, the public API only provides access to around 7-10 days of Tweets, and may not cover the complete index. (and this has always been the case).

The website does now provide access to all of the Tweet search index and history.

If you need to do this from the API, then we have the paid Gnip service as an alternative.


#6

I see. Thanks!