I was looking if there was any standards for writing Javascript API documentation and if there is a tool to parse and generate the document.

I found one which does this http://jsdoc.sourceforge.net/, seems like it solves the purpose I am looking for, have to try it out.