Back to all APIs
IP Geolocation
PopularGet location, ISP, and threat data from any IP address
Category: GeolocationEndpoint:
/v1/ip/lookupAvg Response
<50ms
Uptime SLA
99.99%
Free Tier
1,000/mo
Quick Start
JavaScript / TypeScript
javascript
import { KhaleejiAPI } from '@khaleejiapi/sdk'; const client = new KhaleejiAPI('your_api_key'); const location = await client.ip.lookup('8.8.8.8'); console.log(location);// {// ip: "8.8.8.8",// country: "United States",// country_code: "US",// city: "Mountain View",// region: "California",// latitude: 37.386,// longitude: -122.084// }Python
python
from khaleejiapi import KhaleejiAPI client = KhaleejiAPI('your_api_key') location = client.ip.lookup('8.8.8.8') print(location)# {# "ip": "8.8.8.8",# "country": "United States",# "country_code": "US",# "city": "Mountain View",# "region": "California"# }cURL
curl
curl -X GET "https://khaleejiapi.dev/api/v1/ip/lookup?ip=8.8.8.8" \ -H "x-api-key: your_api_key" \ -H "Content-Type: application/json"