You might also have an address, like “123 Main Street”, and want to validate the address or standardize the address in your application. To do that, you need a geocoding service.
Yahoo provides a nice geocoding service called Placefinder and developers can use this service in their applications quite easily.
Yahoo! PlaceFinder is a geocoding Web service that helps developers make their applications location-aware by converting street addresses or place names into geographic coordinates (and vice versa).
PlaceFinder recognizes a large number of place formats and returns rich geographic data about each result, including geographic coordinates, address components, and WOEID. The WOEIDs returned by the service can be passed to Yahoo!’s GeoPlanet API for further geographic enrichment and discovery.
First, get a key
Keys for Yahoo! services are easy to get. From what I can tell, most of their services are free for developers. And so is the developer key. So, navigate to here and get your key.