Twitter has recently opened up their archives making it possible for anyone to search the entire Twitter database ever since the first tweet was published in 2006. This time-sorted archive of billions to tweets will be extremely helpful for research and more so when you are trying to find out who broke the news first on Twitter or who the original source of a quote is.
To give you an example, if you want to know who said something first on Twitter, say the iPhone, you can head to Twitter’s advanced search, choose a range of dates and dig through the old tweets. If a match is found, you further narrow down the date range and repeat until you find the oldest matching tweet.
There’s a little problem though.
It takes lot of trial-and-error to find the first tweet for any topic. You have to first guess a range of dates when that tweet was probably sent and keep narrowing down that range. The Twitter API does let you search tweets within a date range but, as you have noticed in the Twitter archiver, the API doesn’t return tweets older than a few weeks and thus you’ve to perform searches for old tweets manually.
Internally, the web app performs binary search against the archives. It takes your search query and executes Twitter’s advanced search for the entire range of dates. It then shrinks the range by half and discards the other half. The process continues till that elusive tweet is discovered. This also explains why the app is slow as it has to perform a couple of JSON requests before getting the result.
[*] Do note that the app only works on the desktop at this time.
The story, Who Tweeted It First on Twitter? , was originally published at Digital Inspiration by Amit Agarwal on 22/11/2014 under Twitter, Internet.