Twitter API Goes Geo

Raymond Yee, May 2nd, 2008

Thanks to some new API updates, one can now update the Location field in a Twitter user’s profile using the Twitter API. As Ryan Sarver writes on his blog:

Location updates currently aren’t normalized or geocoded, but the ability to update it on the fly allows for some very cool possibilities when it comes to geo-based tweeting — especially in apps like Twinkle [an iPhone app] and Twittervision.

This update has now been reflected in the official API Documentation. For example, the following curl command will update your location (where USER and PASSWORD are your Twitter username and password):

curl -u USER:PASSWORD -d location="Berkeley, CA"

Note that the location field is limited to 30 bytes when encoded in UTF-8. Hence, a long address such as “2855 Telegraph Ave., Berkeley, CA.” will be truncated as “2855 Telegraph Ave., Berkeley,”.

It will be interesting to see how this ability to programmatically change a user location will be used in practice. In addition to using this location field to display tweets on a Google map, Twittervision (profile) has been promoting a way to update one’s location right within a tweet, by embedding a location such as L: Berkeley, CA. What will Twitter programmers and users use to update their location: the profile location, individual tweets, both, or neither?

Meanwhile the Twitter API continues to provide us with a steady stream of very useful and interesting mashups, with 46 Twitter apps listed here so far, including recent entries like the straightforward Twitterwatch that lets you see all the latest twitters as they are sent (full profile here).

Both comments and pings are currently closed.

7 Responses to “Twitter API Goes Geo”

May 2nd, 2008
at 4:03 am
Comment by: Charlie

Hmm, I thought twitter already did this. I’m using which has already been updating my twitter locations using some sort of api. I wonder what is different about this one…

May 2nd, 2008
at 4:28 am
Comment by: twitter-API mit Location-Support at notizBlog - a private weblog written by Matthias Pfefferle

[...] (via) « MyBlogLog ist OpenID-Profider [...]

May 2nd, 2008
at 11:02 am
Comment by: Raymond Yee

Charlie — I’m not familiar with It’s possible that didn’t/doesn’t use the API to update twitter locations. However, shows that the location update functionality in the Twitter API is new — or at least new to the public.

May 2nd, 2008
at 7:07 pm
Comment by: Shawn Miller

Makes a little bit cooler.

May 2nd, 2008
at 11:05 pm
Comment by: Twitter API Stuff at Twitterholics

[...] Programmable Web) Filed under Code, Reference | var disqus_url = ‘ ‘; [...]

May 26th, 2009
at 9:00 pm
Comment by: Twitter Search

thats great that you are talking about the twitter api,a good example of searching with the twitter api is on because you can search on twitter and google at the same time.

September 23rd, 2009
at 2:04 am
Comment by: Trendsmap Shows What’s Happening Where on Twitter

[...] a lot of fun information to play with using Trendsmap. Keep in mind this is coming before tweets get geocoded, so it’s merely using the location field people fill out in their Twitter profiles. In other [...]

Follow the PW team on Twitter

APIs, mashups and code. Because the world's your programmable oyster.

John Musser
Founder, ProgrammableWeb

Adam DuVander
Executive Editor, ProgrammableWeb. Author, Map Scripting 101. Lover, APIs.