Country.is is a minimal API that tells your browser which country it is in. It uses IP geolocation with GeoLite2 data created by MaxMind, so there's no disruptive prompt.

Click below for a demo.

      fetch('https://api.country.is')
  .then((resp) => resp.json())
  .then((data) => alert(JSON.stringify(data)));