This is the tryout page for the public Geo2Country API.
You can click Example API call
for a sample call, which should result in "de" being detected.
You can also try to detect your country via your own geoposition or pick a maps position to tryout.
Future plans: Also offer country information api.
How it works: I took https://github.com/mledoze/countries and build enclosing rectangles first.
The possible matching countries are then checked against their polygons.