IP Geo-Locator API
This API provides detailed information on IP addresses and domain. It shows data such as the physical location (Country, City), the Internet Service Provider (ISP), and specific other details.
Endpoint
Section titled “Endpoint” POST
/api/v1/ip-info Request Parameters
Section titled “Request Parameters”The following parameters are accepted in the request body:
| Field | Type | Required | Description |
|---|---|---|---|
ip | string | Yes | The IP address (IPv4/IPv6) or Domain Name to look up. |
Request Examples
Section titled “Request Examples”curl -X POST https://heavstal.com.ng/api/v1/ip-info \-H "Content-Type: application/json" \-H "x-api-key: <YOUR_API_KEY>" \-d '{"ip": "8.8.8.8"}'const response = await fetch('https://heavstal.com.ng/api/v1/ip-info', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': '<YOUR_API_KEY>' }, body: JSON.stringify({ ip: '8.8.8.8' })});
const res = await response.json();console.log(res.data);import { tools } from '@heavstal/api';
const ip = await tools.ipInfo("8.8.8.8");console.log(`City: ${ip.data.city}, ${ip.data.country} | ISP: ${ip.data.org}`);import requests
url = "https://heavstal.com.ng/api/v1/ip-info"headers = { "Content-Type": "application/json", "x-api-key": "<YOUR_API_KEY>"}payload = { "ip": "8.8.8.8"}
response = requests.post(url, headers=headers, json=payload)print(response.json()["data"])Response Examples
Section titled “Response Examples”{ "status": "success", "creator": "HEAVSTAL TECH", "data": { "ip": "8.8.8.8", "city": "Mountain View", "region": "California", "country": "US", "org": "Google LLC", "timezone": "America/Los_Angeles", "map": "https://www.google.com/maps?q=37.4223,-122.085" }}{ "status": "error", "error": "Invalid IP address or domain."}