Yahoo broke their GeoCode API

UPDATE:
It appears to be working again today (Saturday, 3 days after the first reports). I wasn’t able to make the switch to Google’s yet, so I’ll still use Yahoo’s for now. But, there are some changes I need to make to better prepare if something like this happens again.

Yahoo rolled out some updates to their Maps API on Tuesday night, but unfortunately they broke their Geocode API in the process. I know, I know, don’t rely on free APIs, nothing like a day without new users to drive that point home. In spite of knowing I shouldn’t rely on this API, I’m troubled by the way this was broken. I would expect better from Yahoo, who put a lot of resources into their developer network.

First, they didn’t version this release, it’s still “V1″. If they had bumped the version and kept the old one around, the problem could have been avoided. Secondly, it’s essentially a schema problem which are much more difficult to code around than the service being down or throwing errors. While the response still technically passes schema validation, it’s easy to see that the data is not right. Third, it is still not fixed after they’ve known about it for over a day.

Here’s the bug. Run a zip code lookup:

http://local.yahooapis.com/MapsService/V1/geocode?appid=YahooDemo&zip=97201

this is the response:


<?xml version="1.0"?>
<ResultSet>
   <Result precision="zip">
      <Latitude>45.507542</Latitude>
      <Longitude>-122.689796</Longitude>
      <Address></Address>
      <City>Portland, OR  97201</City>
      <State>United States</State>
      <Zip></Zip>
      <Country>US</Country>
   </Result>
</ResultSet>
<!-- ws03.search.scd.yahoo.com compressed Thu May 17 09:55:39 PDT 2007 -->

The city, state and zip are combined into the city field while the country is put into the state field. Whoops. So the city field has to be further parsed in order to put the data in the right place. I use this service to take care of that for me, and don’t have time at the moment to do it. So, I bumped the limit on my state field in the database in order to work around this, but my geo data will be all messed up until this is fixed and then I’ll have to go back through and clean it up.

I’d argue that zip code lookups are fairly common and there should be a test case for this. Time to look at Google’s geocoder I suppose.

4 thoughts on “Yahoo broke their GeoCode API

  1. I’d expect that too, but two days later and still nothing, with no more than an “our apologies” from Y! in their yws-maps Y! group that they posted after the initial bug report. Definitely time to switch to Google’s API. Or better yet, put a layer in between that can use either one.

  2. Not anymore. It was fixed that Saturday, about 3 days after the bug popped up. Saved me from having to do major data surgery.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>