Using the ip-api.com JSON API and ResolveIp we can get the country where a site is hosted:
The following API request http://ip-api.com/json/18.104.22.168 returns this JSON response:
So we use ResolveIp to get the ip of the site and JsonPathOnUrl on to parse the result:
Note the usage limits from their documentation:
Our system will automatically ban any IP addresses doing over 250 requests per minute. You are free to use ip-api.com for non-commercial use. We do not allow commercial use without prior approval.
Note that I added a interval between request of 240ms between requests using HttpSettings to make sure my IP won't get blocked.