IP Geolocation API

Get detailed location information from IP addresses with our simple and reliable geolocation API.

Overview

API Plugin's IP Geolocation API provides accurate location data for any IP address. Perfect for location-based customization, fraud prevention, and analytics.

Key benefits include:

  • Accurate location data
  • Fast response times
  • Simple integration
  • Comprehensive data
  • Real-time lookups
  • IPv4 support
  • Reliable service

Available Endpoint

GET /v1/{appId}/{token}

Query Parameters:

  • ip (optional): IP address to lookup. If not provided, detects the client's IP address.

Example Requests:

# Lookup specific IP
GET /v1/{appId}/{token}?ip=8.8.8.8

# Lookup client IP
GET /v1/{appId}/{token}

Example Response:

{
    "ip": "8.8.8.8",
    "continent": "North America",
    "country": "United States",
    "country_code": "US",
    "region": "California",
    "region_code": "CA",
    "city": "Mountain View",
    "zip": "94043",
    "latitude": 37.4223,
    "longitude": -122.0847,
    "timezone": "America/Los_Angeles",
    "isp": "Google LLC",
    "org": "Google Public DNS",
    "as": "AS15169 Google LLC"
}

Example Code

// Lookup specific IP
const response = await fetch('/v1/{appId}/{token}?ip=8.8.8.8');
const data = await response.json();
console.log(`Location: ${data.city}, ${data.country}`);

// Get client IP location
const clientLocation = await fetch('/v1/{appId}/{token}');
const locationData = await clientLocation.json();
console.log(`Your location: ${locationData.city}`);