I am working on a location-based service platform, that will be coordinate based. In ideal situations, I can have the GPS grab the coordinates. However, I would like to have a fallback where I would have an autocompleting text field in which a user can input the address/name of the place. The autocomplete dialog would try to make a smart guess what the place is, just like how it would work in Google Maps when you try to search for a location.
Is there an API for this?
You can use the Google Places API.
There is also a handy jQuery plugin called geo-autocomplete that can help you with this.
See also the Google example, and documentation.