In this section, you can configure the Geolocation API to get the country code corresponding to the IP address. There are two types of APIs: a type that uses Geolocation databases downloaded to the own server and a type that hits an external REST API.
Please check the license and Terms & Use of each API.
The following API is a type that downloads the location information database to your server.
It’s a database released by MaxMind for free. In order to migrate to GeoLite2, it stops updating from March 2018 and will become impossible to download after January 1, 2019. In this plugin, it is written as Maxmind.
In addition, the followings provide the REST API for free. For each service, there are some restrictions on the number of calls per day and some require registration for API keys. Please check the terms of service of each service.