Getting Location from an IP Address
The Ipregistry API enables location lookup for IPv4 or IPv6 addresses. It includes the country, city, region, postal code, borders, population and more.
Below are some common usage patterns from a variety of programming languages and libraries:
YOUR_API_KEYby your own API key in the following to get a working example.
The following are basic code snippets for quick testing. They do not handle possible error cases. For advanced use cases, we recommend using Ipregistry client libraries.