HackMyIP API v1
Free IP geolocation, DNS lookup, WHOIS, and HTTP header inspection API. No signup. No API key. Just send a request and get JSON back.
https://hackmyip.com/api/v1
GET /api/v1/ip Your IP address + geolocation + VPN status
Returns the caller's public IP address, geolocation, ISP, and privacy/VPN detection data. No parameters needed.
Example Request
Example Response
Response Fields
| Field | Type | Description |
|---|---|---|
| ip | string | Public IP address (IPv4 or IPv6) |
| location.city | string | City based on IP geolocation |
| location.region | string | State or region |
| location.country | string | ISO 3166-1 alpha-2 country code |
| location.continent | string | Continent code (NA, EU, AS, etc.) |
| location.latitude | number | Approximate latitude |
| location.longitude | number | Approximate longitude |
| location.timezone | string | IANA timezone (e.g. America/New_York) |
| location.postal_code | string | Postal / ZIP code |
| location.is_eu | boolean | Whether IP is in an EU country |
| network.asn | number | Autonomous System Number |
| network.isp | string | ISP or organization name |
| privacy.type | string | residential, vpn, or datacenter |
| privacy.score | number | IP cleanliness score (0-100) |
| privacy.grade | string | Letter grade: A, B, C, or D |
| privacy.is_vpn | boolean | VPN provider detected |
| privacy.is_datacenter | boolean | Datacenter/hosting IP detected |
GET /api/v1/ip/:address Lookup any IP address
Look up geolocation and network information for any IPv4 or IPv6 address.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| address | string | Required. IPv4 or IPv6 address (e.g. 8.8.8.8) |
Example Request
Example Response
GET /api/v1/dns/:domain DNS record lookup
Query DNS records for any domain. Supports A, AAAA, CNAME, MX, NS, TXT, SOA, SRV, CAA, and PTR record types.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| domain | string | Required. Domain name (e.g. example.com) |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| type | string | DNS record type. Default: A. Options: A, AAAA, CNAME, MX, NS, TXT, SOA, SRV, CAA, PTR |
Example Request
Example Response
GET /api/v1/headers Inspect your HTTP request headers
Returns the HTTP headers your client sent. Useful for debugging proxies, user agents, and custom headers.
Example Request
Example Response
GET /api/v1/whois/:domain WHOIS / RDAP domain lookup
Look up WHOIS registration data for a domain via RDAP. Returns registrar, dates, nameservers, and status.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| domain | string | Required. Domain name (e.g. google.com) |
Example Request
Example Response
Tool Endpoints
These endpoints power the newer tools and live directly under /api (no version prefix). Same rules: free, no key, JSON, CORS enabled.
GET /api/asn ASN lookup by IP, AS number, or organization
Resolve an IP to its originating ASN, look up an AS number directly, or search ASNs by organization name.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| q | string | Required. An IP (8.8.8.8), AS number (AS15169), or org name (google) |
Example Request
GET /api/ports Real TCP port scan
Real TCP connect scan against a public host. With no ports parameter, a curated common-port catalog is scanned. Private, reserved, and internal addresses are rejected. Rate limited to 20 requests/min.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| host | string | Hostname or public IP. Defaults to the caller's IP. |
| ports | string | Optional comma list, e.g. 22,80,443 |
Example Request
GET /api/security-headers HTTP security headers analyzer
Fetches the target site and grades its security headers: CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, plus information-leak headers. Rate limited to 20 requests/min.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| url | string | Required. Site to analyze (scheme optional, https assumed) |
Example Request
GET /api/email-auth MX / SPF / DMARC checker
Checks a domain's email authentication setup: MX records, SPF record, and DMARC policy, with a pass/fail analysis per mechanism.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| domain | string | Required. Domain to check (e.g. github.com) |
Example Request
Choosing between free IP APIs? See the source-verified comparisons: best free IP API (2026) · free IP API comparison · IPinfo free alternative · ipapi vs HackMyIP · BrowserLeaks alternative · whatismyipaddress.com alternative.
Rate Limiting
Error Handling
All errors return the same JSON envelope with success: false and a human-readable error message.