DEV Community

Mathew
Mathew

Posted on Edited on

IP Geolocation for Developers: Automating IP Lookup Checks in 2026

At some point, checking proxy IPs manually stops being viable. You have a pool of 50 rotating residential IPs, you want to know which ones are actually clean before deploying them, and opening a browser tab for each one isn't a workflow - it's a time sink. That's the moment IP lookup automation starts making sense.
This guide covers what IP lookup data actually tells you, how to use it to validate proxy pools programmatically, and where the NodeMaven IP Lookup tool fits into that workflow.
What IP Lookup Data Actually Tells You
An IP address carries more information than most developers initially expect. When you run a lookup, you're not just getting a country - you're getting a full classification of that address's network identity and reputation history.
Geographic data comes in three layers. Country-level accuracy is close to 100% for any modern lookup service. City-level accuracy is typically within a metro area for residential IPs, which is sufficient for most geo-targeting validation. ZIP/postal code is available but less reliable - accuracy varies by provider and by the type of IP being queried.
Network identity is what matters most for proxy validation. The ISP field tells you which company assigned the IP - Comcast, BT, Deutsche Telekom for residential connections; AWS, GCP, Hetzner for datacenter addresses. The ASN (Autonomous System Number) goes one level deeper: it's the unique identifier of the specific network block the IP belongs to. Detection systems on platforms like Amazon, Google, and Meta check ASNs, not ISP name strings. Two IPs from "Comcast" might belong to different ASNs with meaningfully different trust scores.
Connection type flags are the most operationally useful fields. Every IP lookup returns flags indicating whether the address is classified as a proxy, VPN, Tor exit node, hosting/datacenter IP, or mobile connection. For a clean residential proxy, all of these should be false. If an IP comes back with is_hosting: true, it's in a datacenter range - and platforms that check IP type will treat it accordingly regardless of what geo it reports.
Threat score is an aggregate risk rating, typically 0–100, based on the behavioral history associated with the address. Prior abuse, spam campaigns, credential stuffing, bot activity - all of these leave marks in reputation databases that get surfaced in the threat score. A residential IP with a score of 8 is clean. The same IP with a score of 72 has history that will trigger friction on platforms that check reputation in real time.
What This Means for Proxy Pool Management
The practical implication is straightforward: not all IPs in a residential proxy pool behave equally, and you can't tell the difference by looking at them. An IP that reports as US/New York/residential might have a threat score of 65 from prior users who ran it through aggressive scraping. Another IP with identical geographic metadata might have a score of 4.
Running IP lookups on your pool before deployment surfaces this variation. The workflow is: get exit IPs from your proxies, run lookups, filter out any that show hosting flags, proxy flags, or threat scores above your threshold, and deploy only the clean subset.
For most scraping and automation workflows, a reasonable pre-deployment filter is: no proxy/VPN/hosting flags, threat score below 30, country and city matching expected geo-target. For platforms with aggressive bot detection - social media, e-commerce, financial services - tighten the threat score threshold to below 15.
Here's a minimal implementation that handles the core validation loop:
import requests
import time
from typing import Optional

def get_exit_ip(proxy_url: str, timeout: int = 10) -> Optional[str]:
try:
resp = requests.get(
"https://httpbin.org/ip",
proxies={"http": proxy_url, "https": proxy_url},
timeout=timeout
)
return resp.json().get("origin", "").split(",")[0].strip()
except Exception:
return None

def check_ip_quality(ip: str, timeout: int = 10) -> dict:
try:
resp = requests.get(f"https://ipinfo.io/{ip}/json", timeout=timeout)
data = resp.json()
privacy = data.get("privacy", {})
return {
"ip": ip,
"country": data.get("country", ""),
"city": data.get("city", ""),
"isp": data.get("org", ""),
"is_flagged": any([
privacy.get("proxy", False),
privacy.get("vpn", False),
privacy.get("hosting", False),
]),
"threat_score": data.get("abuse", {}).get("score", 0),
}
except Exception as e:
return {"ip": ip, "error": str(e), "is_flagged": True, "threat_score": 100}

def audit_proxy_pool(
proxies: list[str],
max_threat_score: int = 30
) -> dict:
clean, rejected = [], []

