Playing with Placemaker

Yahoo’s latest API is really quite cool: Placemaker takes your unstructured data (e.g. any HTML page, RSS feed, etc), and extracts a nice list of locations that your data refers to. It’s a brilliant tool, and I can think of quite a few ways I’d like to use it in the future. Along with their release of a ton of WhereOnEarth ID codes that allows you to make use of Yahoo’s various geo-services, this is a really good day to play with geocoding unstructured data.

So, let’s play:

Accessing Placemaker is simple: assuming that you’ve somehow managed to obtain an application id, you simply make an HTTP POST request to Yahoo!’s Placemaker endpoint with a tiny bit of data specifying the nature of the data you’re dealing with, and it’s URL. If you like curl on the command line, this might look like:

curl -d 'inputLanguage=en-US&documentType=text/html&documentURL=http://mikewest.org/&appid=[APPID]' http://wherein.yahooapis.com/v1/document

You’ll get back an XML document (RSS is also available as a response format). Digging into the contents yields:

Full documentation of the Placemaker query parameters and response format are available on YDN. Christian has put together a demo of a basic PHP implementation (though it’s XSSable, and shouldn’t ever be used in production).

In general, this is brilliant stuff. I’m looking forward to playing with it!