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

https://www.iptrackeronline.com/

Authentication

API authentication is handled via API keys. Include your API key as a query parameter in all requests.

Obtaining an API Key

  1. Visit our API pricing page
  2. Select a plan that fits your needs
  3. Complete the purchase process
  4. Your API key will be displayed and emailed to you

Using Your API Key

Include your API key in the query string:

?k=YOUR_API_KEY_HERE
Security Note:

Never expose your API key in client-side code. Always make API calls from your backend server.

Endpoints

JSON Endpoint (Recommended)

GET/json.php

Returns geolocation data in JSON format. Ideal for modern web applications and services.

XML Endpoint

GET/xml.php

Returns geolocation data in XML format. Suitable for legacy systems and SOAP integrations.

Standard Web Endpoint

GET/

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

GET https://www.iptrackeronline.com/json.php?k=abc123def456&ip_address=8.8.8.8

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

ipaddress
string

The queried IP address

hostname
string

Reverse DNS hostname

provider
string

ISP or organization name

country
string

Full country name

countrycode
string

ISO 3166-1 alpha-2 code

state
string

State or region name

city
string

City name

latitude
float

Geographic latitude

longitude
float

Geographic longitude

timezone
string

IANA timezone identifier

gmtoffset
string

UTC offset (e.g., "-08:00")

idd_code
string

International dialing code

asn
integer

Autonomous System Number

as_organization
string

ASN organization name

connection_type
string

Corporate, Cable/DSL, Cellular, etc.

user_type
string

hosting, business, or residential

accuracy
integer

Approximate accuracy radius (meters)

queries_remaining
integer

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

Rate Limiting
  • 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_remaining in responses
  • Credits never expire on paid plans

Rate Limit Headers

Monitor these response headers:

  • X-RateLimit-Remaining - Requests remaining in the current 60-second window
  • X-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)

Ready to integrate?

Need more lookups? View Pricing