Overview

geoPlugin offers a suite of web services primarily focused on IP geolocation and currency conversion. Established in 2006, the service allows developers to determine the geographical location of an IP address, including country, city, region, and coordinate data. This capability supports various application functionalities, such as personalizing website content based on a user's origin, localizing prices and language settings, and performing basic geographic-based access controls or fraud checks. For instance, an e-commerce platform might display prices in a customer's local currency or restrict access to certain content based on their detected country.

The core offering is the IP Geolocation API, which processes an IP address and returns a structured dataset in either JSON or XML format. The returned data typically includes the country code, country name, city, region, latitude, longitude, and an estimated accuracy radius. This data can be used to tailor user experiences, for example, by pre-filling country fields in forms or presenting region-specific news. Additionally, geoPlugin provides a Currency Converter API that delivers real-time exchange rates, enabling applications to display financial information in a user's local denomination without requiring manual rate updates. This is particularly useful for international businesses or travel applications.

geoPlugin is designed for developers seeking a straightforward, HTTP-based API for common geolocation and currency tasks. It does not provide advanced features like reverse geocoding (converting coordinates to addresses) or complex routing, distinguishing it from more comprehensive mapping platforms such as ArcGIS Geocoding Service. Its ease of integration and clear documentation make it suitable for applications where basic, reliable IP-to-location data and currency exchange rates are primary requirements. The service operates with a free tier that accommodates up to 120 requests per minute, allowing for evaluation and use in projects with moderate traffic before considering paid plans. The developer experience is noted for its simplicity, requiring standard HTTP client integration without official SDKs, which streamlines adoption for developers comfortable with direct API calls as detailed in the geoPlugin PHP web services documentation.

Key features

  • IP Geolocation API: Translates an IP address into geographical data, including country, city, region, latitude, longitude, and timezone. This is useful for content localization and basic user profiling.
  • Currency Converter API: Provides current exchange rates for various currencies, facilitating the display of localized pricing and financial information.
  • JSON and XML Output: Supports both JSON and XML response formats, allowing developers to choose the most suitable data structure for their application. The geoPlugin JSON API reference details the available fields.
  • Country Code and Name Lookup: Returns ISO 3166-1 alpha-2 country codes and full country names, useful for internationalization efforts.
  • Regional Data: Supplies region names and codes, enabling more granular geographic targeting than just country-level data.
  • Timezone Information: Provides the detected timezone for the IP address, assisting with time-sensitive applications.

Pricing

As of May 2026, geoPlugin offers a free tier and several paid subscription plans. The free tier is suitable for development and low-traffic applications, providing a limited number of requests per minute. Paid plans increase the request limits and may offer additional features or support.

Plan Requests Per Minute Monthly Cost Features
Free Up to 120 $0 Basic IP geolocation, currency conversion
Pro Up to 500 $10 All Free features, increased rate limits
Business Up to 2,000 $35 All Pro features, higher rate limits, priority support
Enterprise Custom Custom All Business features, dedicated infrastructure, tailored support

For the most current pricing details and specific plan inclusions, refer to the official geoPlugin pricing page.

Common integrations

geoPlugin's straightforward HTTP API design allows for integration into a wide range of applications and platforms. While no official SDKs are provided, its compatibility with standard web request methods means it can be used with virtually any programming language or web framework.

  • Web Servers (Apache, Nginx): Can be integrated into server-side scripts (e.g., PHP, Python, Node.js) to perform IP lookups upon user request, enabling server-side content personalization or logging. The geoPlugin PHP web services guide offers usage examples.
  • E-commerce Platforms: Used to display local currency prices, pre-select country options during checkout, or apply region-specific taxes.
  • Content Management Systems (CMS): Dynamic content delivery systems can use geoPlugin to serve localized versions of pages, articles, or advertisements based on a visitor's geographic location.
  • Data Analytics and Logging Tools: Integrate geolocation data with user activity logs to analyze traffic patterns by region, helping to understand user demographics and engagement.
  • CRM Systems: Enrich customer profiles with geographic data obtained from their IP addresses, supporting targeted marketing and sales efforts.
  • Security and Fraud Detection Systems: Implement basic checks to flag suspicious activity originating from unexpected locations or to enforce geographic access restrictions.

