All I want is to get the geocode for the given address.Im doing it in Java. Earlier I used the url like
"http://maps.google.com/maps/geo?q=" +URLEncoder.encode(addrToFind, ENCODING) + "&output=csv&key=" + MyKEY
it returned me comma separated result like (status_code,lat,lng,precision) Then for some alien reasons this url started giving me status code 610(invalid api key) I regenerated the Browser key from Google but in vain.
Then i got another way to geocode the new url just trucated the 'geo' word in previous url
"http://maps.google.com/maps?q="+URLEncoder.encode(postcode, "UTF-8");
I extracted latitude and longitude from end result of this url but i noticed that this url gives me the whole html page as its response while all i want is just lat lng and precision.
Then I finally found a whole new url "//maps.googleapis.com/maps/api/geocode/json?sensor=false&address="+address_to_geocode; This gives me the Json response from which i extracted required information.This url doesnt ask for api key too. What is the correct way of doing Geocod from above 3 or is there any other optimal way ?