Sub-50ms Latency • Global Anycast CDN • ASN & ISP Data

IP Geolocation & Lookup API

Programmatic IP address intelligence. Retrieve country, city, GPS coordinates, ASN, ISP carrier, timezone, and proxy/VPN security flags instantly in clean JSON format. Fast, high-concurrency IP lookup API for modern web applications.

GET /api/v1/ip-lookup
Query: ip=8.8.8.8
{
  "ip": "8.8.8.8",
  "country": "United States",
  "country_code": "US",
  "city": "Ashburn",
  "latitude": 39.0437,
  "longitude": -77.4875,
  "timezone": "America/New_York",
  "isp": "Google LLC",
  "as": "AS15169 Google LLC",
  "is_proxy": false,
  "is_hosting": true,
  "is_mobile": false
}

High-Performance IP Address Intelligence

IP Geolocation & Lookup API is an IP intelligence API (<50ms latency) that resolves any IPv4 or IPv6 address into geographical metadata (country, city, latitude/longitude), ISP carrier, Autonomous System Number (ASN), timezone, and proxy/VPN threat detection flags.

Accurate IP geolocation and network threat detection are critical for modern web applications. Whether you are routing visitors to regional storefronts, preventing fraudulent credit card signups, enforcing digital rights management (DRM) geo-restrictions, or enriching security log pipelines, our IP Geolocation API delivers comprehensive IP metadata in sub-50 milliseconds.

Every API response includes detailed geographic, network, and security data points: country name, two-letter ISO country code, region/state, city, zip postal code, precise latitude/longitude coordinates, IANA timezone string, Internet Service Provider (ISP), Autonomous System Number (ASN), organization name, and boolean threat flags for VPN, proxy, cloud hosting, and mobile network traffic.

Our IP database is synchronized daily with Regional Internet Registries (ARIN, RIPE, APNIC, LACNIC, AFRINIC) and BGP global routing announcements, ensuring >99.8% country accuracy and up-to-date carrier mapping.

IP Geolocation Provider Comparison

FeatureSerpApi IP APIIPinfo.ioIPStack
Free Monthly Limit5,000 Queries50,000 (Non-commercial)100 Queries
Proxy/VPN DetectionIncluded FreePaid Tier OnlyPaid Tier Only
Response Latency<50ms~60ms~120ms
ASN & Carrier DataIncludedIncludedPaid Tier Only
Commercial UseAllowed on Free TierProhibited on FreeAllowed

IP Intelligence Data Matrix

country & city
Country name, ISO code, city, zip
coordinates
Latitude & Longitude floats
timezone
IANA timezone string & UTC offset
asn & isp
AS number, organization & ISP carrier
is_proxy
Boolean VPN / Proxy detection flag
is_hosting
Boolean datacenter cloud IP flag

API Request Parameters & Specifications

Parameter Type Required Description
ip String Optional IPv4 or IPv6 address to look up (e.g. 8.8.8.8 or 2607:f8b0:4004:809::200e). If omitted, the caller's IP is automatically resolved.
token String Required Your API secret authentication key.

Quick Developer Integration Snippets

import requests

url = "https://serpapi.org/api/v1/ip-lookup"
params = {"ip": "8.8.8.8", "token": "YOUR_API_KEY"}
response = requests.get(url, params=params)
data = response.json()

print(f"IP: {data['ip']} -> {data['city']}, {data['country']}")
print(f"ISP: {data['isp']} ({data['as']})")
print(f"Security: Proxy={data['is_proxy']}, Datacenter={data['is_hosting']}")
const fetch = require('node-fetch');

async function getIpInfo() {
  const res = await fetch('https://serpapi.org/api/v1/ip-lookup?ip=8.8.8.8&token=YOUR_API_KEY');
  const data = await res.json();
  console.log(`${data.ip}: ${data.city}, ${data.country_code}`);
}
getIpInfo();
<?php
$json = file_get_contents("https://serpapi.org/api/v1/ip-lookup?ip=8.8.8.8&token=YOUR_API_KEY");
$data = json_decode($json, true);
echo "{$data['ip']} is located in {$data['city']}, {$data['country']}\n";
curl -X GET "https://serpapi.org/api/v1/ip-lookup?ip=8.8.8.8&token=YOUR_API_KEY"

IP Geolocation API Use Cases

Fraud Prevention

Flag high-risk transactions originating from datacenter proxies, VPNs, or mismatched billing countries during user checkout.

Content Personalization

Automatically route users to localized currency prices, regional landing pages, and native language content based on IP.

Geo-Blocking & DRM

Enforce geographic content licensing restrictions and compliance requirements (GDPR, regional streaming rights).

Log Enrichment

Enrich server access logs and SIEM security events with city, country, ISP, and ASN metadata for automated threat analysis.

IP Geolocation API FAQ

Our IP Lookup API returns country name, country code, region, city, zip code, latitude, longitude, timezone string, ISP name, organization, ASN string, and boolean indicators for proxy, hosting datacenter, and mobile connection.

Country level accuracy exceeds 99.8%, and city-level accuracy is updated daily using global BGP routing tables and official Regional Internet Registry (RIR) databases.

Every free account receives 5,000 requests every month across all endpoints, including the IP Geolocation API. Commercial use is permitted on the free plan.

Yes, boolean flags is_proxy and is_hosting allow you to instantly identify anonymized VPN/proxy traffic and cloud server infrastructure.

Yes, both IPv4 and IPv6 addresses are supported natively by the lookup endpoint.

Our Anycast CDN infrastructure serves IP lookup queries in sub-50 milliseconds average latency globally.

Explore Related Developer APIs

Combine IP Geolocation with Domain Intelligence, Maps, and Web Search for complete developer intelligence.

Top