GET
https://api.ipscope.io/v1/ip/meGET
https://api.ipscope.io/v1/public/ipReturns the full IpLookupResponse for the client IP address that initiated the HTTP request. Both GET /v1/ip/me and GET /v1/public/ip are public, keyless endpoints designed for CLI diagnostics, health scripts, and interactive browser/edge tools.
# Code examples
curl -sS "https://api.ipscope.io/v1/ip/me"# Responses
Full IPv4/IPv6 intelligence record for the connecting visitor IP.
{
"ip": "198.51.100.7",
"ip_version": 4,
"matched_network": "198.51.100.0/24",
"geo": {
"country_code": "US",
"declared_country_code": "US",
"physical_country_code": "US",
"is_virtual_location": false,
"location_type": "physical",
"confidence": 0.94,
"subdivision": "Virginia",
"city": "Ashburn",
"postal_code": "20147",
"latitude": 39.0438,
"longitude": -77.4874,
"accuracy_radius_km": 10,
"timezone": "America/New_York"
},
"network": {
"asn": 64501,
"organization": "Example Cloud LLC"
},
"connection": {
"connection_type": "hosting",
"is_hosting": true,
"is_residential": false,
"is_mobile": false,
"is_business": false
},
"security": {
"is_vpn": true,
"is_hosting": true,
"is_tor_exit": false,
"is_proxy": false,
"anonymizer_type": "vpn",
"confidence": 0.96,
"reason_codes": [
"vpn_handshake_confirmed",
"datacenter_asn_range"
]
},
"security_extensions": {
"abuse_velocity_score": 18,
"is_known_scanner": false,
"observation_recency_hours": 12,
"anonymizer_reason": "vpn_handshake_confirmed",
"threat_level": "medium",
"abuse_velocity": "low",
"confidence": 0.96
},
"dataset_version": "2026-10-27T00:00:00Z.crawl-1793088000000",
"updated_at": "2026-10-27T00:00:00Z"
}# Proxy-aware IP extraction & anti-spoofing
To prevent X-Forwarded-For header spoofing while supporting reverse-proxy and Cloudflare deployments, LookupController inspects the TRUST_PROXY environment configuration:
- When
TRUST_PROXY=true: The service extracts the visitor’s real public IP in priority order fromcf-connecting-ip, the first hop ofx-forwarded-for, orx-real-ip, falling back to the socket peerreq.ip. - When
TRUST_PROXY=false(default direct mode): Forwarded headers are ignored and only the verified TCP/QUIC socket address (req.ip) is used. - Cloudflare edge hint fallback: When behind Cloudflare (
TRUST_PROXY=true), the service also readscf-ipcountry,cf-ipcity,cf-region, andcf-rayas fallback hints if a newly allocated prefix has no city record in the local snapshot.