Country

API

Free API to get visitor's country from IP address

Visit Website

Overview

The Country API provides a lightweight RESTful interface to retrieve country details using an IP address. Core endpoints include GET / (returns data for the requester’s current IP) and GET /{ip_address} (for a specific IP). Responses are JSON-formatted, containing fields like country name, ISO 3166-1 alpha-2/alpha-3 codes, and region. Ideal use cases include website localization (adapting content to user’s region), regional compliance checks (e.g., GDPR), targeted marketing, and customizing user experiences based on geographic location.

Example Integration (JavaScript)

script.js JS

fetch('http://country.is/')
  .then(res => res.json())
  .then(data => console.log(data))
  .catch(err => console.error(err));

Key Features

  • RESTful interface
  • JSON response format
  • No authentication required
  • Supports current and specific IP queries

Frequently Asked Questions

? Is Country API free to use?

Yes, the Country API is completely free for public use with no hidden charges.

? Does it require an API Key?

No, the Country API does not require any API key or authentication to access its endpoints.

? What is the response format?

The API returns responses in JSON format, including country details like name, ISO codes, and region information.

Top Alternatives

ipapi.co Compare

People Also Ask about Country

Country vs ipapi.co Country 2025 review

Tool Info

Pricing Free
Category Geocoding
Platform Public API

Pros

  • Extremely easy to integrate
  • Zero cost for public use

Cons

  • Potential rate limits for high-volume usage
  • No service level agreement (SLA)

More Geocoding Tools