The IP API provides comprehensive IP address intelligence including geolocation, ISP information, security threat detection, proxy/VPN identification, and network details.
Overview
Get detailed information about any IP address including:
- Accurate geolocation (country, region, city, coordinates)
- ISP and network information (ASN, organization)
- Security analysis (proxy, VPN, Tor detection)
- Threat intelligence from multiple sources
- Mobile carrier detection
- Timezone information
Authentication
All API requests require authentication using your API key. Include your API key in the request header:
X-API-Key: your_api_key_here
Alternatively, you can pass it as a query parameter:
?api_key=your_api_key_here
Endpoint
GET/api/v1/ip/{ip}
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
ip |
string | Yes | The IP address to analyze (IPv4/IPv6) |
Response Format
The API returns a JSON object with comprehensive IP information:
{
"ip": "8.8.8.8",
"hostnames": [
"dns.google"
],
"location": {
"continent": {
"name": "North America",
"code": "NA",
"hemisphere": [
"north",
"west"
]
},
"country": {
"name": "United States",
"code": "US",
"alpha3_code": "USA",
"numeric_code": 840,
"capital": "Washington, D.C.",
"demonym": "American",
"population": 329484123,
"total_area": 9372610,
"tld": "us",
"currency": {
"code": "USD",
"name": "United States dollar",
"symbol": "$"
},
"language": {
"code": "ENGLISH",
"name": "English"
},
"calling_codes": "+1201"
},
"region": {
"name": null,
"code": null
},
"city": {
"name": null
},
"latitude": 37.751,
"longitude": -97.822,
"zip_code": null,
"metro_code": null,
"accuracy_radius": 1000
},
"network": {
"asn": "15169",
"organization": "GOOGLE",
"isp": "GOOGLE",
"usage_type": "Data Center",
"net_speed": "T1",
"mobile": {
"is_mobile": false,
"mcc": null,
"mnc": null,
"brand": null
},
"registration_date": null
},
"time_zone": "America/Chicago",
"security": {
"is_proxy": false,
"proxy_type": null,
"is_tor": false,
"is_vpn": false,
"is_datacenter": true,
"is_spammer": false,
"threat_level": "none"
},
"ads": {
"category_code": "IAB19-18",
"category_name": "Internet Technology"
},
"metadata": {
"lookup_time_ms": 19,
"timestamp": "2020-01-01T20:50:40.500Z",
"data_sources_count": 9,
"data_freshness": {
"last_update_check": "2020-01-01T20:50:40.500Z",
"sources_loaded": 180224
}
}
}
Examples
cURL
curl -X GET "https://chap.alphasystem.dev/api/v1/ip/8.8.8.8" \
-H "X-API-Key: your_api_key_here"
JavaScript
const response = await fetch('https://chap.alphasystem.dev/api/v1/ip/8.8.8.8', {
headers: {
'X-API-Key': 'your_api_key_here'
}
});
const data = await response.json();
console.log(data);
Python
import requests
url = "https://chap.alphasystem.dev/api/v1/ip/8.8.8.8"
headers = {"X-API-Key": "your_api_key_here"}
response = requests.get(url, headers=headers)
data = response.json()
print(data)
IPv6 Example
curl -X GET "https://chap.alphasystem.dev/api/v1/ip/2001:4860:4860::8888" \
-H "X-API-Key: your_api_key_here"
Error Handling
The API uses standard HTTP status codes and returns error details in JSON format:
Status Code | Error Code | Description |
---|---|---|
400 | VALIDATION_ERROR | Invalid IP address format |
401 | MISSING_API_KEY | API key not provided |
401 | INVALID_API_KEY | Invalid or inactive API key |
402 | INSUFFICIENT_CREDITS | Not enough credits remaining |
404 | NOT_FOUND | No data found for IP address |
429 | RATE_LIMIT_EXCEEDED | Too many requests |
Error Response Example
{
"error": "Invalid IP address format",
"code": "VALIDATION_ERROR"
}
Rate Limits
The API enforces the following rate limits:
- 1000 requests per minute per API key
- 1 credit per request deducted from your account
Rate limit headers are included in every response:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640995200