The Google Maps API is a JavaScript library. However Google offers its Geocoding Services through a client-side API in JavaScript and though a server-side web service.
This is an example on how to use the JavaScript geocoder:
function initialize() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"));
geocoder = new GClientGeocoder();
geocoder.getLatLng(
"London, UK",
function(point) {
if (point) {
map.setCenter(point, 13);
var marker = new GMarker(point);
map.addOverlay(marker);
}
}
);
}
}
The following is an example showing how to get the latitude and longitude of an address on the server-side using php:
$url = 'http://maps.google.com/maps/geo?q=London,+UK&output=csv&sensor=false';
$data = @file_get_contents($url);
$result = explode(",", $data);
echo $result[0]; // status code
echo $result[1]; // accuracy
echo $result[2]; // latitude
echo $result[3]; // longitude
You understood the free geocoding quota correctly. Server-side geocoding is limited to 15k requests per day per server, while client-side geocoding is limited to 15k requests per day per client. You would need the Google Maps API Premier to increase these limits.