Answer 1, Authority 100%
I advise you to read this article The definition of the city by the IP address .
And in general, the site is very useful and interesting
Answer 2, Authority 100%
Since the question sounded like “Are there any services or methods …”, then here is an example of such a service: The Entire Geolocation Base of IPv4, IPv6, Domain Names . If you believe the description on the site, it provides the following features:
- Geolocation API countries and cities on IPv4, IPv6 and domain names;
- API to define VPN addresses;
- API terminal nodes and providers;
- API addresses from black lists.
I use the API from https://ipwhois.io/ru/ , in general, it suits. Accuracy is normal.