Country name for GPS coordinates

Just for the reference, geonames.org also has a nice webservice, but it's rate limited (which was an issue in my case since I had to look up a big batch of coordinates).

Example: http://ws.geonames.org/findNearbyPlaceName?lat=47.3&lng=9


EDIT: The Yahoo Where API is no longer available.

Try the Yahoo! APIs.

Latitude and Longitude

Latitude and longitude can be specified for the location parameter. Latitude and longitude may be expressed as decimal degrees or degrees-minutes-seconds, with either leading or trailing directionals or leading signs. If directionals are provided, longitude may appear before latitude. If directionals are not provided, longitude may appear before latitude if it is outside the range -90 to 90. Otherwise, the latitude must appear first. Punctuation marks (commas, degrees, minutes, seconds) are ignored.

Examples: 

•50.3 -120.5
•50.3, -120.5
•-120.5 50.3
•50.3 N 120.5 W
•120.5 W 50.3 N
•50 18 0 -120 30 0
•50 18 0 N 120 30 0 W
•50° 18' 0" N 120° 30' 0" W

The response element will give you the country, as well as many other elements.

Don't forget to send as parameter gflags=R, to make the reverse geocoding. If you want the output in json, send the parameter flags=J as well.