API Documentation
Complete reference guide for the IPTrackerOnline IP Geolocation API
Overview
The IPTrackerOnline IP Geolocation API provides programmatic access to comprehensive IP address location data. Our RESTful API supports both JSON and XML response formats, making integration seamless with any programming language or platform.
Key Features
- Real-time IP geolocation data
- Support for IPv4 and IPv6 addresses
- JSON and XML response formats
- No complex authentication - simple API key
- Low latency global infrastructure
- 99.9% uptime SLA
Base URL
Authentication
API authentication is handled via API keys. Include your API key as a query parameter in all requests.
Obtaining an API Key
- Visit our API pricing page
- Select a plan that fits your needs
- Complete the purchase process
- Your API key will be displayed and emailed to you
Using Your API Key
Include your API key in the query string:
Never expose your API key in client-side code. Always make API calls from your backend server.
Endpoints
JSON Endpoint (Recommended)
Returns geolocation data in JSON format. Ideal for modern web applications and services.
XML Endpoint
Returns geolocation data in XML format. Suitable for legacy systems and SOAP integrations.
Standard Web Endpoint
Returns an HTML response. Free and unlimited without an API key — results are gated (country & region shown; exact IP, city, ISP & map unlock with IPTracker Pro, $7). The JSON/XML API endpoints below require an API key with credits.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
k |
string | Required | Your API key for authentication |
ip_address |
string | Required | The IP address to lookup (IPv4 or IPv6) |
Example Request
Response Format
JSON Response Structure
{
"status": "success",
"data": {
"ipaddress": "8.8.8.8",
"hostname": "dns.google",
"provider": "Google LLC",
"country": "United States",
"countrycode": "US",
"countryflag": "https://www.iptrackeronline.com/flags/us.png",
"state": "California",
"city": "Mountain View",
"areacode": "650",
"postalcode": "94043",
"idd_code": "1",
"timezone": "America/Los_Angeles",
"gmtoffset": "-08:00",
"continent": "North America",
"latitude": 37.386051,
"longitude": -122.083847,
"accuracy": 1000,
"asn": 15169,
"as_organization": "Google LLC",
"connection_type": "Corporate",
"user_type": "hosting",
"weather_code": "USCA0746",
"queries_remaining": 9999
}
}
XML Response Structure
<response>
<result>
<ipaddress>8.8.8.8</ipaddress>
<hostname>dns.google</hostname>
<provider>Google LLC</provider>
<country>United States</country>
<countrycode>US</countrycode>
<state>California</state>
<city>Mountain View</city>
<latitude>37.386051</latitude>
<longitude>-122.083847</longitude>
<queries>9999</queries>
</result>
</response>
Response Data Fields
The queried IP address
Reverse DNS hostname
ISP or organization name
Full country name
ISO 3166-1 alpha-2 code
State or region name
City name
Geographic latitude
Geographic longitude
IANA timezone identifier
UTC offset (e.g., "-08:00")
International dialing code
Autonomous System Number
ASN organization name
Corporate, Cable/DSL, Cellular, etc.
hosting, business, or residential
Approximate accuracy radius (meters)
API credits remaining
Error Handling
Error Response Format
{
"status": "error",
"message": "Invalid API key",
"error_code": "INVALID_KEY"
}
Common Error Codes
| INVALID_KEY | The API key does not exist or is invalid |
| INVALID_KEY_USAGE | API key is missing or used incorrectly |
| MISSING_PARAMETERS | Required parameter (k or ip_address) not supplied |
| INVALID_IP_FORMAT | The ip_address value is not a valid IPv4 or IPv6 address |
| QUOTA_EXHAUSTED | API credit balance reached zero |
| RATE_LIMIT_EXCEEDED | Too many requests (limit is 60 per minute) |
| LOCATION_LOOKUP_ERROR | Geolocation lookup failed for the supplied IP |
Rate Limits & Quotas
- Free Web Tool (no API key): unlimited lookups (results gated; full detail with $7 Pro)
- API (with key): 60 requests per minute
- Daily volume: bounded only by your remaining credits
Quota Management
- Credits are deducted per successful request
- Failed requests (errors) don't consume credits
- Check
queries_remainingin responses - Credits never expire on paid plans
Rate Limit Headers
Monitor these response headers:
X-RateLimit-Remaining- Requests remaining in the current 60-second windowX-RateLimit-Reset- Unix timestamp when the window resets
Best Practices
Security
- Never expose API keys in client-side code
- Use environment variables for key storage
- Implement request validation on your backend
- Monitor usage for unusual patterns
Performance
- Cache responses when appropriate
- Batch requests where possible
- Handle errors gracefully with retries
- Use connection pooling for high volume
Integration Tips
- Start with the JSON endpoint for easier parsing
- Implement proper error handling
- Log API responses for debugging
- Set reasonable timeout values (5-10 seconds)