Public APIs
IP 2 Country favicon

IP 2 Country

Geocoding

Map an IP to a country.

IP 2 Country's website screenshot

About IP 2 Country

IP 2 Country is an IP geolocation API that maps IP addresses to countries, returning results in JSON format. It supports both IPv4 and IPv6 addresses, exposes GET and HEAD HTTP methods at a dedicated API endpoint, and is also available as an npm package. It was built by apilayer.

The service has migrated to ipapi.com, which now provides the underlying IP address geolocation and reverse IP lookup functionality, requiring a free API key obtained through ipapi.com. It is intended for developers who need to determine the country associated with an IP address within their applications.

Key features

  • Maps an IP address to its country via a JSON API
  • Supports both IPv4 and IPv6 addresses
  • GET/HEAD REST endpoint (e.g. /ip?5.6.7.8)
  • Available as an npm package

Frequently asked questions

Is there a free tier?

Yes, you can get a free API key by switching to ipapi.com, which IP2country is joining.

What protocols does the API support?

It supports both IPv4 and IPv6 addresses for IP-to-country lookups.

How do I access the API?

You can call the JSON API directly via GET or HEAD requests, or use the provided npm package.

Is this service still actively maintained standalone?

No, IP2country is joining ipapi.com, which offers a more advanced IP API with geolocation and reverse IP lookups.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product