How to use cURL and the Twitter API, November 2011 edition

I used to use cURL to interface with the Twitter API, but after they changed/restricted it, that became harder. However, with a bit of investigation, I can show you how to use them together still, at least for queries. (If anyone knows a simple way of doing updates, please comment below).

For example, if you want to get my timeline, you can use


If you want to get 200 entries, you can use:


If you want to get 200 entries and use JSON instead of RSS, you can use:


If you want to play around, replace “blm849” with your twitter handle or someone else’s that isn’t protected.

For more on various formats and parameters, see GET statuses/user_timeline | Twitter Developers. Also make sure you check it for limits.

Here’s another option. If you want to get the statuses for the entries in my FAVS lists, you can use:


If you go to the REST API Resources for Twitter Developers page, you can see other options.

Essentially you need to play around to take a command you send to the REST API (e.g. GET lists/statuses) and learn how to turn it around to a commend you can pass to

If you say: hmmmm, some of this is inconsistent, etc., I confess I have just started experimenting. But I wanted to get something down before I forgot about it, and I will build on it later.

Good luck!

Comments are closed.