twitter-stream-townmeTownMe is trying to carve out a place for itself among the Yelps of the world with a smarter approach to how it collects location-based data. And it’s not just keeping that data for itself — it’s letting developers outside the company use it to build their own applications.

With the San Mateo, Calif. company’s just-announced application programming interface (API), developers may be able to start doing more interesting things with a user’s location (which can of course be provided by a smartphone’s GPS but has also become an option in web browsers like Firefox). You feed the API a set of latitude and longitude coordinates, and it can give you useful information — the neighborhood, nearby locations of interest, related tags, and more.

If you’re having a hard time wrapping your mind around what someone could do with this data, TownMe has built some basic demos. The first one involves location check-in, where you can provide a location, then TownMe populates a map with nearby places of interest. You can comment or check-in at different locations, and see what other check-ins have occurred. Basically, TownMe is giving you the first step toward creating a location-sharing app like Foursquare.

The second demo takes a location and returns a list of nearby messages posted on Twitter.

The third is a Greasemonkey script for Twitter that does two cool things: Any reference to a location using the format “::Moscone Center” is turned into a link to a relevant website, and any set of coordinates gets converted into a neighborhood. So rather than trying to decipher a set of numbers, you could see that someone was tweeting from, say, the Mission in San Francisco.

Where is this information coming from? Well, TownMe is trying to offer useful information about a much wider range of cities than what’s found on other websites, which often do well in major cities like San Francisco or New York, but are sparser elsewhere. To that end, rather than just writing content on its own, or asking users to do it, it has pulled in and structured a lot of the information that’s already online, such as US Census Data. (Users can enter their own information too.) That has allowed TownMe to do cool things like offer a map of yuppies in San Francisco, and another of cougars (older, single women).

With this API, and hopefully more to come, you may be able to build a yuppie map of your very own.

Update: Co-founder Elad Gil emailed me to highlight one aspect of the API that I glossed over:

This is not just a *read* API (where we send the developer lots of data) but also a *write* API (where the developer can write information to our servers onto their own unique “layer” on our geo-index).

Basically, we give each developer their own unique “virtual overlay” or “view” of all the points of interests and businesses that we have.  Developers can write information to these views that only they can uniquely access via the API.

This means that e.g.

a) If you are writing a check-in app (e.g. FourSquare or Britghkite) you can store all the check ins and comments on our backend in your own unique virtual layer that other developers can not access.
So the demo for check ins is 100% done in Javascript – with no additional server components.  As a developer this means you could literally write this sort of check-in app without touching a server.
b) If you are writing an augmented reality app, say a scavenger hunt, you can similarly *store* all the pots of gold, clues, directions etc. on our servers via the API.  So all you would need to do is to write some lightweight client side code to ping our API and then display the info from our API to the user.
As far as we know, this is not something that anyone else offers.  This should significantly speed up development time for any apps in this emerging area of mobile location services.