Free IP Geolocation and IP Lookup API Accurate IP Address Location Finder

Our IP Geolocation API provides geographical information about website visitors with any IPv4 or IPv6 address in JSON and XML format over a secure HTTPS connection even in our free plan. Our IP API provides data such as country name, country code, city, state, local currency, time zone, ISP, ASN, Company Details, device data from User-Agent String, VPN, Proxy, TOR and threat intelligence data. Our services are globally available with latency-based routing.

    • stringip:"216.73.216.112" ,
    • stringhostname:"216.73.216.112" ,
    • objectlocation:Object,
      • stringcontinent_code:"NA" ,
      • stringcontinent_name:"North America" ,
      • stringcountry_code2:"US" ,
      • stringcountry_code3:"USA" ,
      • stringcountry_name:"United States" ,
      • stringcountry_name_official:"United States of America" ,
      • stringcountry_capital:"Washington, D.C." ,
      • stringstate_prov:"Ohio" ,
      • stringstate_code:"US-OH" ,
      • stringdistrict:"Franklin" ,
      • stringcity:"Columbus" ,
      • stringlocality:"Columbus" ,
      • stringaccuracy_radius:"13.517" ,
      • stringconfidence:"medium" ,
      • stringzipcode:"43215" ,
      • stringlatitude:"39.96199" ,
      • stringlongitude:"-83.00275" ,
      • booleanis_eu:false ,
      • stringcountry_flag:"https://ipgeolocation.io/static/flags/us_64.png" ,
      • stringgeoname_id:"4516394" ,
      • stringcountry_emoji:"🇺🇸" ,
    • objectcountry_metadata:Object,
      • stringcalling_code:"+1" ,
      • stringtld:".us" ,
      • languages:Array[4],
        • stringlanguages[0]:"en-US" ,
        • stringlanguages[1]:"es-US" ,
        • stringlanguages[2]:"haw" ,
        • stringlanguages[3]:"fr" ,
    • objectnetwork:Object,
      • objectasn:Object,
        • stringas_number:"AS16509" ,
        • stringorganization:"Amazon.com, Inc." ,
        • stringcountry:"US" ,
        • stringasn_name:"AMAZON-02" ,
        • stringtype:"BUSINESS" ,
        • stringdomain:"amazon.com" ,
        • stringdate_allocated:"" ,
        • stringallocation_status:"assigned" ,
        • stringnum_of_ipv4_routes:"15829" ,
        • stringnum_of_ipv6_routes:"6210" ,
        • stringrir:"ARIN" ,
      • stringconnection_type:"" ,
      • objectcompany:Object,
        • stringname:"Anthropic, PBC" ,
        • stringtype:"" ,
        • stringdomain:"" ,
    • objectcurrency:Object,
      • stringcode:"USD" ,
      • stringname:"US Dollar" ,
      • stringsymbol:"$" ,
    • objectsecurity:Object,
      • numberthreat_score:80 ,
      • booleanis_tor:false ,
      • booleanis_proxy:true ,
      • stringproxy_type:"VPN" ,
      • stringproxy_provider:"" ,
      • booleanis_anonymous:true ,
      • booleanis_known_attacker:true ,
      • booleanis_spam:false ,
      • booleanis_bot:false ,
      • booleanis_cloud_provider:true ,
      • stringcloud_provider:"Anthropic, PBC" ,
    • objectabuse:Object,
      • stringroute:"216.73.216.0/22" ,
      • stringcountry:"" ,
      • stringhandle:"ANTHR5-ARIN" ,
      • stringname:"Anthropic" ,
      • stringorganization:"Anthropic" ,
      • stringrole:"technical" ,
      • stringkind:"group" ,
      • stringaddress:"548 Market St. PMB 90375 San Francisco CA 94104-5401 United States" ,
      • emails:Array[1],
        • stringemails[0]:"arin@anthropic.com" ,
      • phone_numbers:Array[1],
        • stringphone_numbers[0]:"+1-415-236-0599" ,
    • objecttime_zone:Object,
      • stringname:"America/New_York" ,
      • numberoffset:-5 ,
      • numberoffset_with_dst:-4 ,
      • stringcurrent_time:"2025-08-27 18:28:06.924-0400" ,
      • numbercurrent_time_unix:1756333686.924 ,
      • stringcurrent_tz_abbreviation:"EDT" ,
      • stringcurrent_tz_full_name:"Eastern Daylight Time" ,
      • stringstandard_tz_abbreviation:"EST" ,
      • stringstandard_tz_full_name:"Eastern Standard Time" ,
      • booleanis_dst:true ,
      • numberdst_savings:1 ,
      • booleandst_exists:true ,
      • stringdst_tz_abbreviation:"EDT" ,
      • stringdst_tz_full_name:"Eastern Daylight Time" ,
      • objectdst_start:Object,
        • stringutc_time:"2025-03-09 TIME 07" ,
        • stringduration:"+1H" ,
        • booleangap:true ,
        • stringdate_time_after:"2025-03-09 TIME 03" ,
        • stringdate_time_before:"2025-03-09 TIME 02" ,
        • booleanoverlap:false ,
      • objectdst_end:Object,
        • stringutc_time:"2025-11-02 TIME 06" ,
        • stringduration:"-1H" ,
        • booleangap:false ,
        • stringdate_time_after:"2025-11-02 TIME 01" ,
        • stringdate_time_before:"2025-11-02 TIME 02" ,
        • booleanoverlap:true ,
    • objectuser_agent:Object,
      • stringuser_agent_string:"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.c..." ,
      • stringname:"ClaudeBot" ,
      • stringtype:"Robot" ,
      • stringversion:"1.0" ,
      • stringversion_major:"1" ,
      • objectdevice:Object,
        • stringname:"Anthropic ClaudeBot" ,
        • stringtype:"Robot" ,
        • stringbrand:"Anthropic" ,
        • stringcpu:"Unknown" ,
      • objectengine:Object,
        • stringname:"ClaudeBot" ,
        • stringtype:"Robot" ,
        • stringversion:"1.0" ,
        • stringversion_major:"1" ,
      • objectoperating_system:Object,
        • stringname:"Cloud" ,
        • stringtype:"Cloud" ,
        • stringversion:"??" ,
        • stringversion_major:"??" ,
        • stringbuild:"??" ,
  • IP Location Module

    IP to Location module provides geolocation information related to an IP address such as continent, country, country capital, state/province, city, locality, accuracy radius, zip code, DMA code, country flag, latitude and longitude information.

    Response
    1"location": {
    2  "continent_code": "NA",
    3  "continent_name": "North America",
    4  "country_code2": "US",
    5  "country_code3": "USA",
    6  "country_name": "United States",
    7  "country_name_official": "United States of America",
    8  "country_capital": "Washington, D.C.",
    9  "state_prov": "California",
    10  "state_code": "US-CA",
    11  "district": "Santa Clara",
    12  "city": "Mountain View",
    13  "locality": "Mountain View",
    14  "accuracy_radius": "5",
    15  "confidence": "High",
    16  "dma_code": "807",
    17  "zipcode": "94043-1351",
    18  "latitude": "37.42240",
    19  "longitude": "-122.08421",
    20  "is_eu": false,
    21  "country_flag": 
    22      "https://ipgeolocation.io/static/flags/us_64.png",
    23  "geoname_id": "6301403",
    24  "country_emoji": "🇺🇸"
    25}

    Country Metadata Module

    Country metadata module provides country calling (dialing) code, country's top level domain name (ccTLD) and official spoken languages in the country associated with the queried IP address.

    Response
    1"country_metadata": {
    2  "calling_code": "+1",
    3  "tld": ".us",
    4  "languages": [
    5    "en-US",
    6    "es-US",
    7    "haw",
    8    "fr"
    9  ]
    10}

    Network Module

    Network information module provides network related information such as ASN details including AS number, organization name, country where the ASN is registered, type of ASN, Regional Internet Registry (RIR), number of IPv4 and IPv6 routes, and allocation status.

    It also includes company details such as the name of the company to whom the IP address is further licensed by the ISP, its type, and domain name, along with the connection type (wired or wireless).

    Response
    1"network": {
    2  "asn": {
    3    "as_number": "15169",
    4    "organization": "Google LLC",
    5    "country": "US",
    6    "asn_name": "GOOGLE",
    7    "type": "isp",
    8    "domain": "about.google",
    9    "date_allocated": "1997-09-15",
    10    "allocation_status": "Assigned",
    11    "num_of_ipv4_routes": "1099",
    12    "num_of_ipv6_routes": "107",
    13    "rir": "ARIN"
    14  },
    15  "company": {
    16    "name": "Google LLC",
    17    "type": "hosting",
    18    "domain": "google.com"
    19  },
    20  "connection_type": "wired"
    21}

    Currency Module

    IP to Currency module provides currency information of the country such as currency name, currency symbol and currency code from an IP address.

    Response
    1"currency": {
    2  "name": "US Dollar",
    3  "code": "USD",
    4  "symbol": "$"
    5}

    Security Module

    The security module provides threat intelligence data such as threat score, is tor, vpn or proxy, proxy provider name, is known attacker, and if the IP address belongs to one of the cloud providers.

    Response
    1"security": {
    2  "threat_score": 80,
    3  "is_tor": false,
    4  "is_proxy": true,
    5  "proxy_type": "VPN",
    6  "proxy_provider": "proton",
    7  "is_anonymous": true,
    8  "is_known_attacker": true,
    9  "is_spam": false,
    10  "is_bot": false,
    11  "is_cloud_provider": false,
    12  "cloud_provider": ""
    13}

    Abuse Contact Module

    The Abuse Module provides contact details of the responsible party for the queried IP address, including country, organization, email address and phone number. Ideal for reporting malicious activity or handling abuse complaints.

    Response
    1"abuse": {
    2  "route": "78.8.0.0/14",
    3  "country": "PL",
    4  "handle": "NT1264-RIPE",
    5  "name": "Netia Telekom S.A.",
    6  "organization": "Netia Telekom S.A.",
    7  "role": "abuse",
    8  "kind": "group",
    9  "address": "Poleczki 13\n02-822 Warszawa\nPoland",
    10  "emails": [
    11    "abuse@inetia.pl"
    12  ],
    13  "phone_numbers": [
    14    "+48(22)352 2213",
    15    "+48(22)352 0000"
    16  ]
    17}

    Time Zone Module

    IP to Time Zone module provides time and timezone related information such as timezone name, UTC/GMT offset, current date and time, daylight saving time status, daylight saving offset in hours, along with start and end details of daylight saving time.

    Response
    1"time_zone": {
    2  "name": "America/Los_Angeles",
    3  "offset": -8,
    4  "offset_with_dst": -7,
    5  "current_time": "2024-10-02 00:06:41.301-0700",
    6  "current_time_unix": 1727852801.301,
    7  "is_dst": true,
    8  "dst_savings": 1,
    9  "dst_exists": true,
    10  "dst_start": {
    11    "utc_time": "2024-03-10 TIME 10",
    12    "duration": "+1H",
    13    "gap": true,
    14    "date_time_after": "2024-03-10 TIME 03",
    15    "date_time_before": "2024-03-10 TIME 02",
    16    "overlap": false
    17  },
    18  "dst_end": {
    19    "utc_time": "2024-11-03 TIME 09",
    20    "duration": "-1H",
    21    "gap": false,
    22    "date_time_after": "2024-11-03 TIME 01",
    23    "date_time_before": "2024-11-03 TIME 02",
    24    "overlap": true
    25  }
    26}

    User Agent Parser Module

    User Agent module parses the browser user agent string and provides detailed device information such as device name, device version, device type, device operating system, device browser, browser engine and browser version. It can identify robots, crawlers and attackers.

    Response
    1"user_agent": {
    2  "user_agent_string": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Safari/605.1.15",
    3  "name": "Safari",
    4  "type": "Browser",
    5  "version": "13.0.5",
    6  "version_major": "13",
    7  "device": {
    8    "name": "Apple Macintosh",
    9    "type": "Desktop",
    10    "brand": "Apple",
    11    "cpu": "Intel"
    12  },
    13  "engine": {
    14    "name": "AppleWebKit",
    15    "type": "Browser",
    16    "version": "605.1.15",
    17    "version_major": "605"
    18  },
    19  "operating_system": {
    20    "name": "Mac OS",
    21    "type": "Desktop",
    22    "version": "10.15.3",
    23    "version_major": "10.15",
    24    "build": "??"
    25  }
    26}

    Reverse IP Lookup Module

    With reverse IP Lookup, you can resolve the host name or domain or router dns address. This gives you detailed information about the original source of traffic.

    Request
    curl 'https://api.ipgeolocation.io/v2/ipgeo?include=hostname&ip=8.8.8.8&apiKey=API_KEY'
    Response
    1{
    2  "ip":"8.8.8.8",
    3  "hostname":"dns.google",
    4  "..."
    5}

    Domain IP Lookup

    Enter the domain address in place of IP address and our API will perform a DNS Lookup to give you the information about the web hosting provider and the geographical location of the website.

    Response
    1{
    2  "domain": "ipgeolocation.io",
    3  "ip": "104.20.40.71",
    4  "location": {
    5    "country_name": "United States",
    6    "state_prov": "California",
    7    "city": "San Francisco",
    8    "..."
    9  },
    10  "network": {
    11    "asn": {
    12      "as_number": "13335",
    13      "domain": "cloudflare.com"
    14    },
    15    "company": {
    16      "name": "Cloudflare, Inc."
    17    }
    18  }
    19}

    Bulk IP Address Lookup Support

    Use our Bulk IP Lookup endpoint to perform batch lookup of multiple IPs in one go. One request can have up to 50,000 IPs. Both IPv4 and IPv6 are supported.

    Request
    curl -X POST 'https://api.ipgeolocation.io/v2/ipgeo-bulk?apiKey=API_KEY' \
     -H 'Content-Type: application/json' \
     -d '{
     "ips": ["1.1.1.1", "1.2.3.4", "1.2.3.5", "1.2.3.6", "1.2.3.7"]
     }'

    Response in Multiple Languages

    You can retrieve the geolocation information for an IP address in the following languages:

    English FlagEnglish German FlagGerman Russian FlagRussian Japanese FlagJapanese French FlagFrench Chinese Simplified FlagChinese Simplified Spanish FlagSpanish Czech Republic FlagCzech Republic Italian FlagItalian Korean FlagKorean Persian FlagPersian Portuguese FlagPortuguese Standard Arabic FlagStandard Arabic

    Use Cases

    Website Content Localization with Our IP API

    Adapt the content of your website to the destination of your visitors. Make your visitors feel right at home by "talking" to them in their local language and connect with them instantly. With IP geolocation, redirect your users to their region-specific websites and increase the possibility of increasing conversions up to 70%.

    content localization image

    Non-Intrusive Geolocation with IP Geolocation API

    Do you have an awesome content localization strategy in place? IP geolocation is a non-intrusive way to know where your visitors are coming from. Don't ruin your visitor's website experience by showing annoying pop-ups asking for their location. Our geolocation API will detect their location from their IP address and show them the relevant message.

    Non interactive Geolocation image

    Digital Rights Protection

    Enforce digital rights of your content using IP location API. Build a virtual fence around your content and make sure that only the people inside the fence can see it.You can now confidently restrict unauthorized access while providing uninterrupted experiences to authorized users with the accuracy of our IP Geolocation API.

    Digital Rights Protection image

    IP API to Prevent Threats and Scams

    With our security, geolocation, and user agent module, you can identify anonymous traffic sources, known attackers, suspicious devices and tor nodes to prevent online fraud, trial abusers, forum spams and botnet attackers.

    Access Denied image

    Ready to get started?Get Started with IP Intelligence API Today

    CTA Illustration
    Documentation

    Included in

    Advance PlanSecurity PlanStandard PlanFree Plan

    IP Geolocation API

    IP Geolocation API provides real-time and accurate geolocation, network, abuse, and security information for any IPv4 or IPv6 address and domain name along with the user-agent detail for the provided user-agent string. You can geolocate your online visitors and provide them the customized user-experience accordingly.

    We provide the two endpoints in our IP Lookup API to get geolocation information.

    Note
    IPGeolocation.io now offers three API tiers to better fit your needs

    • Standard IPGeolocation API

    Accurate IP geolocation with ASN and Company/ISP details. IP security data is not included. See the documentation below for examples.

    • IP Security API

    Detects VPNs, Tor, proxies, spam sources, attackers, and cloud providers (including names when available), along with standard geolocation, ASN, and Company/ISP data. View Documentation

    • Advanced IPGeolocation API

    Combines precise IP geolocation data with enhanced ASN and Company data, IP abuse details, and IP Security insights—all accessible via a single /v2/ipgeo endpoint. For full examples and usage guides, please refer to the documentation below.

    Note

    For client-side calls to the endpoints mentioned below using the Request Origin (available on paid plans only), the apiKey parameter can be omitted.

    Single IP Geolocation Lookup API

    Single IP Location API can be used in two ways to lookup any IP address or domain name with JSON or XML response. The URL for this endpoint is https://api.ipgeolocation.io/v2/ipgeo and its full JSON response is below:

    Response
    1{
    2    "ip": "8.8.8.8",
    3    "hostname": "dns.google",
    4    "location": {
    5      "continent_code": "NA",
    6      "continent_name": "North America",
    7      "country_code2": "US",
    8      "country_code3": "USA",
    9      "country_name": "United States",
    10      "country_name_official": "United States of America",
    11      "country_capital": "Washington, D.C.",
    12      "state_prov": "California",
    13      "state_code": "US-CA",
    14      "district": "Santa Clara",
    15      "city": "Mountain View",
    16      "locality": "Mountain View",
    17      "accuracy_radius": "5",
    18      "confidence": "High",
    19      "dma_code": "807",
    20      "zipcode": "94043-1351",
    21      "latitude": "37.42240",
    22      "longitude": "-122.08421",
    23      "is_eu": false,
    24      "country_flag": 
    25        "https://ipgeolocation.io/static/flags/us_64.png",
    26      "geoname_id": "6301403",
    27      "country_emoji": "🇺🇸"
    28    },
    29    "country_metadata": {
    30      "calling_code": "+1",
    31      "tld": ".us",
    32      "languages": [
    33        "en-US",
    34        "es-US",
    35        "haw",
    36        "fr"
    37      ]
    38    },
    39    "network": {
    40      "asn": {
    41       "as_number": "AS15169",
    42       "organization": "Google LLC",
    43       "country": "US",
    44       "asn_name": "GOOGLE",
    45       "type": "isp",
    46       "domain": "about.google",
    47       "date_allocated": "",
    48       "allocation_status": "Assigned",
    49       "num_of_ipv4_routes": "1099",
    50       "num_of_ipv6_routes": "107",
    51       "rir": "ARIN"
    52       },
    53      "connection_type": "wired",
    54      "company": {
    55       "name": "Google LLC",
    56       "type": "hosting",
    57       "domain": "google.com"
    58      }
    59    },
    60    "currency": {
    61      "code": "USD",
    62      "name": "US Dollar",
    63      "symbol": "$"
    64    },
    65    "security": {
    66      "threat_score": 80,
    67      "is_tor": false,
    68      "is_proxy": true,
    69      "proxy_type": "VPN",
    70      "proxy_provider": "",
    71      "is_anonymous": true,
    72      "is_known_attacker": true,
    73      "is_spam": false,
    74      "is_bot": false,
    75      "is_cloud_provider": false,
    76      "cloud_provider": ""
    77    },
    78    "abuse": {
    79      "route": "8.8.8.0/24",
    80      "country": "US",
    81      "handle": "ABUSE5250-ARIN",
    82      "name": "Abuse",
    83      "organization": "Abuse",
    84      "role": "abuse",
    85      "kind": "group",
    86      "address": "1600 Amphitheatre Parkway, Mountain View, CA, 94043, United States",
    87      "emails": [
    88       "network-abuse@google.com"
    89      ],
    90      "phone_numbers": [
    91       "+1-650-253-0000"
    92      ]
    93    },
    94    "time_zone": {
    95      "name": "America/Los_Angeles",
    96      "offset": -8,
    97      "offset_with_dst": -7,
    98      "current_time": "2025-04-22 04:56:55.430-0700",
    99      "current_time_unix": 1745323015.43,
    100      "is_dst": true,
    101      "dst_savings": 1,
    102      "dst_exists": true,
    103      "dst_start": {
    104       "utc_time": "2025-03-09 TIME 10",
    105       "duration": "+1H",
    106       "gap": true,
    107       "date_time_after": "2025-03-09 TIME 03",
    108       "date_time_before": "2025-03-09 TIME 02",
    109       "overlap": false
    110      },
    111      "dst_end": {
    112       "utc_time": "2025-11-02 TIME 09",
    113       "duration": "-1H",
    114       "gap": false,
    115       "date_time_after": "2025-11-02 TIME 01",
    116       "date_time_before": "2025-11-02 TIME 02",
    117       "overlap": true
    118      }
    119    },
    120    "user_agent": {
    121      "user_agent_string": "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9",
    122      "name": "Safari",
    123      "type": "Browser",
    124      "version": "9.0.2",
    125      "version_major": "9",
    126      "device": {
    127       "name": "Apple Macintosh",
    128       "type": "Desktop",
    129       "brand": "Apple",
    130       "cpu": "Intel"
    131      },
    132      "engine": {
    133       "name": "AppleWebKit",
    134       "type": "Browser",
    135       "version": "601.3.9",
    136       "version_major": "601"
    137      },
    138      "operating_system": {
    139       "name": "Mac OS",
    140       "type": "Desktop",
    141       "version": "10.11.2",
    142       "version_major": "10.11",
    143       "build": "??"
    144      }
    145    }
    146  }

    Passing an IPv4, IPv6 Address or a domain

    In order to find geolocation information about an IP address or a domain name, pass it as a query parameter ip like below. Note that apiKey is also need to pass as a query parameter for authorization. This endpoint is meant to be called from the server side.

    Passing an IPv4

    Here's an example to get the geolocation information for the IP address '8.8.8.8'.

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=8.8.8.8'

    Without Passing an IP Address

    When this endpoint is queried without an IP address, it returns the geolocation information of the device/client which is calling it. This endpoint is meant to be called from client side.

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY'

    Bulk IP Geolocation Lookup API

    This feature is available only on our paid API subscriptions (STANDARD or ADVANCED). This endpoint allows you to perform the geolocation lookup for multiple IPv4, IPv6 addresses or domain names (maximum 50,000) at the same time. The requests count per lookup is equal to total IP addresses or domain names passed.

    To perform bulk IP Geolocation Lookup, send a POST request and pass the "ips" array as JSON data along with it. Here is an example to query the geolocation data for multiple IPs at once.

    cUrl
    curl -X POST 'https://api.ipgeolocation.io/v2/ipgeo-bulk?apiKey=API_KEY' \
    -H 'Content-Type: application/json' \
    -d '{"ips":["1.1.1.1","1.2.3.4","4.3.2.1"]}'

    Response in Multiple Languages

    The geolocation information for an IP address from the IP Geolocation API can be retrieved in the following languages:

    • English (en)
    • German (de)
    • Russian (ru)
    • Japanese (ja)
    • French (fr)
    • Chinese Simplified (cn)
    • Spanish (es)
    • Czech (cs)
    • Italian (it)
    • Korean (ko)
    • Persian (fa)
    • Portuguese (pt)

    By default, the API responds in English. You can change the response language by passing the language code as a query parameter lang . Here is an example to get the geolocation data for IP address '1.1.1.1' in Chinese language.

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=1.1.1.1&lang=cn'
    Note

    Only the paid plan subscriptions (STANDARD or ADVANCED) can get the response in languages other than English. All the other subscriptions will only get the response in English.

    Filter Responses

    We've built our API to give you fine granularity. Specify what you want in query parameter and get only those fields. This will save you processing time, bandwidth and improve the API response time.

    You can filter the API response in two ways:

    • Get the Required Fields Only

    First, you can filter the API response by specifying names of the fields that you want instead of getting the full response. Names of the required fields must be passed as a query Parameter fields in the request. Here are a few examples to get only the required fields:

    Get location Information Only

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=1.1.1.1&fields=location'
    Response
    1{
    2    "ip": "1.1.1.1",
    3    "location": {
    4        "continent_code": "OC",
    5        "continent_name": "Oceania",
    6        "country_code2": "AU",
    7        "country_code3": "AUS",
    8        "country_name": "Australia",
    9        "country_name_official": "Commonwealth of Australia",
    10        "country_capital": "Canberra",
    11        "state_prov": "Queensland",
    12        "state_code": "AU-QLD",
    13        "district": "Brisbane",
    14        "city": "South Brisbane",
    15        "locality": "South Brisbane",
    16        "accuracy_radius": "5",
    17        "confidence": "High",
    18        "zipcode": "4101",
    19        "latitude": "-27.47306",
    20        "longitude": "153.01421",
    21        "is_eu": false,
    22        "country_flag": 
    23          "https://ipgeolocation.io/static/flags/au_64.png",
    24        "geoname_id": "10113228",
    25        "country_emoji": "🇦🇺"
    26    }
    27}

    Get Country Name and Organization Only

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=1.1.1.1&fields=location.country_name,network.asn.organization'
    Response
    1{
    2    "ip": "1.1.1.1",
    3    "location": {
    4        "country_name": "Australia"
    5    },
    6    "network": {
    7        "asn": {
    8            "organization": "Cloudflare, Inc."
    9        }
    10    }
    11}

    Get Only the Local Currency Information of Multiple IP Addresses

    You can use our filters with Bulk IP Lookup as well. Here is an example:

    cUrl
    curl -X POST 'https://api.ipgeolocation.io/v2/ipgeo-bulk?apiKey=API_KEY&fields=currency' \
    -H 'Content-Type: application/json' \
    -d '{"ips":["1.0.1.0","8.8.8.8"]}'
    Response
    1[
    2    {
    3        "ip": "1.0.1.0",
    4        "currency": {
    5            "code": "CNY",
    6            "name": "Yuan Renminbi",
    7            "symbol": "Â¥"
    8        }
    9    },
    10    {
    11        "ip": "8.8.8.8",
    12        "currency": {
    13            "code": "USD",
    14            "name": "US Dollar",
    15            "symbol": "$"
    16        }
    17    }
    18]

    • Remove the Unnecessary Fields

    Second, you can also filter the API response by excluding specific fields (except the IP address) that you don't need. To do this, pass the unwanted field names using the excludes query parameter, with each field represented as a dot-separated path. Here's an example showing how to exclude unnecessary fields:

    Exclude Continent Code, Currency and, Network Objects

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=8.8.8.8&excludes=location.continent_code,currency,network'
    Response
    1{
    2    "ip": "8.8.8.8",
    3    "location": {
    4        "continent_name": "North America",
    5        "country_code2": "US",
    6        "country_code3": "USA",
    7        "country_name": "United States",
    8        "country_name_official": "United States of America",
    9        "country_capital": "Washington, D.C.",
    10        "state_prov": "California",
    11        "state_code": "US-CA",
    12        "district": "Santa Clara",
    13        "city": "Mountain View",
    14        "locality": "Mountain View",
    15        "accuracy_radius": "5",
    16        "confidence": "High",
    17        "zipcode": "94043-1351",
    18        "latitude": "37.42240",
    19        "longitude": "-122.08421",
    20        "is_eu": false,
    21        "country_flag": 
    22          "https://ipgeolocation.io/static/flags/us_64.png",
    23        "geoname_id": "6301403",
    24        "country_emoji": "🇺🇸"
    25    },
    26    "country_metadata": {
    27        "calling_code": "+1",
    28        "tld": ".us",
    29        "languages": [
    30            "en-US",
    31            "es-US",
    32            "haw",
    33            "fr"
    34        ]
    35    }
    36}

    • Get the Location fields and Exclude Continent Information

    Third, You can combine the fields and  excludes query parameters for fully customized API queries. This approach helps you retrieve only the necessary data while reducing response latency. Here's a sample code to demonstrate how to use both parameters effectively:

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=8.8.8.8&fields=location&excludes=location.continent_code,location.continent_name'
    Response
    1{
    2    "ip": "8.8.8.8",
    3    "location": {
    4        "country_code2": "US",
    5        "country_code3": "USA",
    6        "country_name": "United States",
    7        "country_name_official": "United States of America",
    8        "country_capital": "Washington, D.C.",
    9        "state_prov": "California",
    10        "state_code": "US-CA",
    11        "district": "Santa Clara",
    12        "city": "Mountain View",
    13        "locality": "Mountain View",
    14        "accuracy_radius": "5",
    15        "confidence": "High",
    16        "zipcode": "94043-1351",
    17        "latitude": "37.42240",
    18        "longitude": "-122.08421",
    19        "is_eu": false,
    20        "country_flag": 
    21            "https://ipgeolocation.io/static/flags/us_64.png",
    22        "geoname_id": "6301403",
    23        "country_emoji": "🇺🇸"
    24    }
    25}
    Note

    You can customize the API response by using three query parameters:  fields= , include= and excludes= . These let you request only the data you need, reducing payload size and improving performance.

    When using these filters together, the following rules determine how they interact:

    • To request specific fields from nested objects (e.g.,  security , abuse , etc.), use  include=  to name the object, and  fields=  to specify which fields you want.
    • If a field or object appears in both  fields=  and  excludes= , the field will be included.  fields=   takes priority.
    • Similarly, if a field or object is listed in both  include=  and  excludes=  , the  include=  takes priority.
    • If both the object name and its specific fields are listed in  fields=  , the entire object will be included in the response.

    IP-Security Information for an IP Address

    IP Geolocation API also provides IP-Security information on Advanced API subscription, but doesn't respond it by default. To get IP-Security information along with the geolocation information, you must pass the  include=security  as a query parameter in the URL.

    Here is an example to IP Geolocation lookup that includes IP security information for the IP address:

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=8.8.8.8&fields=location&include=security'
    Response
    1{
    2  "ip": "8.8.8.8",
    3  "location": {
    4    "continent_code": "NA",
    5    "continent_name": "North America",
    6    "country_code2": "US",
    7    "country_code3": "USA",
    8    "country_name": "United States",
    9    "country_name_official": "United States of America",
    10    "country_capital": "Washington, D.C.",
    11    "state_prov": "California",
    12    "state_code": "US-CA",
    13    "district": "Santa Clara",
    14    "city": "Mountain View",
    15    "locality": "Mountain View",
    16    "accuracy_radius": "",
    17    "zipcode": "94043-1351",
    18    "latitude": "37.42240",
    19    "longitude": "-122.08421",
    20    "is_eu": false,
    21    "country_flag": "https://ipgeolocation.io/static/flags/us_64.png",
    22    "geoname_id": "6301403",
    23    "country_emoji": "🇺🇸"
    24  },
    25  "security": {
    26    "threat_score": 80,
    27    "is_tor": false,
    28    "is_proxy": true,
    29    "proxy_type": "VPN",
    30    "proxy_provider": "",
    31    "is_anonymous": true,
    32    "is_known_attacker": true,
    33    "is_spam": false,
    34    "is_bot": false,
    35    "is_cloud_provider": false,
    36    "cloud_provider": ""
    37  }
    38}

    Abuse Contact Information for an IP Address

    IP Geolocation API can also provide abuse contact information of an IP address on Advanced API subscription, but doesn't respond it by default. To get abuse contact information along with the geolocation information, you must pass the include=abuse as a query parameter in the URL.

    Here is an example of an IP Geolocation lookup that includes abuse contact information, along with the country and city associated with the IP address:

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=1.2.3.4&fields=location.city,location.country_name&include=abuse'
    Response
    1{
    2    "ip": "1.2.3.4",
    3    "location": {
    4        "city": "Brisbane",
    5        "country_name": "Australia"
    6    },
    7    "abuse": {
    8        "route": "1.2.3.0/24",
    9        "country": "AU",
    10        "handle": "IRT-APNICRANDNET-AU",
    11        "name": "IRT-APNICRANDNET-AU",
    12        "organization": "",
    13        "role": "abuse",
    14        "kind": "group",
    15        "address": "PO Box 3646 South Brisbane, QLD 4101 Australia",
    16        "emails": [
    17            "helpdesk@apnic.net"
    18        ],
    19        "phone_numbers": [
    20            "+61-7-3858-3188",
    21            " +61-7-3858-3199"
    22        ]
    23    }
    24}

    DMA Code for an IP Address

    If you want to get DMA (Designated Market Area) code, which is specifically used in the US for marketing and regional targeting, you can get through the IP Geolocation API on Advanced API subscription. To get DMA code along with the geolocation information, you must pass the include=dma as a query parameter in the URL.

    Here is an example of an IP Geolocation lookup that includes dma code, along with the location information associated with the IP address:

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=8.8.8.8&fields=location&include=dma'
    Response
    1{
    2    "ip": "8.8.8.8",
    3    "location": {
    4        "continent_code": "NA",
    5        "continent_name": "North America",
    6        "country_code2": "US",
    7        "country_code3": "USA",
    8        "country_name": "United States",
    9        "country_name_official": "United States of America",
    10        "country_capital": "Washington, D.C.",
    11        "state_prov": "California",
    12        "state_code": "US-CA",
    13        "district": "Santa Clara",
    14        "city": "Mountain View",
    15        "locality": "Mountain View",
    16        "accuracy_radius": "",
    17        "dma_code": "807",
    18        "zipcode": "94043-1351",
    19        "latitude": "37.42240",
    20        "longitude": "-122.08421",
    21        "is_eu": false,
    22        "country_flag": 
    23            "https://ipgeolocation.io/static/flags/us_64.png",
    24        "geoname_id": "6301403",
    25        "country_emoji": "🇺🇸"
    26    }
    27}

    Hostname Lookup for an IP Address

    IPGeolocation API also provide hostname lookup for an IP address on all the paid subscriptions, but doesn't respond it by default. To get the hostname for an IP address, you can pass one of the three values hostname, liveHostname, hostnameFallbackLive as a URL parameter include= .

    Here is an example to IP Geolocation lookup that includes hostname for the IP address:

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=8.8.8.8&fields=location&include=liveHostname'
    Response
    1{
    2    "ip": "8.8.8.8",
    3    "hostname": "dns.google",
    4    "location": {
    5        "continent_code": "NA",
    6        "continent_name": "North America",
    7        "country_code2": "US",
    8        "country_code3": "USA",
    9        "country_name": "United States",
    10        "country_name_official": "United States of America",
    11        "country_capital": "Washington, D.C.",
    12        "state_prov": "California",
    13        "state_code": "US-CA",
    14        "district": "Santa Clara",
    15        "city": "Mountain View",
    16        "locality": "Mountain View",
    17        "accuracy_radius": "5",
    18        "confidence": "High",
    19        "zipcode": "94043-1351",
    20        "latitude": "37.42240",
    21        "longitude": "-122.08421",
    22        "is_eu": false,
    23        "country_flag": 
    24            "https://ipgeolocation.io/static/flags/us_64.png",
    25        "geoname_id": "6301403",
    26        "country_emoji": "🇺🇸"
    27    }
    28}

    include=hostname URL Parameter

    This URL parameter enables the IPGeolocation API to lookup hostname from our IP-Hostname database and returns the same IP address if there is no hostname found for the queried IP address. Lookup thru IP-Hostname database is faster than other options but is experimental and under process and can produce unwanted output.

    include=liveHostname URL Parameter

    This URL parameter enables the IPGeolocation API to lookup hostname from live sources. Lookup thru live sources is accurate but can introduce more latency to your query to IPGeolocation API

    include=hostnameFallbackLive URL Parameter

    This URL parameter enables the IPGeolocation API to lookup hostname from our IP-Hostname database and if there is no hostname found for the queried IP address, then lookup thru the live sources. This option has been introduced for faster and accurate lookup.

    Time Zone Information for an IP Address

    IP Geolocation API can also provide time zone information for an IP address on paid API plans (STANDARD and ADVANCED). However, this data is not included in the response by default. To get the time zone information along with the geolocation information, you must need to pass the include=time_zone as a query parameter in the URL.

    Here is an example of an IP Geolocation lookup that includes time zone data, along with the country information associated with the IP address:

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=8.8.8.8&fields=location.country_name,location.country_capital&include=time_zone'
    Response
    1{
    2    "ip": "8.8.8.8",
    3    "location": {
    4        "country_capital": "Washington, D.C.",
    5        "country_name": "United States"
    6    },
    7    "time_zone": {
    8        "name": "America/Los_Angeles",
    9        "offset": -8,
    10        "offset_with_dst": -7,
    11        "current_time": "2025-04-24 08:01:25.083-0700",
    12        "current_time_unix": 1745506885.083,
    13        "is_dst": true,
    14        "dst_savings": 1,
    15        "dst_exists": true,
    16        "dst_start": {
    17            "utc_time": "2025-03-09 TIME 10",
    18            "duration": "+1H",
    19            "gap": true,
    20            "date_time_after": "2025-03-09 TIME 03",
    21            "date_time_before": "2025-03-09 TIME 02",
    22            "overlap": false
    23        },
    24        "dst_end": {
    25            "utc_time": "2025-11-02 TIME 09",
    26            "duration": "-1H",
    27            "gap": false,
    28            "date_time_after": "2025-11-02 TIME 01",
    29            "date_time_before": "2025-11-02 TIME 02",
    30            "overlap": true
    31        }
    32    }
    33}

    User-Agent Information for a Device

    IP Geolocation API also provides User-Agent information of the client on all the paid subscriptions, but doesn't respond it by default. To get User-Agent information along with the geolocation information, you must pass the include=user_agent as a query parameter in the URL.

    Here is an example to IP Geolocation lookup that includes User-Agent information for a device from which the query originated:

    cUrl
    curl -X GET 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=8.8.8.8&fields=location&include=user_agent'
    Response
    1{
    2    "ip": "8.8.8.8",
    3    "location": {
    4        "city": "Mountain View",
    5        "country_code2": "US"
    6    },
    7    "user_agent": {
    8        "user_agent_string": "PostmanRuntime/7.43.3",
    9        "name": "PostmanRuntime",
    10        "type": "Robot",
    11        "version": "7.43.3",
    12        "version_major": "7",
    13        "device": {
    14            "name": "Postman Runtime",
    15            "type": "Robot",
    16            "brand": "Postman",
    17            "cpu": "Unknown"
    18        },
    19        "engine": {
    20            "name": "PostmanRuntime",
    21            "type": "Robot",
    22            "version": "7.43.3",
    23            "version_major": "7"
    24        },
    25        "operating_system": {
    26            "name": "Cloud",
    27            "type": "Cloud",
    28            "version": "??",
    29            "version_major": "??",
    30            "build": "??"
    31        }
    32    }
    33}
    Note

    To get hostname, DMA code, IP-Security information, Abuse contact Information, Time Zone Information and user-agent information together for an IP address and the device, you can pass include=hostname, dma, security, abuse, time_zone,user_agent as a query parameter in the URL.

    What's New in /v2/ipgeo and /v2/ipgeo-bulk

    Below are the key updates introduced in the /v2/ipgeo and /v2/ipgeo-bulk API endpoints compared to the previous /ipgeo and /ipgeo-bulk version:

    • New fields have been introduced:
      • location.locality and location.accuracy_radius provide finer-grained location context.
      • location.dma_code has been added to support U.S. media market targeting (Designated Market Area).
      • The following fields under network.asn offer deeper insights into IP ownership and origin:asn_name, country, type, domain, date_allocated,allocation_status, num_of_ipv4_routes, num_of_ipv6_routes, and rir.
      • Additional network company details are now available via network.company.type  and network.company.domain  of the concerned network.company.name.
      • security.proxy_provider and security.cloud_provider offer more transparency into potential security layers.
      • A new abuse object includes detailed abuse contact information for the IP, including:route, country, handle, name, organization, role, kind, address, a list of emails, and phone_numbers.
    • Response structure has been improved for clarity and consistency:
      • Location-related fields are now grouped under the location object.
      • Country-level metadata such as calling_code, tld, and languages are now available under a dedicated country_metadata object.
      • languages is now returned as a list of strings instead of a single comma-separated string.
      • Network-related fields have been consolidated under the network object:
        • isp → network.company.name
        • organization → network.asn.organization
        • asn → network.asn.as_number
        • connection_type → network.connection_type
    • Field naming has been standardized for clarity or from camelCase to snake_case:
      • user_agent.userAgentString → user_agent.user_agent_string
      • user_agent.versionMajor → user_agent.version_major
      • user_agent.engine.versionMajor → user_agent.engine.version_major
      • user_agent.operatingSystem.versionMajor → user_agent.operating_system.version_major
      • time_zone.dst_start.dateTimeAfter → time_zone.dst_start.date_time_after
      • time_zone.dst_start.dateTimeBefore → time_zone.dst_start.date_time_before
      • time_zone.dst_end.dateTimeAfter → time_zone.dst_end.date_time_after
      • time_zone.dst_end.dateTimeBefore → time_zone.dst_end.date_time_before
      • country_tld → country_metadata.tld
    • Deprecated fields:
      • Fields that no longer return meaningful values — user_agent.build and user_agent.engine.build — have been removed.

    Reference to IPGeolocation API Response

    Below, we provide separate tables for each JSON object in the response, listing all possible fields available across all plans. The fifth column indicates the minimum plan required to access each field.

    Please note that field availability is cumulative: all fields available in the Free plan are also included in Standard and Advanced , and all Standard fields are also available in the Advanced plan.

    • Standalone fields reference

    FieldTypeDescriptionCan be empty?Availability
    ipstring

    IP address that is used to lookup geolocation information.

    NoFREE
    domainstring

    Domain name that is used to lookup geolocation information. It is not returned if an IP address is used to query IP Geolocation API.

    YesSTANDARD
    hostnamestring

    Hostname of the IP address used to query IP Geolocation API.

    NoSTANDARD

    • location json object reference

    FieldTypeDescriptionCan be empty?Availability
    continent_codestring

    2-letter code of the continent.

    NoFREE
    continent_namestring

    Name of the continent.

    NoFREE
    country_code2string

    Country code (ISO 3166-1 alpha-2) of the country.

    NoFREE
    country_code3string

    Country code (ISO 3166-1 alpha-3) of the country.

    NoFREE
    country_namestring

    Name of the country.

    NoFREE
    country_name_officialstring

    Official name (ISO 3166) of the country.

    NoFREE
    country_capitalstring

    Name of the country’s capital.

    NoFREE
    state_provstring

    Name of the state/province/region.

    YesFREE
    state_codestring

    Code of the state/province/region.

    YesFREE
    districtstring

    Name of the district or county.

    YesFREE
    citystring

    Name of the city.

    YesFREE
    localitystring

    A more specific area in city or it can be same as city.

    YesADVANCED
    accuracy_radiusstring

    Circular radius in Km, where the IP address location can be found.

    YesADVANCED
    dma_codestring

    Representing Designated Market Area (DMA) code specifically used in the United States for media marketing.

    YesADVANCED
    zipcodestring

    ZIP/Postal code of the place.

    YesFREE
    latitudestring

    Latitude of the place.

    NoFREE
    longitudestring

    Longitude of the place.

    NoFREE
    is_euboolean

    Is the country belong to European Union?

    NoFREE
    country_flagstring

    URL to get the country flag.

    NoFREE
    geoname_idstring

    Geoname ID of the place from geonames.org

    YesFREE
    country_emojistring

    Emoji of the Country flag.

    YesFREE

    • country_metadata json object reference

    FieldTypeDescriptionCan be empty?Availability
    calling_codestring

    Calling code/Dialing code of the country.

    NoFREE
    tldstring

    Top Level Domain Name (TLD) of the country, which is also called ccTLD.

    NoFREE
    languageslist of strings

    List of the languages’ codes, spoken in the country.

    NoFREE

    • currency json object reference

    FieldTypeDescriptionCan be empty?Availability
    codestring

    Currency code (ISO 4217).

    NoFREE
    namestring

    Currency name (ISO 4217).

    NoFREE
    symbolstring

    Currency symbol.

    NoFREE

    • network json object reference

    FieldTypeDescriptionCan be empty?Availability
    asn.as_numberstring

    Autonomous system number of the autonomous system, to which IP address belongs to.

    YesSTANDARD
    asn.organizationstring

    Legal Full Name of AS organization holding the IP address.

    YesSTANDARD
    asn.countrystring

    Name of the country, ASN is residing.

    YesSTANDARD
    asn.asn_namestring

    Name associated with the Autonomous System, usually representing organization.

    YesADVANCED
    asn.typestring

    Type of the ASN, whether ISP, Business, etc.

    YesADVANCED
    asn.domainstring

    Domain name associated with the ASN holding the IP address.

    YesADVANCED
    asn.date_allocatedstring

    Last date, when the IP address assigned to the ASN. e.g., in format 1st June 2001

    YesADVANCED
    asn.allocation_statusstring

    Whether the IP address is currently assigned to the ASN or not.

    YesADVANCED
    asn.num_of_ipv4_routesstring

    Total number of IPv4 routes, held by the ASN. These Routes can be queried from our ASN API.

    YesADVANCED
    asn.num_of_ipv6_routesstring

    Total number of IPv6 routes, held by the ASN. These Routes can be queried from our ASN API.

    YesADVANCED
    asn.rirstring

    Name of the Regional Internet Registry (RIR) that allocated the AS number.

    YesADVANCED
    company.namestring

    Name of the company/ISP holding the IP address.

    NoSTANDARD
    company.typestring

    Type of the company whether it is an ISP, hosting provider or business, etc.

    YesADVANCED
    company.domainstring

    Official domain name used by the company.

    YesADVANCED
    connection_typestring

    Type of the connection, consuming the IP address.

    YesADVANCED

    • time_zone json object reference

    FieldTypeDescriptionCan be empty?Availability
    namestring

    Name (ISO 8601) of the time zone.

    NoSTANDARD
    offsetnumber

    Time zone offset from UTC.

    NoSTANDARD
    offset_with_dstnumber

    Time zone with DST offset from UTC.

    NoSTANDARD
    current_timestring

    Current time in yyyy-MM-dd HH:mm:ss.SSS±ZZZ format.

    NoSTANDARD
    current_time_unixfloat

    Current time in seconds since 1970.

    NoSTANDARD
    is_dstboolean

    Is the time zone in daylight savings?

    NoSTANDARD
    dst_savingsnumber

    Total daylight savings.

    NoSTANDARD
    dst_existsboolean

    Indicates whether Daylight Saving Time (DST) is observed in the region. If true, the dst_start and dst_end objects will include detailed DST transition information.

    NoSTANDARD
    dst_start.utc_timestring

    The date and time in UTC when DST begins.

    NoSTANDARD
    dst_start.durationstring

    The time change that occurs when DST starts.

    NoSTANDARD
    dst_start.gapboolean

    Is there a gap when the clocks jump forward or not.

    NoSTANDARD
    dst_start.date_time_afterstring

    The local date and time that immediately follows the start of DST.

    NoSTANDARD
    dst_start.date_time_beforestring

    The local date and time immediately before DST begins.

    NoSTANDARD
    dst_start.overlapboolean

    Whether there is an overlap of time due to clocks being set back when DST starts.

    NoSTANDARD
    dst_end.utc_timestring

    The date and time in UTC when DST ends.

    NoSTANDARD
    dst_end.durationstring

    The time change that occurs when DST ends.

    NoSTANDARD
    dst_end.gapboolean

    Is there a gap when the clocks jump backward or not.

    NoSTANDARD
    dst_end.date_time_afterstring

    The local date and time that immediately follows the ends of DST.

    NoSTANDARD
    dst_end.date_time_beforestring

    The local date and time immediately before DST ends.

    NoSTANDARD
    dst_end.overlapboolean

    Whether there is an overlap of time due to clocks being set back when DST ends.

    NoSTANDARD

    • user_agent json object reference

    FieldTypeDescriptionCan be empty?Availability
    user_agent_stringstring

    User-Agent string passed along with the query in the User-Agent header.

    NoSTANDARD
    namestring

    User-Agent Name.

    NoSTANDARD
    typestring

    User-Agent Class.

    NoSTANDARD
    versionstring

    User-Agent Version.

    NoSTANDARD
    version_majorstring

    User-Agent Version Major.

    NoSTANDARD
    device.namestring

    Device Name.

    NoSTANDARD
    device.typestring

    Device Type.

    NoSTANDARD
    device.brandstring

    Device Brand.

    NoSTANDARD
    device.cpustring

    Device CPU Model.

    NoSTANDARD
    engine.namestring

    Layout Engine Name.

    NoSTANDARD
    engine.typestring

    Layout Engine Class.

    NoSTANDARD
    engine.versionstring

    Layout Engine Version.

    NoSTANDARD
    engine.version_majorstring

    Layout Engine Version Major.

    NoSTANDARD
    operating_system.namestring

    Operating System Name.

    NoSTANDARD
    operating_system.typestring

    Operating System Class.

    NoSTANDARD
    operating_system.versionstring

    Operating System Version.

    NoSTANDARD
    operating_system.version_majorstring

    Operating System Version Major.

    NoSTANDARD
    operating_system.buildstring

    Operating System Build.

    NoSTANDARD

    For all possible values of the User Agent type fields, please check here

    • security json object reference

    FieldTypeDescriptionCan be empty?Availability
    threat_scorenumber

    IP address’ threat score. It ranges from 0 to 100. 100 indicates highest threat and vice versa for lower score.

    NoADVANCED
    is_torboolean

    Indicates if the IP address is being consumed on a Tor endpoint.

    NoADVANCED
    is_proxyboolean

    Indicates if the IP address belongs to a proxy network.

    NoADVANCED
    proxy_typestring

    Type of the proxy network if the IP address belongs to a proxy network.

    YesADVANCED
    proxy_providerstring

    Name of the proxy provider, if the IP address belongs to a proxy network.

    YesADVANCED
    is_anonymousboolean

    Indicates if the IP address is being used anonymously.

    NoADVANCED
    is_known_attackerboolean

    Indicates if the IP address is enlisted as an attacking IP address.

    NoADVANCED
    is_spamboolean

    Indicates if the IP address is enlisted as a spam IP address.

    NoADVANCED
    is_botboolean

    Indicates if the IP address is enlisted as a bot IP address.

    NoADVANCED
    is_cloud_providerboolean

    Indicates if the IP address belongs to a cloud provider (computing infrastructure providers).

    NoADVANCED
    cloud_providerstring

    Name of the Cloud Provider, if the IP address belongs to a cloud provider.

    YesADVANCED

    • abuse json object reference

    FieldTypeDescriptionCan be empty?Availability
    routestring

    Network route associated with the IP address.

    YesADVANCED
    countrystring

    Country where the responsible entity is located.

    YesADVANCED
    handlestring

    Abuse handle or ID found in WHOIS or RDAP records.

    YesADVANCED
    namestring

    Name of the abuse contact person or entity.

    YesADVANCED
    organizationstring

    Organization responsible for the IP address.

    YesADVANCED
    rolestring

    Role of the contact (e.g., abuse, administrative, registrant, etc.).

    YesADVANCED
    kindstring

    Type of contact: individual, team, or organization.

    YesADVANCED
    addressstring

    Physical mailing address of the responsible entity.

    YesADVANCED
    emailslist of strings

    Email address(es) of the abuse contact.

    YesADVANCED
    phone_numberslist of strings

    Phone number(s) in international format for the abuse contact.

    YesADVANCED

    Error Codes

    IP Geolocation API returns HTTP status code 200 for a successful API request along with the response.

    While, in case of a bad or invalid request, IP Geolocation API returns 4xx HTTP status code along with a descriptive message explaining the reason for the error.

    Below is a detailed explanation of the specific HTTP status codes and their corresponding error conditions:

    HTTP StatusDescription
    400
    Bad Request

    It is returned for one of the following reasons:

    • If the provided IPv4, IPv6 address, or domain name is invalid.

    • If special character(s) ( ) [ ] { } | ^ ` is passed in the API URL either as parameter or its value. Specially in case of API key.

    • If the IP addresses JSON list is empty, or the provided JSON does not have 'ips' field while querying  /ipgeo-bulk  endpoint.

    • If more than 50,000 IP addresses are provided while quering from  /ipgeo-bulk  endpoint.

    401
    Unauthorized

    It is returned for one of the following reasons:

    • If API key (as  apiKey  URL parameter) is missing from the request to IP Geolocation API.

    • If an invalid (a random value) API key is provided.

    • If the API request is made from an unverified ipgeolocation.io account.

    • If your account has been disabled or locked to use by the admin due to abuse or illegal activity.

    • When the request to IP Geolocation API is made using API key for a database subscription

    • When the request to IP Geolocation API is made on the 'paused' subscription.

    • If you’re making API requests after your subscription trial has been expired.

    • If your active until date has passed and you need to upgrade your account.

    • If IP-hostname lookup, IP-security lookup or user-agent parsing endpoint is called using free subsciption API key.

    • If bulk IP to geolocation look-ups endpoint is called using free subscription API key.

    403
    Forbidden
    • If IP to geolocation look-up for a domain name is done using a free subscription API key.

    404
    Not Found

    It is returned for one of the following reasons:

    • If the IPv4, IPv6, or domain name does not not exists in our database.

    • If the IPv4, IPv6, or domain name is passed as a path variable, instead of url parameter as  ip= .

    • If the wrong endpoint is called, that does not exists in our API.

    405
    Method Not Allowed
    • If wrong HTTP request method is used for calling the endpoints. Only GET and POST methods are allowed. POST method for  /ipgeo-bulk  endpoint and GET method for  /ipgeo  endpoint requests.

    413
    Content Too Large
    • If the passed data in the POST requests is more than the limit of the API.

    415
    Unsupported Media Type
    • If the payload for IPs in  /ipgeo-bulk  endpoint is mising, or the content type is not mentioned as JSON.

    423
    Locked
    • If the passed IP address is from a bogon ip ranges,  or is part of a private network.

    429
    Too Many Requests

    It is returned for one of the following reasons:

    • If the API usage limit has reached for the free subscriptions, or paid subscriptions with the status 'past due', 'deleted' or 'trial expired'.

    • If the surcharge API usage limit has reached against the subscribed plan.

    499
    Client Closed Request
    • If the client has set the very short request or connection timeout, leading to the server closing the request prematurely.

    5XX
    Server Side Error
    • If a  500 (Internal Server Error),  502 (Bad Gateway),  503 (Service Unavailable),  504 (Gateway Timeout), or  505 (HTTP Version Not Supported) status code is returned, it indicates an issue on our end. Please contact us with your request at support@ipgeolocation.io for further assistance.

    API SDKs

    To facilitate the developers, we have added some SDKs for various programming languages. The detailed documentation on how to use these SDKs is available in the respective SDK's documentation page linked below.

    Our SDKs are also available on Github. Feel free to help us improve them. Following are the available SDKs:

    Frequently Asked Questions

    The IP Location API provides detailed geographical data based on IP addresses, including information like country, city, state, latitude, longitude, user’s time zone information, currency details, ISP, ASN, and organization name. You can also access threat intelligence, VPN/proxy status, and device data from the user-agent string.
    IPGeolocation offers SDKs for popular programming languages such as Java, Python, JavaScript, jQuery, TypeScript, C#, and PHP. These SDKs simplify the integration of the IP Location API into your projects. Additionally, detailed guides are available to assist with integrating the API and databases with Splunk.
    The IP Location API ensures data security with secure HTTPS connections for all API endpoints. Our infrastructure features globally distributed data and edge nodes, enhancing reliability and protection against DDoS attacks. Additionally, IPGeolocation complies with data protection regulations, including the General Data Protection Regulation (GDPR), to ensure user privacy and data security.
    IP Geolocation is typically over 99% accurate at the country level and around 85% or higher at the city level, with a 20–50 km accuracy radius depending on the region and ISP. ipgeolocation.io maintains high accuracy by updating its database daily and using reliable data sources to deliver precise geolocation, along with ISP, timezone, and currency details.
    An IP Geolocation API allows applications to retrieve detailed location data about an IP address through simple API requests. ipgeolocation.io’s API returns data such as country, city, ISP, timezone, currency, and even detects VPN, proxy, and TOR usage, making it easy to enhance applications with location intelligence.
    Yes, ipgeolocation.io offers a free IP Geolocation API plan that includes up to 1,000 requests per day. The free plan covers core features like country, city, ISP, timezone, and currency details, with options to upgrade for higher limits and advanced capabilities like VPN, Proxy, TOR detection, and more.
    Yes, the IP Location API supports batch IP address lookups, allowing you to query up to 50,000 IPs in a single request. However, this feature is available only on paid plans. The requests made in the batch will count towards your total API usage.
    Our IP Location API data updates every 24 hours. Our downloadable databases are available with weekly and monthly updates, providing you with the most up-to-date geolocation information.
    IP Geolocation identifies the physical location of a device by analyzing its IP address along with data from internet registries, ISPs, network routing, and user reports. It helps determine key details such as country, state/region, city, ZIP code, ISP, and more. ipgeolocation.io combines multiple reliable data sources and frequent updates to deliver accurate, real-time location insights for both IPv4 and IPv6 addresses.
    IP Geolocation helps personalize user experiences, display region-specific content, detect fraud, enforce compliance, and improve analytics. With ipgeolocation.io’s API, developers can easily integrate features like automatic timezone detection, localized content, and fraud prevention using security data such as is_bot, is_proxy, and more.
    You can get an API key by signing up for a free account at ipgeolocation.io. Once registered and logged into your dashboard, you’ll find your unique API key, which you can use to send requests to the API.