geoPlugin API

⭐ Beginner's Pick Geocoding / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

geoPlugin is a free IP geolocation API that also includes real-time currency conversion data alongside the location information. It identifies a visitor country, city, and local currency from their IP address without requiring any API key or registration. This makes it one of the simplest APIs to add to any web project.

💡

Beginner Tip

Passing no IP to the endpoint automatically looks up the requester IP, and the response includes currency data — so you can localize both language and pricing in a single API call.

Available Data

IP address details
latitude and longitude
city and country
timezone
ISP information
IP address information

Example Response

JSON Response
{
  "ip": "203.0.113.42",
  "city": "San Francisco",
  "region": "California",
  "country_code": "US",
  "latitude": 37.7749,
  "longitude": -122.4194,
  "timezone": "America/Los_Angeles",
  "isp": "Example ISP"
}

Field Reference

geoplugin_request The IP address that was looked up.
geoplugin_countryName Full country name for the IP address.
geoplugin_city Approximate city name for the IP address.
geoplugin_currencyCode ISO 4217 currency code for the country (e.g. USD, EUR).
geoplugin_currencyConverter Exchange rate from USD to the local currency.
geoplugin_latitude Approximate latitude of the IP address location.

Implementation Example

const url = "https://www.geoplugin.com/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

geoplugin_status: 404 The IP address provided was not found in the database.
Check that the IP is a valid public IPv4 address. Private IPs (192.168.x.x, 10.x.x.x) will not resolve to a location.
Empty currency fields The detected country may not have currency data available.
Fall back to a default currency (e.g. USD) if geoplugin_currencyCode returns an empty string.
Mixed HTTP/HTTPS content warning The geoPlugin base URL uses HTTP, which browsers flag when used on HTTPS pages.
Call the API from your server backend and relay the response to the frontend to avoid browser security warnings.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 20/20
✓ Reliability 7/15
Response Time 293ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Geocoding
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →