IP Geolocation API: City-Level IP Location Data for Any IPv4 or IPv6 Address

Resolve any IPv4 or IPv6 address to its precise location - country, city, ZIP, timezone, ISP, and ASN in a single API call. City-level accuracy for 85%+ of global IPs. Updated daily. JSON and XML output. Start free with 500 credits, no credit card required.

curl --location --request GET 'https://api.whoisfreaks.com/v1.0/geolocation?apiKey=API_KEY&ip=8.8.8.8'
[
  {
    "ip": "8.8.8.8",
    "location": {
      "continent_code": "NA",
      "continent_name": "North America",
      "country_code2": "US",
      "country_code3": "USA",
      "country_name": "United States",
      "country_name_official": "United States of America",
      "country_capital": "Washington, D.C.",
      "state_prov": "California",
      "state_code": "US-CA",
      "district": "Santa Clara",
      "city": "Mountain View",
      "locality": "Mountain View",
      "accuracy_radius": "11.534",
      "confidence": "medium",
      "zipcode": "94043-1351",
      "latitude": "37.42240",
      "longitude": "-122.08421",
      "is_eu": false,
      "geoname_id": "6301403",
      "country_emoji": "🇺🇸"
    },
    "country_metadata": {
      "calling_code": "+1",
      "tld": ".us",
      "languages": [
        "en-US",
        "es-US",
        "haw",
        "fr"
      ]
    },
    "network": {
      "asn": {
        "as_number": "AS15169",
        "organization": "Google LLC",
        "country": "US",
        "asn_name": "GOOGLE",
        "type": "BUSINESS",
        "domain": "google.com",
        "date_allocated": "2000-03-30",
        "allocation_status": "",
        "num_of_ipv4_routes": "1060",
        "num_of_ipv6_routes": "157",
        "rir": "ARIN"
      },
      "connection_type": "",
      "company": {
        "name": "Google LLC",
        "type": "HOSTING",
        "domain": "google.com"
      }
    },
    "currency": {
      "code": "USD",
      "name": "US Dollar",
      "symbol": "$"
    }
  }
]
pricing backgroundEclipse Top RightEclipse Top LeftEclipse WHOIS Stats

Our Products

IP Geolocation API

Identify IP locations with precision for targeting, localization, and threat detection using our real-time IP Geolocation API.

IP Geolocation API

The WhoisFreaks IP Geolocation API is an IP location API that resolves any IPv4 or IPv6 address to country, city, ZIP or postal code, latitude and longitude, and neighbourhood-level locality. Every response carries an accuracy_radius value. Output is parsed JSON or XML.

For VPN, proxy, and Tor detection alongside geolocation, use the IP Reputation API - it returns a composite threat score and full anonymizer classification in the same call.
Geolocation API

Product

Bulk IP Geolocation API

Instantly process and geolocate multiple IP addresses at once using our Bulk Geolocation API.

Bulk Geolocation API

The Bulk Geolocation API takes up to 100 IPv4 or IPv6 addresses per request and returns the same full record for each one: country, region, city, ZIP, coordinates, timezone, ISP, ASN, and the accuracy_radius value. Output is JSON. Each address in the batch counts as one credit, so a 100-IP request costs 100 credits against your plan.

monitoring

Features

What Our Geolocation API Offers

Real-time IP location API plus a downloadable GeoIP database, for fraud scoring, access control, and localization.

IP Location Module

IP Location Module

Resolves an IP to city and neighbourhood level, returning an accuracy_radius value per response.

Country Metadata

Country Metadata

We enrich every IP response with country-specific metadata like calling codes, ccTLDs, and primary languages.

Network Module

Network Module

The Network module provides full ASN intel like organization, country, type, RIR, allocation, company, and connection type.

Bulk IP Address Lookup

Bulk IP Address Lookup

Send up to 100 IPv4 or IPv6 addresses in one request and read back a complete geolocation record for each of them.

Country Level Accuracy

Country Level Accuracy

Determines the country behind any IPv4 or IPv6 address, with accuracy above 95%.

City Level Accuracy

City Level Accuracy

Accurately maps an IP address to a specific city or metro area with high precision for fraud detection and access control.

Zip Code & Timezone

Zip Code & Timezone

Identifies an IP’s postal/ZIP code and time zone to enable precise delivery, localized experiences, and anomaly detection.

Latitude and Longitude

Latitude and Longitude

Provides the geographical coordinates (latitude and longitude) corresponding to the IP address location.

Product

IP Geolocation Database

Locates suspicious activity accurately with city and state-level Geo IP data.

IP Geolocation Database

Download the full geolocation dataset instead of querying it per IP. The database covers 29.6M+ IP ranges across 252 countries, 7,646 states, 144,158 cities and 660,046 ZIP codes, and ships as separate IP-to-City and IP-to-Country files. Use it when you need local lookups at log scale with no per-request cost.

monitoring

Use Cases

Geolocation in Action

See how IP address location insights power targeted marketing and real-time threat detection.

Threat Origin Detection

Threat Origin Detection

Use geolocation data to correlate IP addresses with precise locations, trace threat origins, and mitigate attacks in time.

Anomaly Detection

Anomaly Detection

Flag unusual activity such as rapid logins from distant locations that may indicate account compromise.

Policy Enforcement and Compliance

Policy Enforcement and Compliance

Comply with data residency laws (e.g., GDPR) by restricting access or applying region-aware policies on the website.

Personalize Content

Personalize Content

Deliver geo-targeted content by region using an IP location API to boost engagement and increase conversions.

Fraud Scoring

Fraud Scoring

Compare the user’s IP against historical data and flag extreme or rapid shifts to high-risk locations or VPN usage.

Geofencing and Content Filtering

Geofencing and Content Filtering

Use an IP location API to block risky access, protect sensitive services, and restrict adult content by region.

Request demo background

Use IP geolocation for location context to logins and transactions. Correlate anomalies such as impossible travel to detect and block suspicious activity.

Integrations

Where the IP Geolocation API Fits in Your Stack

The WhoisFreaks IP Geolocation API ships with official Python and Go SDKs, so you can resolve any IPv4 or IPv6 address to country, city, timezone, and ASN in a single function call inside your data pipeline.

Zapier, Make, and n8n let no-code teams append location data to CRM records, route form submissions by country, or trigger region-based logic without touching backend code.

Enterprise security teams integrate it into Splunk, Elastic, and SOAR playbooks to enrich authentication events, firewall logs, and fraud alerts with precise geographic and network context in real time.

Integration Workflow
ASN WHOIS API

ASN WHOIS API

Look up the autonomous system behind a located IP for its owner, BGP routes, and its IP prefixes.

ASN WHOIS API
IP Geolocation Database

IP Geolocation Database

Download the location, ISP, ASN, and connection type data for every IPv4 and IPv6 address instead.

IP Geolocation Database
IP WHOIS API

IP WHOIS API

Get the registered owner, RIR allocation, network range, and abuse contacts behind any IP address.

IP WHOIS API

FAQs

Common questions on geo enrichment: update frequency, free usage and rate-limiting.

What is an IP Geolocation API and what does it do?

An IP Geolocation API allows you to fetch a device’s physical location using its IP address. It provides real-time data such as country, city, ISP, timezone, and currency. We enhance this with VPN, proxy, and TOR detection powered by multiple reliable data sources and frequent updates for both IPv4 and IPv6.

What data does the IP Location API provide?

The IP Location API returns detailed IP-based data, including country, region, city, ZIP code, latitude/longitude, timezone, ISP, ASN, and organization. It also detects VPN/proxy usage, threat indicators, and parses user-agent data for device-level insights.

Does the API support IPv6 addresses?

Yes. Both IPv4 and IPv6 addresses are fully supported. Pass any IPv6 address (e.g., 2606:4700:4700::1111) as the ip parameter and receive the same full geolocation response as for IPv4.

Are there any free options for IP Geolocation API access?

Yes, we offer 500 free credits for new users. These allow access to core features like country, city, ISP, timezone, and currency. You can upgrade for higher usage limits and advanced features such as VPN/proxy/TOR detection.

What is the accuracy of the WhoisFreaks IP Geolocation API?

Country-level accuracy exceeds 95%. City-level accuracy is approximately 85%+, with a typical location radius of 20-50km. Every response includes an accuracy_radius field so your application can adapt when precision varies by region or IP type.
Yes. IP geolocation resolves the network that routes an address, not a person or a household, and the data comes from public registry and routing records. Under GDPR an IP address can still count as personal data when combined with other identifiers, so log it under the same policy you apply to other user data. This question appears in the live PAA block for both ip location api and geoip api. It appears nowhere on the page.

What is GeoIP and how does it differ from browser geolocation?

GeoIP means resolving a location from an IP address, server-side, with no permission prompt and no user action. The browser Geolocation API asks the visitor for GPS-level permission and returns a precise point. GeoIP is coarser, area-level, and works on every request. Use GeoIP for fraud checks and routing, and browser geolocation for maps and turn-by-turn.

How is the IP Location API secured?

All requests to the API are encrypted via HTTPS. Internally, it also uses globally distributed servers and edge nodes for uptime and DDoS protection, and it fully complies with data privacy laws like GDPR to ensure secure and ethical data use.

Can I perform bulk IP lookups with the IP Location API?

Yes, the API supports bulk IP lookups for up to 100 IPs per request. This feature is available on paid plans, and each IP in the batch counts toward your overall API usage.

What is the update frequency of the IP Location API data?

IP data is refreshed every 24 hours to ensure accuracy. Additionally, downloadable geolocation databases are available with weekly and monthly update options.

How many free API credits do new users get, and what are the rate limits?

New users receive 500 API credits. Free-tier credits are rate-limited to 10 requests per minute for the IP Geolocation API endpoint, 5 requests per minute for the Bulk IP Geolocation API endpoint. No credit card is required to start.

Do you provide any headers in API response regarding rate limiting?

Yes, there are following three header parameters in the response:
  • X-RateLimit-Allowed-Requests: Tells the max allowed API requests per minute on a specific plan.
  • X-RateLimit-Remaining-Requests: Tells the remaining API requests per minute for that plan.
  • X-RateLimit-Remaining-Time: Tells after how much time the API requests per minute will be reset.
Ready to get started?Join now and claim 500 credits for free!

Elevate your cybersecurity strategy with our all-in-one domain and IP intelligence platform empowering analysts, researchers, and brand owners with real-time WHOIS, DNS, IP, and subdomain insights.