Web Services Coming To Twitter

twitter.pngEarlier this year we talked about the usefulness of a simple command line to query multiple web services via a set syntax. Yubnub, one of the web services we discussed, does just that. Enter “Weather 90210” into Yubnub and get the weather from Weather.com. Or query thousands of other services with that single command line.

A subtle upcoming change to Twitter’s API will allow this kind of functionality, too. Twitter, which is a kind of social network around sms/text messages, has a rapidly growing community of users that spend hours each day sending text messages about what they are doing or thinking. To post a message, a user simply texts the message they want to post to “40404.” Anyone who cares to follow the meanderings of another user can do so. All messages from people you follow can be seen on your Twitter page and, optionally, delivered to your mobile device via SMS.

A popular feature with Twitter is a “direct” message that you send to just a single friend. The syntax is simple – you type “d [username] [your message].”

Until now, Twitter’s API hasn’t allowed you to access those direct messages though. With today’s API addition, you can now retrieve Twitter direct messages. What does that mean? A lot, quite frankly.

Users can now send a command (“direct message”) to a username which is just a name for a web service like weather.com. For example, there could be a Twitter username “weather”, which I could send a Twitter message of “d weather 14202” by text, web, or IM. The Twitter username “weather” could get this command (er, Twitter “direct message”) via the API, run a process on a web server to retrieve the current weather forecast for 14202, and send that as a direct message back to me ( i.e. “d TechCrunch Currently: Partly Cloudy, 50F. Tomorrow’s Forecast: AM Clouds/PM Sun. High: 55 Low: 40”).

Or there could be a username “score”, which you could send “d score Yankees”, to immediately request the score of the Yankees game. Or another example could be “d 411 Starbucks 14202” to retrieve the phone number of the closest Starbucks to zip code 14202.

Currently, it costs a lot of money to launch a start-up in the SMS/mobile space — you have to license a shortcode monthly ($500-$1000/mo), pay a SMS gateway provider, and then pay anywhere from $0.03 – $0.05 per inbound or outbound text message. It adds up. But now, if a start-up chooses to use Twitter as a command line to their web service, it’s free (until Twitter starts charging for it).

As you can tell, the one thing that is kind of annoying is prefacing messages with “d”, but Twitter is internally discussing use of “@” as possibly becoming the equivalent of “d” — I hope they do this. Currently, people are using “@(username)” to publicly reply to other Twitter messages — which can be annoying if you’re a friend of a user that is replying to what another user said (and you don’t even know what was originally said).

The updated Twitter API code should be posting live by morning and accompanying API documentation should be posted by the end of today as well.

Editor’s Note: This post by Steve Poland of Ringside Startup, where he’s blogging his own web start-up journey with advice along the way from VCs and seasoned entrepreneurs. You can follow Steve’s life on twitter.com/techquilashots, and Michael Arrington’s at twitter.com/techcrunch.