GeoPluck IP Geolocation API Documentation

Comprehensive reference for the GeoPluck IP Geolocation Web Service

Introduction

GeoPluck provides a free web service that can be used to find the location of an IP address. The service provides information such as the country, region, city, latitude and longitude, timezone, and ISP for both IPv4 and IPv6 addresses.

GeoPluck is free to use right now. Simply include your API key with each request. Requests are rate limited to keep the service fast and reliable for everyone.

Rate Limits

GeoPluck is free and rate limited per user to protect reliability.

Limit: 120 requests per minute per user. If you exceed this, you will receive a 429 response and can retry after a short delay.

Basic Usage

The GeoPluck API provides a simple way to retrieve geolocation information for any IP address. Our service is RESTful and returns JSON responses.

GET https://www.geopluck.com/api/lookup?ip=8.8.8.8&auth=YOUR_API_KEY_HERE

Query Parameters

Parameter Description Required
ip A valid IPv4 or IPv6 address. If omitted, the API will use the requesting client's IP address. No
auth Your API key you've retrieved from your account dashboard Yes

Example Request

GET https://www.geopluck.com/api/lookup?ip=8.8.8.8&auth=gp_your_api_key_here

Example Response

{
  "success": true,
  "data": {
    "ip": "8.8.8.8",
    "continent": "North America",
    "continent_code": "NA",
    "country": "United States",
    "country_code": "US",
    "city": "Mountain View",
    "region": "California",
    "region_code": "CA",
    "postal": "94043",
    "latitude": 37.4056,
    "longitude": -122.0775,
    "timezone": "America/Los_Angeles",
    "time_zone": {
      "id": "America/Los_Angeles",
      "current_time": "01/03/2026, 09:00:00 AM",
      "code": "PST",
      "utc_offset": -28800
    },
    "currency": "USD",
    "language": "en",
    "language_details": {
      "code": "en",
      "name": "English",
      "native": "English"
    },
    "country_flag_emoji_unicode": "U+1F1FA U+1F1F8",
    "isp": "Google LLC",
    "organization": "Google LLC",
    "asn": "AS15169",
    "user_agent": {
      "is_mobile": false,
      "is_tablet": false,
      "is_desktop": true,
      "is_bot": false,
      "browser": "Chrome",
      "browser_version": "120.0.0.0",
      "operating_system": "Windows 10.0",
      "platform": "Microsoft Windows",
      "source": "Mozilla/5.0"
    }
  }
}

Current IP Detection

You can detect the location of the requesting IP address without specifying an IP parameter. Simply omit the IP parameter from the request, or use the dedicated endpoint.

Method 1: Omit IP Parameter

GET https://www.geopluck.com/api/lookup?auth=YOUR_API_KEY_HERE

Method 2: Use /me Endpoint

GET https://www.geopluck.com/api/me?auth=YOUR_API_KEY_HERE

Country Flags

The GeoPluck API can also provide country flag images for IP addresses.

GET https://www.geopluck.com/api/flag?ip=8.8.8.8&auth=YOUR_API_KEY_HERE

Query Parameters

Parameter Description Required
ip A valid IPv4 or IPv6 address. If omitted, the API will use the requesting client's IP address. No
auth Your API key you've retrieved from your account dashboard Yes

Example Request

GET https://www.geopluck.com/api/flag?ip=8.8.8.8&auth=gp_your_api_key_here

The flag_url returned by the API can be used directly in an HTML img tag:

<img src="https://www.geopluck.com/api/flag/64/us.png" alt="US Flag" width="64" height="64">

Response Format

All GeoPluck API responses follow a consistent JSON format with a success flag and data object.

Field Descriptions

Field Type Description
success boolean Indicates whether the request was successful
data object Contains the geolocation data
ip string The IP address that was looked up
country string The full country name
country_code string The ISO 3166-1 alpha-2 country code
city string The city name
region string The region or state name
region_code string The ISO region code
latitude number The latitude coordinate
longitude number The longitude coordinate
timezone string The timezone identifier
postal string The postal or ZIP code
language string Primary language code for the country
language_details object Language name and native name for the language code
isp string The Internet Service Provider name
organization string The organization associated with the IP
asn string The Autonomous System Number

Additional fields may appear when available: continent, continent_code, currency, language, language_details, country_flag_emoji_unicode, time_zone, user_agent.

Error Handling

When an error occurs, the GeoPluck API returns an appropriate HTTP status code along with an error message.

Error Response Format

{
  "success": false,
  "error": "Error message describing what went wrong"
}

HTTP Status Codes

Status Code Description
200 OK Request successful.
400 Bad Request Missing or invalid parameters.
401 Unauthorized Invalid or missing API key.
403 Forbidden API key is inactive or does not have permission.
404 Not Found Geolocation data not found for the IP address.
429 Too Many Requests Rate limit exceeded. Please retry after a short delay.
500 Internal Server Error Something went wrong on our end.

Ready to Get Started?

Sign up for a free API key and start using GeoPluck today.

Get a Free API Key