Introduction
Welcome to the WhatIP.ca API! Our API provides programmatic access to all IP tools, network diagnostics, and geolocation services.
https://whatip.ca/api/v1
Features
- RESTful API — clean, versioned endpoints (e.g.
POST /api/v1/geolocate) - JSON in / JSON out — easy to parse and integrate
- API-key auth —
Authorization: Bearer wip_… - Free to start — sign up for a key, 30 calls/day, plus 10 free trial uses of premium tools
- Paid plans — Starter $5/mo (1,000/day) · Pro $19/mo (10,000/day)
Try It Now
Test our IP geolocation API instantly:
Authentication
Every API request needs an API key, sent as a Bearer token. Keys look like wip_….
Getting a key
- Create a free account.
- Open API Keys and generate a key — it's shown once, so copy it.
- Send it on every request as
Authorization: Bearer wip_….
A free key includes 30 calls/day and a one-time pool of 10 free uses of premium tools so you can trial them before upgrading. The website's own tools work without a key; the programmatic API always requires one.
Using your key
curl -X POST https://whatip.ca/api/v1/geolocate \
-H "Authorization: Bearer wip_your_key_here" \
-H "Content-Type: application/json" \
-d '{"ip": "8.8.8.8"}'
Plans & rate limits
Quotas are counted as API calls. Limits are returned on every response in the X-RateLimit-* headers.
| Plan | Price | Calls/day | Burst | Tools |
|---|---|---|---|---|
| Free | $0 | 30 | 5/min | Core lookups + 10 trial uses of premium tools |
| Starter | $5/mo | 1,000 | 60/min | + WHOIS, DNS-all, ping/traceroute, reputation, host-intel, sentry |
| Pro | $19/mo | 10,000 | 240/min | + port scan, threat-intel, SMTP/TLS, live host scan, sentry monitoring |
Calling a tool above your plan uses your 10-use trial pool; once spent it returns 402 payment_required. Exceeding your quota returns 429 with Retry-After. The homepage "what is my IP" lookup is always free and never counted.
IP Geolocation
Lookup geolocation data for any IP address using MaxMind GeoIP2.
curl -X POST https://whatip.ca/api/v1/geolocate \
-H "Content-Type: application/json" \
-d '{"ip": "8.8.8.8"}'
Response Fields
| Field | Type | Description |
|---|---|---|
country.name |
string | Country name |
country.code |
string | ISO country code |
city.name |
string | City name |
location.latitude |
float | Latitude coordinate |
location.longitude |
float | Longitude coordinate |
DNS Lookup
Query DNS records for any domain (A, AAAA, MX, TXT, NS, SOA, etc.)
curl -X POST https://whatip.ca/api/v1/dns/lookup \
-H "Content-Type: application/json" \
-d '{"domain": "google.com", "type": "A"}'
Blacklist Check
Check IP addresses against 100+ blacklists and reputation databases.
curl -X POST https://whatip.ca/api/v1/security/blacklist \
-H "Content-Type: application/json" \
-d '{"ip": "8.8.8.8"}'
Auth Endpoints
Login
const response = await fetch('https://whatip.ca/api/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
email: 'john@example.com',
password: 'SecurePass123'
})
});
const data = await response.json();
console.log(data.token); // Save this token
Get Current User
Returns authenticated user's profile and subscription details.
Logout
Revokes the current API token.
Error Codes
The API uses standard HTTP status codes:
| Code | Meaning |
|---|---|
200 | Success |
400 | Bad Request — Invalid parameters |
401 | Unauthorized — missing or invalid API key |
402 | Payment Required — tool needs a paid plan and your 10-use trial is spent |
403 | Forbidden — your key's plan can't access this tool |
404 | Not Found — no such endpoint |
429 | Too Many Requests — rate limit / daily quota exceeded (see Retry-After) |
500 | Internal Server Error |
Code Examples
Python
import requests
# IP Geolocation lookup
response = requests.post(
'https://whatip.ca/api/v1/geolocate',
headers={'Authorization': 'Bearer wip_your_key_here'},
json={'ip': '8.8.8.8'}
)
data = response.json()
print(f"Country: {data['country']['name']}")
print(f"City: {data.get('city', {}).get('name')}")
Node.js
const axios = require('axios');
async function getGeoLocation(ip) {
const { data } = await axios.post(
'https://whatip.ca/api/v1/geolocate',
{ ip },
{ headers: { Authorization: 'Bearer wip_your_key_here' } }
);
console.log(`Country: ${data.country.name}`);
console.log(`City: ${data.city.name}`);
}
getGeoLocation('8.8.8.8');
Need Help? Contact us at support@whatip.ca or visit our Support page.