Home > Development, Social Media, twitter, twitter API > A Quick Reference to the twitter API

A Quick Reference to the twitter API

April 6th, 2010

In the past few weeks whenever I opened my browser the first link I would open was http://apiwiki.twitter.com/. Actually third, followed by my obsession with facebook and gmail. The link contains a fine description of what is called an API(Application Programming Interface) for Twitter. Almost anyone can understand the API through its documentation, but the only pain is that there are infinite pages describing each and every feature which some people may not want to go through. And its still in its first phase! Having gone through most of them I give here a brief version of all the methods(actions performed through the API). For details, ofcourse, one can visit the mentioned link.

The Twitter API is actually in three parts
1)Search
2)REST(literally)
3)Streaming

I have presented all the methods as cool looking mind maps. Just seperate the boxes with ‘/’ and you have the URL for the method.

1) Twitter Search API

All the search API methods are shown here.
All the results can be received in json format, except the general search which also supports ATOM.
In the general search, the maximum number of tweets that can be recieved are 1500, a maximum of 100 per page.
No authentication is required.

2) REST API

This includes all the methods that are generally used by a user,  like updating statuses, adding friends, etc etc. The methods which return results are recieved as both json and XML. Some of them also support ATOM and RSS.

The methods are self explainatory. Authentication is required. A user can authenticate by a valid twitter id.

3) Streaming API

The methods used to get runtime tweets & retweets come under streaming API. There are 4 methods: filter, firehose, retweet and sample.

  • Filter requires basic authentication using a twitter id. There is a restriction on the number of keywords, 200, and the number of userids to be followed, 400 at the default access level to the twitter database. Further access requires special arrangement with twitter.
  • Sample returns random tweets from the active stream and requires basic authentication.
  • Firehose returns all public statuses and is not available with basic authentication & requires a special setup with twitter.
  • Retweet returns all retweets and is not available with basic authentication & requires a special setup with twitter.

Again, all the results can be requested in JSON or XML format.

The Twitter API is still being developed and new features/more methods may be added later.
For updates, discussions or queries regarding the API go to their google group: http://groups.google.com/group/twitter-development-talk.

I hope this helps make things easier for those developing with the API.

About the author: Kaustubh is a second year student from IIT Bombay & interned with us for 2 weeks, in January. You can follow him on twitter on @kaustubhsinghal

There are a few open ends remaining in the above references. We would be more than happy to receive your suggestions, ideas & improvements on the reference. We will keep updating the mindmaps. Our website is being worked upon. Once it is done, you will find JPEGs for these in the Resources section, for you to save to your computer.

Liked it? Share and Enjoy:
  • Twitter
  • Facebook
  • LinkedIn
  • StumbleUpon
  • Reddit
  • Technorati
  • email

kaustubh Development, Social Media, twitter, twitter API , ,

  1. No comments yet.
  1. No trackbacks yet.