News for hackers. Stuff that matters.

Ask HN: API Design?

I am interested in adding an official API to my site. Any links/tips/tricks/books? I'd rather take the time to make it close to right the first time, as opposing to break a bunch of things down the line. API Design is not my strong suit.

thanks

( 6 comments | 11 points | on HN )
Re:Ask HN: API Design? by JimEngland on Wednesday July 09, 2008 @04:40PM (#241636)
Here is a useful set of links:

http://neuroning.com/articles/2006/11/19/on-api-design-guide...

http://lcsd05.cs.tamu.edu/slides/keynote.pdf

It might be hard for us to try and help you out without knowing the project in detail, but follow the guidelines of that Google Keynote and you should be just fine.

Re:Ask HN: API Design? by thomasswift on Wednesday July 09, 2008 @05:00PM (#241656)
thanks, great links. I guess something similar to the tumblr api, which I have been eyeing to model mine after, but with some differences.
Re:Ask HN: API Design? by cmer on Wednesday July 09, 2008 @09:29PM (#241882)
Here's the podcast of a talk I (and many others) gave on APIs at South by Southwest. I think it provides some great guidelines.

http://blog.carlmercier.com/2008/06/17/podcast-building-deve...

Re:Ask HN: API Design? by thomasswift on Wednesday July 09, 2008 @11:39PM (#241986)
very cool thank you
Re:Ask HN: API Design? by sh1mmer on Thursday July 10, 2008 @09:13AM (#242349)
Read the O'Reilly RESTful Web Services book. It's a great explanation of why REST is good, and has a bunch of design patterns for the major pit falls.

You could also look at some of the tricks we use at Yahoo. One thing I think is important is the way we handle JSON (http://developer.yahoo.com/common/json.html).

Re:Ask HN: API Design? by rsa on Thursday July 10, 2008 @02:37AM (#242123)