for proxy_url in proxies:
    exit_ip = get_exit_ip(proxy_url)
    if not exit_ip:
        rejected.append({"proxy": proxy_url, "reason": "no exit IP"})
        continue

    quality = check_ip_quality(exit_ip)

    if quality.get("error"):
        rejected.append({"proxy": proxy_url, "reason": quality["error"]})
    elif quality["is_flagged"]:
        rejected.append({"proxy": proxy_url, "exit_ip": exit_ip, "reason": "flagged"})
    elif quality["threat_score"] > max_threat_score:
        rejected.append({"proxy": proxy_url, "exit_ip": exit_ip,
                         "reason": f"threat score {quality['threat_score']}"})
    else:
        clean.append(proxy_url)

    time.sleep(0.1)

total = len(clean) + len(rejected)
return {
    "clean": clean,
    "rejected": rejected,
    "clean_rate_pct": round(len(clean) / total * 100, 1) if total else 0
}
Enter fullscreen mode Exit fullscreen mode

proxies = [
"http://user:pass@ip1:port",
"http://user:pass@ip2:port",
]

result = audit_proxy_pool(proxies, max_threat_score=30)
print(f"Clean: {len(result['clean'])}/{len(proxies)} ({result['clean_rate_pct']}%)")
Use result['clean'] in your workflow

Running this before any production deployment catches burned IPs before they cause elevated failure rates - which is the most common source of unexplained block rate increases in proxy-based workflows.
The NodeMaven IP Lookup Tool
For manual verification alongside your automated scripts, the NodeMaven IP Lookup tool gives you a full classification of any IP in a single browser check - no setup, no account required.
Enter any IPv4 or IPv6 address and the tool returns the complete picture: country, region, city, and postal code; timezone; ISP and organization name; ASN; reverse DNS hostname; connection type flags (proxy, VPN, Tor, hosting, mobile); and threat score out of 100.
The detection flags are particularly useful for proxy evaluation. The tool shows clearly whether an IP is classified as a hosting address, a known proxy, or a VPN exit node - the same signals that ad networks, social platforms, and e-commerce sites check when they receive a connection. If an IP you're planning to use comes back with a hosting flag or a threat score above 50, you know before the platform does.
Batch lookup supports up to 100 IPs per request, which covers most spot-check and pre-deployment validation needs without writing any code. Paste a list, run the check, review the results. For the IPs that come back flagged or high-risk, the tool shows enough detail to understand why - which ISP range they're in, what the threat score is, whether the issue is classification or history.
The most practical use cases: checking a sample of IPs from a new proxy provider before onboarding, verifying that a specific IP you've been using hasn't accumulated reputation damage, and spot-checking IPs that are producing unexpectedly high failure rates in production to determine whether the issue is IP quality or something else.
Lookup Service Options
For automated workflows at scale, several lookup services cover the fields described above. Free tiers on ipinfo.io and ip-api.com include location, ISP, and ASN, but threat score and detailed flag data typically require a paid plan. Sufficient for geographic validation, but not for full quality assessment including reputation.
Paid tiers add real-time threat scoring, more granular flag classification, and higher request limits. For production proxy pool monitoring that runs daily, the cost is small relative to the proxy infrastructure spend.
Self-hosted options like MaxMind GeoIP2 databases avoid rate limits and external dependencies, but require regular database updates and don't include real-time threat scoring - which is the most important field for proxy quality assessment.
The right choice depends on your volume and what fields you actually need. For geographic validation only, a free tier works. For full proxy pool health monitoring including threat scores, a paid tier is the right starting point.
Scheduling Health Checks
Once the audit script is working, scheduling it as a daily job closes the monitoring loop. A health check that runs at 6am, compares current pool clean rate against an 85% threshold, and fires a Slack alert when it drops below covers most operational monitoring needs without manual intervention. The clean rate metric - what percentage of your pool passes the geo, flag, and threat score checks - is the single number that tells you whether your proxy pool is in good shape before you run any production jobs against it.
Pool quality degrades over time as IPs accumulate history from prior use. Catching that degradation before it shows up as elevated failure rates in production is the practical return on automating IP lookup checks.

Top comments (0)