How retrieve latitude and longitude via Google Maps API?
I am not sure if you are requesting a way of getting latitude and longitude via code(although you did say API :) ), If you are then there are a million posts out there which will show you how(including the ones above), but if you are interested in some kinda utility which just tells you where you are clicking , then Google-maps already comes with it. check out his post here on how to enable that functionality.
http://varunpant.com/posts/find-longitude-and-latitude-in-google-maps