IP location and ASN API
GET https://hproxy.com/api/ip/{ip} returns country, region, city, coordinates, timezone, ASN and ISP for any public IP. Free, no key, CORS enabled, batch supported.
hproxy.com/api/ip/{ip}no keycurl "https://hproxy.com/api/ip/45.79.12.44"Location and network for any IP
One GET returns where an IP is and which network runs it: country, region, city, coordinates, timezone, ASN, ASN organisation and ISP. No key, no signup, CORS enabled so you can call it straight from a browser or an extension.
This is the same lookup that powers the free proxy list and our own proxy checker, so if you are writing a proxy checker of your own, you can label your results with exactly the data we label ours with. It is read from offline databases, so there is no third-party API in the path.
Two limits apply per IP, and they are deliberately separate. Requests on this single-address door are capped at 900 in a burst, refilling 30 per second. Addresses are capped by the budget described under the batch endpoint below, and both doors draw on that same budget, so a hundred thousand single lookups cost exactly what one batch of a hundred thousand costs. Every answer reports the address budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Cost, so you can pace yourself from the headers rather than discovering the limit by being refused. Past either one you get a clean 429 with Retry-After.
Responses carry Cache-Control: public, max-age=21600: an address's location and ASN move on the order of weeks, so cache them hard rather than re-asking on every run.
| Parameter | Type | Required | Description |
|---|---|---|---|
ip | IPv4 or IPv6 | required | The address to look up, in the path. Private, loopback, link-local, CGNAT and other reserved ranges are rejected with 400 private_ip, because they have no public location. |
hproxy.com/api/ipno keycurl -X POST "https://hproxy.com/api/ip" \
-H "content-type: application/json" \
-d '{"ips":["45.79.12.44","24.48.0.1","8.8.8.8"]}'Batch: up to 100 000 addresses per call
If you are labelling a whole proxy list, use this instead of one request per proxy. Send up to 100 000 addresses in one call and get one result per address, in the same order you sent them, so you can zip the two lists together without matching on anything.
You are charged per distinct address, not per request and not per line. Duplicates are free, because they are free for us: a list that repeats one host across twenty ports is one lookup on our side, so it is one address on your budget, and there is no need to deduplicate before sending. Lines we reject as invalid or private are free for the same reason, since they never reach the lookup at all. Your budget per IP is 120 000 addresses in a burst, refilling 1 000 per second, and 2 000 000 per day.
Large batches stream. The response starts arriving as soon as the first addresses resolve rather than after the last one, which is what makes a call this size practical. It is still a single JSON document with a single results array in your original order, so res.json() and r.json() keep working exactly as before; the bytes simply arrive in pieces. Budget a couple of minutes for a fully cold 100 000-address batch. Anything we have looked up in the last six hours comes back from cache, so a list you re-check is far faster than the first run.
Addresses that cannot be resolved come back as { "ip": "…", "found": false } rather than being dropped, so the arrays always line up.
| Parameter | Type | Required | Description |
|---|---|---|---|
ips | string[] | required | Up to 100 000 IP addresses. A bare JSON array is also accepted. More than 100 000 returns 400 batch_too_large. |
200Lookup succeeded. A result with "found": false means we have no data for that address, which is not an error.400 invalid_ipNot a valid IPv4 or IPv6 address. Single lookups only: inside a batch that line comes back as { "found": false, "code": "invalid_ip" } and the rest of the batch is unaffected.400 private_ipA private, loopback, link-local, CGNAT or otherwise reserved address. These have no public location. Inside a batch it behaves like invalid_ip above.400 batch_too_largeMore than 100 000 addresses in one batch. Split the list.429 rate_limitedToo many addresses too quickly from your IP. Retry-After tells you how long.429 daily_quotaYour IP has spent its daily address budget. It refills continuously, so a smaller batch fits sooner.429 global_rate_limitedThe free service as a whole is at capacity, not you specifically. Retry-After tells you how long.503 server_busyWe are already resolving as many addresses as we can hold. Retry in a few seconds.is_datacenter is best effort. It reflects how the address's network is classified, and that classification is not perfect: some hosting ranges are recorded as residential and occasionally the reverse. Treat it as a hint, not a verdict. asn and asn_org are the reliable signal if you need to reason about who runs an address. Country and ASN are accurate; city is absent for anycast addresses rather than guessed.Need a hand wiring this up? Email support@hproxy.com. A real person reads every message.