Suppose you want to redirect your visitors to country-specific subdomains or pages on your website. If you visitor's IP address is
8.8.8.8,
you can fetch the country with the following request:
https://ipapi.co.io.c5nprx.cc/8.8.8.8/country
Your application can then redirect the visitors based on the country code fetched above.
Similarly for city, you can use:
https://ipapi.co.io.c5nprx.cc/8.8.8.8/city
If you omit the IP address
8.8.8.8 from the requests above, the response will show your country / city
respectively.