API Documentation
The ip-lookup.net API provides programmatic access to IP geolocation, WHOIS data, and DNS lookups. All endpoints return JSON. No authentication is required for up to 10 requests/day per IP. Register a free API key at /api-keys to increase your limit to 100 requests/day.
Base URL
https://ip-lookup.net/api/v1
Authentication
Pass your API key via the X-Api-Key request header or the ?key= query parameter.
# Header (recommended) curl -H "X-Api-Key: iplk_your_key_here" https://ip-lookup.net/api/v1/ip/8.8.8.8 # Query parameter curl "https://ip-lookup.net/api/v1/ip/8.8.8.8?key=iplk_your_key_here"
Rate Limits
| Tier | Limit | Reset |
|---|---|---|
| Anonymous (no key) | 10 req / day | 00:00 UTC |
| Free API key | 100 req / day | 00:00 UTC |
Rate limit headers are included in every response:X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset.
Endpoints
GET/api/v1/ip/:address
Returns geolocation and WHOIS data for any IPv4 or IPv6 address.
Example request
curl -H "X-Api-Key: iplk_your_key_here" \ https://ip-lookup.net/api/v1/ip/8.8.8.8
Example response
{
"success": true,
"ip": "8.8.8.8",
"geo": {
"ip": "8.8.8.8",
"hostname": "dns.google",
"country": "United States",
"countryCode": "US",
"region": "Virginia",
"city": "Ashburn",
"zip": "20149",
"lat": 39.03,
"lon": -77.5,
"timezone": "America/New_York",
"isp": "Google LLC",
"org": "Google Public DNS",
"asn": "AS15169 Google LLC"
},
"whois": {
"name": "GOGL",
"handle": "NET-8-8-8-0-1",
"range": "8.8.8.0 - 8.8.8.255",
"cidr": "8.8.8.0/24"
}
}Response fields — geo
| Field | Type | Description |
|---|---|---|
| ip | string | The queried IP address |
| hostname | string | null | Reverse DNS hostname |
| country | string | Full country name |
| countryCode | string | ISO 3166-1 alpha-2 country code |
| region | string | Region / state name |
| city | string | City name |
| zip | string | Postal code |
| lat | number | Latitude |
| lon | number | Longitude |
| timezone | string | IANA timezone identifier |
| isp | string | Internet Service Provider name |
| org | string | Organization name |
| asn | string | Autonomous System Number and name |
Response fields — whois
| Field | Type | Description |
|---|---|---|
| name | string | Network name / handle |
| handle | string | ARIN/RDAP network handle |
| range | string | IP range (start – end) |
| cidr | string | CIDR notation of the network block |
GET/api/v1/domain/:domain
Resolves a domain to its IP address and returns MX and NS records.
Example request
curl -H "X-Api-Key: iplk_your_key_here" \ https://ip-lookup.net/api/v1/domain/github.com
Example response
{
"success": true,
"domain": "github.com",
"ip": "140.82.121.4",
"geo": {
"country": "United States",
"countryCode": "US",
"city": "Seattle",
"isp": "GitHub, Inc.",
"asn": "AS36459 GitHub, Inc."
},
"mx": [
{ "priority": 1, "exchange": "aspmx.l.google.com" }
],
"ns": ["dns1.p08.nsone.net", "dns2.p08.nsone.net"]
}POST/api/v1/keys
Request a free API key. Provide your email address in the JSON body. If a key already exists for that email, it is returned instead of creating a duplicate.
Request body
{ "email": "[email protected]" }Example response
{
"success": true,
"message": "API key created successfully.",
"key": "iplk_g9BJfDyOmYsES4NRHGAPeRA8q2Gy",
"dailyLimit": 100,
"note": "Include your key as the X-Api-Key header or ?key= query parameter."
}GET/api/v1/keys/usage
Check today's usage for your API key.
curl -H "X-Api-Key: iplk_your_key_here" \ https://ip-lookup.net/api/v1/keys/usage
{
"success": true,
"email": "yo***@example.com",
"dailyLimit": 100,
"usageToday": 12,
"remaining": 88,
"totalUsage": 347,
"isActive": true
}Error Codes
| Field | Type | Description |
|---|---|---|
| INVALID_IP | 400 | The IP address format is invalid |
| INVALID_DOMAIN | 400 | The domain name format is invalid |
| INVALID_EMAIL | 400 | The email address format is invalid |
| KEY_REQUIRED | 400 | An API key is required for this endpoint |
| INVALID_KEY | 401 | The API key was not found |
| KEY_DISABLED | 403 | The API key has been disabled |
| RATE_LIMIT_EXCEEDED | 429 | Daily request limit reached |
| DB_UNAVAILABLE | 503 | Database temporarily unavailable |
| LOOKUP_FAILED | 500 | The upstream lookup failed |