Base URL

All API requests must be made over HTTPS using the following base URLs:

πŸ”“ Public API
https://myip.casa/api/
Production
πŸ”‘ Private API
https://myip.casa/api/pro/
Requires X-API-Key header

Public API (Free)

No authentication required. Suitable for basic usage and testing.



GET /api/ip
curl https://myip.casa/api/ip
Free Response
{ "ip": "198.51.100.42" }
Basic IP detection only.
Pro Intelligence
{ "ip": "198.51.100.42", "location": { "city": "Toronto", "country": "CA", "country_name": "Canada", "region": "Ontario", "timezone": "America/Toronto" }, "network": { "asn": 12345, "usage_type": "Residential" }, "security": { "is_vpn": false, "risk_level": "Low", "risk_score": 2 }, "plan": "pro", "quota_remaining": 49994, "status": "success" }
Geolocation, ASN data, security scoring & quota tracking included.


Private API (API Key required)

Access private endpoints by sending your API key using the X-API-Key HTTP header.



Authentication

Authentication is performed via a static API key sent in an HTTP header. No cookies, no sessions, no fingerprinting.

X-API-Key: YOUR_API_KEY

Note: For security reasons, API keys are displayed only once at purchase time.


Available Private Endpoints

All endpoints require a valid X-API-Key header.

GET /api/pro/ip
Get Public IP
Returns the public IP address of the caller, authenticated via API key.
curl -H "X-API-Key: YOUR_KEY" https://myip.casa/api/pro/ip
{ "ip": "203.0.113.25" }
GET /api/pro/security
Security & Threat Signals
Real-time detection for VPN, Tor, Proxies, and Datacenter IPs.
curl -H "X-API-Key: YOUR_KEY" https://myip.casa/api/pro/security
{ "ip": "203.0.113.25", "network": { "asn_org": "US Broadband Inc.", "connection_type": "residential" }, "security": { "is_datacenter": false, "is_proxy": false, "is_tor": false, "is_vpn": false, "risk_level": "Low", "risk_score": 0, "threat_types": [] }, "quota_remaining": 49993 }
GET /api/pro/vpn
VPN & Proxy Detection
Identifies VPN usage, provider category, and residential vs. datacenter classification.
curl -H "X-API-Key: YOUR_KEY" https://myip.casa/api/pro/vpn
{ "ip": "203.0.113.25", "is_vpn": false, "category": "Residential", "provider": "Clean/Residential", "quota_remaining": 49992 }
GET /api/pro/details
Full IP Details
Complete IP profile: geolocation, network, security signals, and user-agent parsing.
curl -H "X-API-Key: YOUR_KEY" https://myip.casa/api/pro/details
{ "ip": "203.0.113.25", "location": { "city": "Toronto", "country": "CA", "country_name": "Canada", "currency": "CAD", "latitude": 43.7001, "longitude": -79.4163, "region": "Ontario", "timezone": "America/Toronto" }, "network": { "asn": 12345, "asn_org": "US Broadband Inc.", "usage_type": "Residential" }, "security": { "is_bot": false, "risk_level": "Low", "risk_score": 0 }, "user_agent": { "browser": "curl", "is_mobile": false, "os": "Other" }, "plan": "pro", "quota_remaining": 49991, "status": "success" }
GET /api/pro/health
API & Service Health
Check the current operational status of the Pro API service.
curl -H "X-API-Key: YOUR_KEY" https://myip.casa/api/pro/health
{ "service": "api_pro", "status": "healthy" }
POST /api/pro/bulk
Bulk IP Lookup
Analyze up to 50 IPs in a single request. Returns country, city, usage type, and VPN detection for each.
curl -X POST https://myip.casa/api/pro/bulk -H "Content-Type: application/json" -H "X-API-Key: YOUR_KEY" -d "{\"ips\":[\"8.8.8.8\",\"1.1.1.1\",\"203.0.113.25\"]}"
{ "results": [ { "ip": "8.8.8.8", "country": "US", "city": "Unknown", "usage_type": "Data Center/Hosting", "is_vpn": true }, { "ip": "1.1.1.1", "country": "Unknown", "city": "Unknown", "usage_type": "Data Center/Hosting", "is_vpn": true }, { "ip": "203.0.113.25", "country": "CA", "city": "Toronto", "usage_type": "Residential", "is_vpn": false }, { "ip": "198.51.100.10", "country": "DE", "city": "Berlin", "usage_type": "Tor Exit Node", "is_vpn": true } ], "count": 4, "quota_remaining": 49970 }

Error Handling

The API uses standard HTTP status codes and returns a structured JSON object for all errors.
All responses are returned in application/json over HTTPS.

ERROR Standard Error Format
{ "status": "error", "code": 401, "message": "Invalid API key" }
Code Description
400 Bad Request (missing parameters)
401 Unauthorized (missing key)
403 Forbidden (invalid or inactive key)
429 Too Many Requests (quota exceeded)

Rate Limits

Rate limits are enforced to ensure service stability. They depend on your active plan.

πŸ”“ Public API

  • β€’ No authentication required
  • β€’ Returns HTTP 429 when rate limit is exceeded.
  • β€’ Basic IP detection only
(For production use)

πŸ”‘ Private API

  • β€’ Daily quota based on subscription
  • β€’ Real-time tracking via quota_remaining
  • β€’ Quota resets at 00:00 UTC daily
Upgrade your plan now β†’