API Reference
Complete documentation for the IPDrift API. Learn about endpoints, parameters, responses, and error handling.
Base URL
https://geo.ipdrift.com
Endpoints
GET
/health
Check if the service is healthy and running.
curl "https://geo.ipdrift.com/health"
GET
/v1/lookup
Get comprehensive IP geolocation and information.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
ip | string | Yes | IPv4 or IPv6 address to lookup |
Example Request
curl "https://geo.ipdrift.com/v1/lookup?ip=8.8.8.8"
Response Format
{
"ip": "8.8.8.8",
"type": "ipv4",
"continent_code": "NA",
"continent_name": "North America",
"country_code": "US",
"country_name": "United States",
"region_code": "CA",
"region_name": "California",
"city": "Mountain View",
"zip": "94043",
"latitude": 37.4056,
"longitude": -122.0775,
"ip_routing_type": "fixed",
"connection_type": "tx",
"location": {
"geoname_id": 5375480,
"capital": "Washington D.C.",
"languages": [
{
"code": "en",
"name": "English",
"native": "English"
}
],
"country_flag_emoji": "🇺🇸",
"country_flag_emoji_unicode": "U+1F1FA U+1F1F8",
"calling_code": "1",
"is_eu": false
},
"time_zone": {
"id": "America/Los_Angeles",
"current_time": "2025-09-20T15:30:00-07:00",
"gmt_offset": -25200,
"code": "PDT",
"is_daylight_saving": true
},
"currency": {
"code": "USD",
"name": "US Dollar",
"plural": "US dollars",
"symbol": "$",
"symbol_native": "$"
},
"connection": {
"asn": 15169,
"isp": "GOOGLE",
"sld": null,
"tld": null,
"carrier": "GOOGLE",
"home": false,
"organization_type": "hosting",
"isic_code": null,
"naics_code": null
},
"security": {
"is_proxy": null,
"proxy_type": null,
"is_crawler": false,
"crawler_name": null,
"crawler_type": null,
"is_tor": false,
"threat_level": "low",
"threat_types": null,
"proxy_last_detected": null,
"proxy_level": null,
"vpn_service": null,
"anonymizer_status": null,
"hosting_facility": true
}
}
Error Handling
400 Bad Request
Invalid IP address or missing required parameters.
{
"detail": "Invalid IP address: invalid-ip"
}
429 Too Many Requests
Rate limit exceeded. Check the x-ratelimit-limit header.
{
"detail": "Rate limit exceeded"
}
500 Internal Server Error
Server error. Please try again later.
{
"detail": "Internal server error"
}
Rate Limits
IPDrift API has rate limits to ensure fair usage and service stability:
- Free Tier: 120 requests per minute
- Pro Tier: 1,000 requests per minute
- Enterprise: Custom limits available
Rate limit information is included in response headers:
x-ratelimit-limit: 120
x-ratelimit-remaining: 119
x-ratelimit-reset: 1640995200
Get Started
Download our Postman collection to test the API endpoints with pre-configured requests.
Download Postman Collection