Friday, May 2, 2008

API: JSON, RSS and Badges

What does API stand for? Does it matter? Truth is, a web service just isn't a web service without an API. Informally, anybody could use the RSS feeds we've been providing as an API but well there are easier ways. Especially when it comes to creating other web applications that process and display real-time information.

So we've created a JSON implementation. If you are not familiar with it, JSON is a format that is ready to read by Javascript. In our case, we provide that data wrapped in a call to a function called ts_parse. If you define that function to handle the data, that's a start. You can look at http://tweetscan.com/badge.js for a reference implementation. Which leads us to the badges....

The first use of the JSON and what was used for testing is also available at http://tweetscan.com/api.php in the form of a badge. You can grab a couple snippets of code, put in your search string, and wham! you'll have topical live updating tweets on your site.

Of course, we'd love to see what else can be done with this data. The possibilities are nearly endless. So if you've got a developer's itch to scratch, give it a shot and let us know if you need anything more in the API.

Happy API Scanning!

8 comments:

Yoav said...

David, I love Tweetscan. Thanks for putting it together. I'd love to learn a little bit more about its architecture and implementation.

Do you keep a rolling window, i.e. only posts since time X or ID Y, or do you store an archive forever?

(If you'd rather discuss over email, IM, tweeting, phone, beers / dinner, whatever, just drop me a note @yoavshapira or yoavshapira.com).

David said...

Yaov,

Thanks for your interest. The main goal being to allow people to find what they want in Twitter, our index includes all tweets we've indexed previously.

Thanks,

Dave

HelpLoic said...

Hey there
I have an issue with Tweetscan : the RSS feed does not match the request I do

check here for instance : http://tweetscan.com/rss.php?s=PP2008

vs
http://tweetscan.com/index.php?s=PP2008

can you do smthg ?

thks

David said...

helploic, thanks for pointing this out. It's been fixed.

andypiper said...

Since there appears to be no other way to send you feedback (no TOS, no feedback link), I'm posting this here.

Let's say I twitter something, then immediately realise that I didn't mean to say it and delete it. TweetScan has already indexed it. There's no way for me to delete it from TweetScan.

This is just wrong. TweetScan should either spot that it has been deleted and remove it from its own index accordingly, or allow me to remove it from TweetScan.

Summize does the same. Both services are seriously infringing on my rights to my own data.

I have already emailed the Summize people to ask them what they are doing about it. Can I ask what your plans are to remedy this situation?

David said...

@andypiper We understand as we've gotten more than one request to remove a tweet from the index. We do remove them as long as the sender is verified but there exists no automated method to do this and we would not guarantee any such feature. We don't even guarantee the search itself.

Technically, Twitter would need to release a feed with at a minimum, the id number of each deleted tweet. As a citizen of the Internet, one has to assume that publicly posted information will exist somewhere as long as there is an Internet. So while we will take reasonable steps to remove information posted mistakenly, one can assume that some other system(Google, or one of many Twitter services) will retain and make available such information. The best solution therefore, is to be careful about every public post. Public messages will potentially reach everyone you know or may know in the future.

Bill Drew said...

How long does it take Tweetscan to pick up new tweets so they can be searched?

Akanksha said...

Hey..I am trying to use Tweetscan but didn't get anything. I think it is not working fine. Can you please check it? What is the problem with it ?
business card scanner