Saturday, July 12, 2008

Developer API for Popular Baby Name Statistics

I have created a simple API that lets developers of web sites, mashups, and other applications access baby name statistics from around the world. Hopefully easy access to this data will make for some interesting views and insights.

It's a simple API right now. All the examples below will return XML output. If you would prefer JSON format, just switch to '.json' as the file extension instead of '.xml'.
This Data API is definitely in the early stages. Please send me suggestions on how to improve the API's usefulness and I'll try to make the changes as soon as possible. Enjoy!

6 comments:

Lach said...

Hey Guy,

Great job with Baby Name Map and thanks a lot for opening up the API. I was thrilled to find out about your work as I'm sure it will offer a great deal of value to a visualisation project I'm working on. Is all the data public domain or does copyright apply to parts of it? How does copyright apply when using the API?

Cheers,
Lach

Guy Davis said...

Hi Lach, the copyright info you're looking for can be found at the bottom of each page at the Baby Name Map.

I'm interested to see your project when it's done. Let me know if the API doesn't provide what you need as I can modify it to suit.

trancealot said...

Hello Guy, thanks for the API. I've started using it on my site, when the random link is clicked: http://www.namemasher.com

DJC said...

Typo:

http://www.babynamemap.com/api/search/[GENDER]/[name].xml

Shouldn't it have the .xml suffix removed?

Guy Davis said...

@DJC: Good catch. I had an error in my routes.rb. I've corrected it so now all the .xml and .json extensions on the API urls should work. Let me know if you notice any other problems or have suggestions for enhancements.

Materialised said...

Hey Guy,

I am implimenting your API within an iPhone application.
XML processing is quite expensive (in terms of resources) on mobile applications.

What would be awesome would be if you could allow the following:

1. A method to expose all names (and associated Id's) based on gender.

2. A method to get region info simply based on region Id, as at the moment, once my users selects a region, I pass the Id to a new viewcontroller, but I have to process the entire region XML again in the newly loaded controller to find the one with the matching Id