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": "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", "hostname": "ptr.example.net" }, "security": { "is_vpn": false, "is_proxy": false, "is_tor": false, "is_datacenter": false, "risk_score": 0, "risk_level": "Low", "evidence": [], "is_bot": false }, "user_agent": { "browser": "curl", "is_mobile": false, "os": "Other" }, "plan": "pro", "quota_remaining": 49991, "status": "success", "cached": false }
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 & Reputation
Real-time detection for VPN, Tor, proxies, datacenter IPs, bots and abusers. The top-level risk_score and risk_level give an instant verdict. The evidence array explains the score in plain language. The reputation block includes blacklist status, local incident count, and last-seen date. Accepts an optional ?ip= query parameter to analyze any IPv4 or IPv6 address.
curl -H "X-API-Key: YOUR_KEY" https://myip.casa/api/pro/security
{ "ip": "203.0.113.25", "risk_score": 5, "risk_level": "Low", "location": { "country": "CA", "city": "Toronto" }, "network": { "asn": 12345, "asn_org": "US Broadband Inc.", "hostname": "ptr.example.net", "type": "Residential" }, "security": { "is_vpn": false, "is_proxy": false, "is_tor": false, "is_datacenter": false, "is_bot": false, "is_abuser": false, "evidence": [] }, "reputation": { "is_listed": false, "local_incidents": 0, "last_seen": null }, "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. Accepts an optional ?ip= query parameter to analyze any IPv4 or IPv6 address; defaults to the caller's IP.
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", "hostname": "ptr_record or No PTR record" }, "security": { "is_vpn": false, "is_proxy": false, "is_tor": false, "is_datacenter": false, "risk_score": 0, "risk_level": "Low", "evidence": [], "is_bot": false }, "user_agent": { "browser": "curl", "is_mobile": false, "os": "Other" }, "plan": "pro", "quota_remaining": 49991, "status": "success", "cached": false }
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" }
GET /api/pro/ping
Pro API Status
Returns API status. Requires a valid API key.
curl -H "X-API-Key: YOUR_KEY" https://myip.casa/api/pro/ping
{ "status": "ok" }
GET /api/pro/usage
Quota & Usage
Returns current plan details, daily quota limit, requests made today, remaining quota, and the time until the next daily reset (HH:MM:SS).
curl -H "X-API-Key: YOUR_KEY" https://myip.casa/api/pro/usage
{ "plan": "pro", "quota_limit": 50000, "requests_today": 15, "quota_remaining": 49985, "reset_in": "13:39:15", "status": "active" }
POST /api/pro/bulk
Bulk IP Lookup
Analyze up to 50 IPv4 or IPv6 addresses in a single request. Each result includes country, ASN org, risk scoring, VPN detection, and a human-readable evidence array. The response also contains a summary object with aggregated statistics. Use the optional ?mode=fast query parameter for reduced latency (same response schema). IPs not found return an error entry.
curl -X POST https://myip.casa/api/pro/bulk -H "Content-Type: application/json" -H "X-API-Key: YOUR_KEY" -d "{\"ips\":[\"198.51.100.10\",\"198.51.100.42\",\"203.0.113.25\"]}"
{ "results": [ { "ip": "198.51.100.10", "country": "US", "city": "Unknown", "asn_org": "Example CDN LLC", "risk_score": 80, "risk_level": "High", "is_vpn": true, "evidence": ["DataCenter/VPN IP address", "Automated traffic from hosting network"] }, { "ip": "198.51.100.42", "country": "Unknown", "city": "Unknown", "asn_org": "Example Hosting Ltd.", "risk_score": 80, "risk_level": "High", "is_vpn": true, "evidence": ["DataCenter/VPN IP address", "Automated traffic from hosting network"] }, { "ip": "203.0.113.25", "status": "error", "message": "Not found in database" } ], "summary": { "total": 3, "high_risk": 2, "vpn_detected": 2, "low_risk": 0, "errors": 1 }, "truncated": false, "count": 3, "mode": "full", "quota_remaining": 49974 }
POST /api/pro/bulk/export
Bulk IP Lookup β€” CSV Export
Same analysis as /api/pro/bulk but returns results as a CSV file attachment instead of JSON. Useful for offline processing or spreadsheet imports. The ?mode=fast query parameter is also supported.
curl -X POST https://myip.casa/api/pro/bulk/export -H "Content-Type: application/json" -H "X-API-Key: YOUR_KEY" -d "{\"ips\":[\"198.51.100.10\",\"198.51.100.42\",\"203.0.113.25\"]}" --output results.csv
β†’ Returns a text/csv file attachment ip,country,city,asn_org,risk_score,risk_level,is_vpn,evidence,status,message 198.51.100.10,US,Unknown,Example CDN LLC,80,High,true,"DataCenter/VPN IP address",, 198.51.100.42,Unknown,Unknown,Example Hosting Ltd.,80,High,true,"DataCenter/VPN IP address",, 203.0.113.25,,,,,,,,error,Not found in database

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 β†’