Country
APIFree API to get visitor's country from IP address
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)
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
People Also Ask about Country
Tool Info
Pros
- ⊕ Extremely easy to integrate
- ⊕ Zero cost for public use
Cons
- ⊖ Potential rate limits for high-volume usage
- ⊖ No service level agreement (SLA)