Loading API DOCS...

IP Geolocation API

Get detailed geolocation data for any IP address including country, city, ISP, and more

Endpoint

GET https://lx.com/api/v1/ip-lookup

Parameters

ParameterTypeRequiredDescription
ip string Required IP address to lookup

Code Examples

cURL
curl -X GET "https://lx.com/api/v1/ip-lookup" -H "Content-Type: application/json"
JavaScript
fetch("https://lx.com/api/v1/ip-lookup")
  .then(function(r){return r.json()})
  .then(function(d){console.log(d)});
Python
import requests
r = requests.get("https://lx.com/api/v1/ip-lookup")
print(r.json())
PHP
<?php
$d = file_get_contents("https://lx.com/api/v1/ip-lookup");
print_r(json_decode($d, true));

Example Response

{
    "status": "success",
    "data": {
        "ip": "8.8.8.8",
        "country": "United States",
        "city": "Mountain View",
        "isp": "Google LLC"
    }
}