HackMyIP

Free Privacy API

4 endpoints: IP geolocation, email breach checking, IP lookup, and privacy scoring. No API key required. JSON response, CORS enabled.

No API KeyStart making requests immediately. No signup, no authentication.
JSON ResponseClean JSON format. Easy to parse in any language.
CORS EnabledAccess-Control-Allow-Origin: * — use from any domain.
Edge NetworkServed from Cloudflare's global edge. Low latency worldwide.

GET /api/ip

Returns the requesting client's IP address and geolocation data.

GET https://hackmyip.com/api/ip

Example Request

# cURL curl https://hackmyip.com/api/ip # JavaScript fetch('https://hackmyip.com/api/ip') .then(r => r.json()) .then(data => console.log(data.ip)); # Python import requests data = requests.get('https://hackmyip.com/api/ip').json() print(data['ip'])

Example Response

{ "ip": "216.73.217.162", "city": "Columbus", "region": "Ohio", "country": "US", "continent": "NA", "latitude": 39.96118, "longitude": -82.99879, "timezone": "America/New_York", "postalCode": "43215", "asn": 16509, "asOrganization": "Anthropic, PBC", "isEU": false, "httpProtocol": "HTTP/2", "tlsVersion": "TLSv1.3" }

Response Fields

ipstringPublic IP address (IPv4 or IPv6)
citystringCity based on IP geolocation
regionstringState or region
countrystringISO 3166-1 alpha-2 country code
continentstringContinent code (NA, EU, AS, etc.)
latitudenumberApproximate latitude coordinate
longitudenumberApproximate longitude coordinate
timezonestringIANA timezone identifier
postalCodestringPostal or ZIP code
asnnumberAutonomous System Number
asOrganizationstringISP or organization name
isEUbooleanWhether the IP is in an EU country
httpProtocolstringHTTP protocol version (HTTP/1.1, HTTP/2, HTTP/3)
tlsVersionstringTLS version of the connection

GET /api/lookup

Look up geolocation data for a specific IP address.

GET https://hackmyip.com/api/lookup?ip=8.8.8.8

Parameters

ipstringRequired. IPv4 or IPv6 address to look up.

Example Request

curl "https://hackmyip.com/api/lookup?ip=8.8.8.8"

Usage Notes

This API is free for personal and commercial use. Please be reasonable with request volume. The API is powered by Cloudflare Workers and served from edge locations worldwide for minimal latency.

For high-volume usage or dedicated support, please reach out.

GET /api/breach

Check if an email address has been exposed in data breaches. Scans 500+ breach databases.

GET https://hackmyip.com/api/breach?email=user@example.com

Parameters

emailstringEmail address to check (required)

Example Request

# cURL curl "https://hackmyip.com/api/breach?email=user@example.com" # JavaScript fetch('https://hackmyip.com/api/breach?email=user@example.com') .then(r => r.json()) .then(data => console.log(data.data.breaches));

Example Response

{ "success": true, "data": { "email": "use***@example.com", "breaches": 13, "services": ["Adobe", "Canva", "LinkedIn", ...], "risk": { "score": 71, "level": "high" }, "passwords": { "plain_text": 3, "weak_hash": 2, "strong_hash": 3, "total": 8 } } }

GET /api/score

Get your IP's privacy and cleanliness score. Detects VPN, datacenter, or residential IP.

GET https://hackmyip.com/api/score

Example Request

# cURL curl https://hackmyip.com/api/score # JavaScript fetch('https://hackmyip.com/api/score') .then(r => r.json()) .then(data => console.log(data.data.privacy.grade));

Example Response

{ "success": true, "data": { "ip": "203.0.113.42", "location": { "city": "Tokyo", "country": "JP" }, "network": { "isp": "NTT", "asn": 2914 }, "privacy": { "type": "residential", "score": 90, "grade": "A", "is_vpn": false, "is_datacenter": false } } }

GET /api/dns

DNS record lookup for any domain. Supports A, AAAA, MX, NS, TXT, CNAME, CAA, SOA.

GET https://hackmyip.com/api/dns?domain=github.com&type=MX

Example Request

# cURL curl "https://hackmyip.com/api/dns?domain=github.com&type=MX"

Example Response

{ "success": true, "data": { "domain": "github.com", "type": "MX", "records": [ { "name": "github.com", "TTL": 3600, "data": "1 aspmx.l.google.com." } ] } }

GET /api/whois

WHOIS / RDAP registration data for a domain: registrar, creation date, expiration, name servers.

GET https://hackmyip.com/api/whois?domain=github.com

Example Request

curl "https://hackmyip.com/api/whois?domain=github.com"

Example Response

{ "success": true, "data": { "domain": "GITHUB.COM", "registrar": "MarkMonitor Inc.", "creation_date": "2007-10-09T18:20:50Z", "expiration_date": "2026-10-09T18:20:50Z", "name_servers": ["dns1.p08.nsone.net"] } }

GET /api/rdns

Reverse DNS — resolves an IP address to its PTR hostname.

GET https://hackmyip.com/api/rdns?ip=8.8.8.8

Example Request

curl "https://hackmyip.com/api/rdns?ip=8.8.8.8"

Example Response

{ "success": true, "data": { "ip": "8.8.8.8", "hostname": "dns.google", "ptr_record": "8.8.8.8.in-addr.arpa" } }

GET /api/blacklist

Check an IPv4 against 12 spam / abuse DNSBLs (Spamhaus ZEN, Barracuda, SORBS, SpamCop, and more).

GET https://hackmyip.com/api/blacklist?ip=8.8.8.8

Example Request

curl "https://hackmyip.com/api/blacklist?ip=8.8.8.8"

Example Response

{ "success": true, "data": { "ip": "8.8.8.8", "total_checked": 12, "listed_count": 0, "clean": true, "status": "CLEAN" } }

GET /api/down

Is a website up or down. Returns HTTP status code and response time in ms.

GET https://hackmyip.com/api/down?url=example.com

Example Request

curl "https://hackmyip.com/api/down?url=example.com"

Example Response

{ "success": true, "data": { "url": "https://example.com", "up": true, "status_code": 200, "response_time_ms": 142 } }

POST /api/bulk

Batch lookup up to 50 IPs in a single POST request. Faster than sequential /api/lookup calls.

POST https://hackmyip.com/api/bulk

Example Request

curl -X POST -H "Content-Type: application/json" \ -d '{"ips":["8.8.8.8","1.1.1.1"]}' \ https://hackmyip.com/api/bulk

Example Response

{ "success": true, "data": [ { "ip": "8.8.8.8", "city": "Mountain View", "isp": "Google LLC" }, { "ip": "1.1.1.1", "city": "Sydney", "isp": "Cloudflare" } ] }

npm Package

Use our official JavaScript client for easy integration:

# Install npm install hackmyip # Usage const { getMyIP, checkBreach, getPrivacyScore } = require('hackmyip'); const ip = await getMyIP(); const breach = await checkBreach('user@example.com'); const score = await getPrivacyScore();

GitHub: github.com/Hackmyip/hackmyip-js