FREE API
IP Geolocation API
Get detailed geolocation data for any IP address including country, city, ISP, and more
GET
https://lx.com/api/v1/ip-lookup
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ip | string | Required | IP address to lookup |
Code Examples
curl -X GET "https://lx.com/api/v1/ip-lookup" -H "Content-Type: application/json"
fetch("https://lx.com/api/v1/ip-lookup")
.then(function(r) { return r.json(); })
.then(function(data) { console.log(data); });import requests
r = requests.get("https://lx.com/api/v1/ip-lookup")
print(r.json())<?php
$data = file_get_contents("https://lx.com/api/v1/ip-lookup");
print_r(json_decode($data, true));Example Response
{
"status": "success",
"data": {
"ip": "8.8.8.8",
"country": "United States",
"city": "Mountain View",
"isp": "Google LLC"
}
}