Alternatives

Developers seeking IP geolocation and related services have several alternatives, each with different feature sets and pricing models.

  • ipstack: Provides IP to location, ASN, and currency data, often with a focus on ease of integration and a wider range of data points.
  • Abstract API (IP Geolocation): Offers a dedicated IP geolocation API as part of a broader suite of developer APIs, known for its consistent data and developer-friendly approach.
  • MaxMind GeoIP2: A long-standing provider of IP intelligence, offering highly accurate geolocation data through both databases and web services, suitable for high-volume and precision-critical applications.
  • Cloudflare Workers' IP Geolocation: For users already on Cloudflare, the platform provides IP geolocation data directly within the request object for serverless functions, offering an integrated solution without external API calls.

Getting started

Integrating geoPlugin typically involves making a simple HTTP GET request to its API endpoint. The service supports both JSON and XML responses, with JSON being the default and generally recommended for modern web applications. Below is a PHP example demonstrating how to retrieve geolocation data for a given IP address and extract key information like country and city. This example uses file_get_contents for simplicity, but in a production environment, a more robust HTTP client (like cURL) would be recommended for better error handling and performance.

<?php
$user_ip = $_SERVER['REMOTE_ADDR']; // Get the user's IP address

// Fallback for local development or specific testing
if ($user_ip == '::1' || $user_ip == '127.0.0.1') {
    $user_ip = '8.8.8.8'; // Example IP for testing (Google DNS)
}

$geoplugin_url = "http://www.geoplugin.net/json.gp?ip=" . $user_ip;

$data = file_get_contents($geoplugin_url);
$geoplugin_data = json_decode($data, true);

if ($geoplugin_data && $geoplugin_data['geoplugin_status'] == 200) {
    echo "<h3>Geolocation Information:</h3>";
    echo "<p>Country: " . htmlspecialchars($geoplugin_data['geoplugin_countryName']) . " (" . htmlspecialchars($geoplugin_data['geoplugin_countryCode']) . ")</p>";
    echo "<p>City: " . htmlspecialchars($geoplugin_data['geoplugin_city']) . "</p>";
    echo "<p>Region: " . htmlspecialchars($geoplugin_data['geoplugin_regionName']) . "</p>";
    echo "<p>Latitude: " . htmlspecialchars($geoplugin_data['geoplugin_latitude']) . "</p>";
    echo "<p>Longitude: " . htmlspecialchars($geoplugin_data['geoplugin_longitude']) . "</p>";
    echo "<p>Currency Symbol: " . htmlspecialchars($geoplugin_data['geoplugin_currencySymbol']) . "</p>";
} else {
    echo "<p>Could not retrieve geolocation data or an error occurred. Status: " . htmlspecialchars($geoplugin_data['geoplugin_status'] ?? 'N/A') . "</p>";
}

// Example of currency conversion (assuming you have an amount)
$amount_usd = 100;
if (isset($geoplugin_data['geoplugin_currencyCode'])) {
    $currency_code = $geoplugin_data['geoplugin_currencyCode'];
    $currency_url = "http://www.geoplugin.net/currency.gp?from=USD&to=" . $currency_code;
    $currency_data_raw = file_get_contents($currency_url);
    $currency_data = json_decode($currency_data_raw, true);

    if ($currency_data && isset($currency_data['geoplugin_currencyConverter'])) {
        $converted_amount = $amount_usd * $currency_data['geoplugin_currencyConverter'];
        echo "<h3>Currency Conversion:</h3>";
        echo "<p>" . $amount_usd . " USD is approximately " . round($converted_amount, 2) . " " . htmlspecialchars($currency_code) . "</p>";
    } else {
        echo "<p>Could not retrieve currency conversion data.</p>";
    }
}

?>

This PHP snippet first attempts to get the client's IP address. For local testing, it defaults to a public IP. It then constructs the URL for the IP geolocation API and fetches the JSON response. After decoding, it prints relevant geographical details and the local currency symbol. A second part of the example demonstrates how to use the currency conversion API to convert a USD amount into the detected local currency, showcasing the dual functionality of geoPlugin's services. Developers should consult the geoPlugin web services documentation for more advanced usage patterns and error handling.