Developer Documentation

API Documentation

Complete reference for the IPTrackerOnline IP Geolocation API. Get detailed location data for any IP address with simple REST API calls.

Authentication

API Key Authentication

All API requests require authentication using an API key. Include your key as a query parameter in every request.

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

Don't have an API key? Get one here - free tier includes 5 requests per day.

IP Geolocation API

JSON Endpoint

Returns IP geolocation data in JSON format. This is the recommended endpoint for most applications.

GET https://www.iptrackeronline.com/json.php

Parameters

Parameter Type Description
k Required string Your API key
ip_address Required string IPv4 or IPv6 address to lookup

XML Endpoint

Returns IP geolocation data in XML format for legacy system integration.

GET https://www.iptrackeronline.com/xml.php

Parameters are identical to the JSON endpoint.

Response Fields

Both JSON and XML endpoints return the following data fields:

ipaddress Queried IP address
hostname Reverse DNS hostname
country Country name
countrycode ISO 3166-1 alpha-2 code
state State/Region name
city City name
postalcode ZIP/Postal code
latitude Decimal latitude
longitude Decimal longitude
timezone IANA timezone
gmtoffset UTC offset (e.g., -05:00)
provider ISP/Organization
continent Continent name
asn AS Number
as_organization AS Organization name
connection_type Connection type
user_type User type classification
queries_remaining Credits left on account

IP Logger API

Create Tracking Link

Create short tracking URLs that log visitor IP information when clicked. Costs 2 credits per link.

POST https://www.iptrackeronline.com/shorturl.php

Parameters

Parameter Type Description
k Required string Your API key
url Required string Target URL to redirect to
dry_run Optional boolean Set to 1 to test without creating link or deducting credits

Response Example

{
  "status": "success",
  "data": {
    "tracking_code": "abc123xyz",
    "short_url": "https://cliip.net/abc123xyz",
    "analytics_url": "https://www.iptrackeronline.com/ip-logger/analytics.php?c=abc123xyz",
    "target_url": "https://example.com",
    "credits_used": 2,
    "credits_remaining": 9998
  }
}

Code Examples

<?php
$apiKey = 'YOUR_API_KEY';
$ipAddress = '8.8.8.8';

$url = "https://www.iptrackeronline.com/json.php?k={$apiKey}&ip_address={$ipAddress}";

$response = file_get_contents($url);
$data = json_decode($response, true);

if ($data['status'] === 'success') {
    echo "Country: " . $data['data']['country'] . "\n";
    echo "City: " . $data['data']['city'] . "\n";
    echo "ISP: " . $data['data']['provider'] . "\n";
    echo "Coordinates: " . $data['data']['latitude'] . ", " . $data['data']['longitude'] . "\n";
} else {
    echo "Error: " . $data['message'] . "\n";
}
?>
import requests

api_key = 'YOUR_API_KEY'
ip_address = '8.8.8.8'

url = f'https://www.iptrackeronline.com/json.php?k={api_key}&ip_address={ip_address}'

response = requests.get(url)
data = response.json()

if data['status'] == 'success':
    info = data['data']
    print(f"Country: {info['country']}")
    print(f"City: {info['city']}")
    print(f"ISP: {info['provider']}")
    print(f"Coordinates: {info['latitude']}, {info['longitude']}")
else:
    print(f"Error: {data['message']}")
const apiKey = 'YOUR_API_KEY';
const ipAddress = '8.8.8.8';

const url = `https://www.iptrackeronline.com/json.php?k=${apiKey}&ip_address=${ipAddress}`;

fetch(url)
  .then(response => response.json())
  .then(data => {
    if (data.status === 'success') {
      console.log('Country:', data.data.country);
      console.log('City:', data.data.city);
      console.log('ISP:', data.data.provider);
      console.log('Coordinates:', data.data.latitude, data.data.longitude);
    } else {
      console.error('Error:', data.message);
    }
  })
  .catch(error => console.error('Request failed:', error));
# JSON Response
curl "https://www.iptrackeronline.com/json.php?k=YOUR_API_KEY&ip_address=8.8.8.8"

# XML Response
curl "https://www.iptrackeronline.com/xml.php?k=YOUR_API_KEY&ip_address=8.8.8.8"

# IP Logger - Create tracking link
curl -X POST "https://www.iptrackeronline.com/shorturl.php" \
  -d "k=YOUR_API_KEY" \
  -d "url=https://example.com"

# IP Logger - Dry run (test without creating)
curl -X POST "https://www.iptrackeronline.com/shorturl.php" \
  -d "k=YOUR_API_KEY" \
  -d "url=https://example.com" \
  -d "dry_run=1"

Error Handling

The API returns appropriate HTTP status codes and error messages in the response body.

HTTP Code Error Code Description
400 MISSING_PARAMETERS Required parameters not provided
401 INVALID_KEY API key is invalid or doesn't exist
403 INVALID_KEY_USAGE API key used from unauthorized location
429 QUOTA_EXHAUSTED No remaining credits on account
500 LOCATION_LOOKUP_ERROR Server error during IP lookup

Rate Limits

👤
Free Users

5 requests per day per IP address

🔑
API Key Users

No rate limit - use your credits anytime

Burst Requests

Up to 100 requests per second

💰
Credit Validity

1 year from last API access

Pricing

Simple credit-based pricing. No monthly fees. Credits valid for 1 year from last API access.

Starter

$19
10,000 credits
  • All API endpoints
  • JSON & XML formats
  • Email support
  • Valid 1 year from last use
Get Started

Unlimited

$85
per month
  • Unlimited requests
  • All API endpoints
  • Dedicated support
  • Cancel anytime
Subscribe

View all pricing options including Business ($42/150K) and Enterprise ($57/300K) plans.

Need more lookups? View Pricing