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.102" ,
    • stringhostname:"216.73.216.102" ,
    • 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:"" ,
      • 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:"15276" ,
        • stringnum_of_ipv6_routes:"5854" ,
        • stringrir:"ARIN" ,
      • stringconnection_type:"" ,
      • objectcompany:Object,
        • stringname:"Anthropic, PBC" ,
        • stringtype:"Business" ,
        • stringdomain:"anthropic.com" ,
    • 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-06-14 18:55:10.975-0400" ,
      • numbercurrent_time_unix:1749941710.975 ,
      • booleanis_dst:true ,
      • numberdst_savings:1 ,
      • booleandst_exists:true ,
      • 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  "dma_code": "807",
    16  "zipcode": "94043-1351",
    17  "latitude": "37.42240",
    18  "longitude": "-122.08421",
    19  "is_eu": false,
    20  "country_flag": "https://ipgeolocation.io/static/flags/us_64.png",
    21  "geoname_id": "6301403",
    22  "country_emoji": "🇺🇸"
    23}

    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 FlagCzech Italian FlagItalian Korean FlagKorean Persian FlagPersian Portuguese FlagPortuguese

    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

    IP Geolocation API Documentation

    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:  apiKey parameter can also be omitted from your API request when this endpoint is called from client side using Request Origin.

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

    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 '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 '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 -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 adderss '1.1.1.1' in Chinese language:

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

    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 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=1.1.1.1&fields=location'

    Response

    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": "",
    17        "zipcode": "4101",
    18        "latitude": "-27.47306",
    19        "longitude": "153.01421",
    20        "is_eu": false,
    21        "country_flag": "https://ipgeolocation.io/static/flags/au_64.png",
    22        "geoname_id": "10113228",
    23        "country_emoji": "🇦🇺"
    24    }
    25}

    Get Country Name and Organization Only

    curl 'https://api.ipgeolocation.io/v2/ipgeo?apiKey=API_KEY&ip=1.1.1.1&fields=location.country_name,network.asn.organization'

    Response

    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 -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 '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": "",
    16        "zipcode": "94043-1351",
    17        "latitude": "37.42240",
    18        "longitude": "-122.08421",
    19        "is_eu": false,
    20        "country_flag": "https://ipgeolocation.io/static/flags/us_64.png",
    21        "geoname_id": "6301403",
    22        "country_emoji": "🇺🇸"
    23    },
    24    "country_metadata": {
    25        "calling_code": "+1",
    26        "tld": ".us",
    27        "languages": [
    28            "en-US",
    29            "es-US",
    30            "haw",
    31            "fr"
    32        ]
    33    }
    34}

    • 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 '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": "",
    15        "zipcode": "94043-1351",
    16        "latitude": "37.42240",
    17        "longitude": "-122.08421",
    18        "is_eu": false,
    19        "country_flag": "https://ipgeolocation.io/static/flags/us_64.png",
    20        "geoname_id": "6301403",
    21        "country_emoji": "🇺🇸"
    22    }
    23}
    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 '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 theinclude=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 '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 '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": "https://ipgeolocation.io/static/flags/us_64.png",
    23        "geoname_id": "6301403",
    24        "country_emoji": "🇺🇸"
    25    }
    26}

    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 '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": "",
    18        "zipcode": "94043-1351",
    19        "latitude": "37.42240",
    20        "longitude": "-122.08421",
    21        "is_eu": false,
    22        "country_flag": "https://ipgeolocation.io/static/flags/us_64.png",
    23        "geoname_id": "6301403",
    24        "country_emoji": "🇺🇸"
    25    }
    26}

    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 '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 '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
    ipstringIP address that is used to lookup geolocation information.NoFREE
    domainstringDomain name that is used to lookup geolocation information. It is not returned if an IP address is used to query IP Geolocation API.YesSTANDARD
    hostnamestringHostname of the IP address used to query IP Geolocation API.NoSTANDARD

    • location json object reference

    FieldTypeDescriptionCan be empty?Availability
    continent_codestring2-letter code of the continent.NoFREE
    continent_namestringName of the continent.NoFREE
    country_code2stringCountry code (ISO 3166-1 alpha-2) of the country.NoFREE
    country_code3stringCountry code (ISO 3166-1 alpha-3) of the country.NoFREE
    country_namestringName of the country.NoFREE
    country_name_officialstringOfficial name (ISO 3166) of the country.NoFREE
    country_capitalstringName of the country’s capital.NoFREE
    state_provstringName of the state/province/region.YesFREE
    state_codestringCode of the state/province/region.YesFREE
    districtstringName of the district or county.YesFREE
    citystringName of the city.YesFREE
    localitystringA more specific area in city or it can be same as city.YesADVANCED
    accuracy_radiusstringCircular radius in Km, where the IP address location can be found.YesADVANCED
    dma_codestringRepresenting Designated Market Area (DMA) code specifically used in the United States for media marketing.YesADVANCED
    zipcodestringZIP/Postal code of the place.YesFREE
    latitudestringLatitude of the place.NoFREE
    longitudestringLongitude of the place.NoFREE
    is_eubooleanIs the country belong to European Union?NoFREE
    country_flagstringURL to get the country flag.NoFREE
    geoname_idstringGeoname ID of the place from geonames.orgYesFREE
    country_emojistringEmoji of the Country flag.YesFREE

    • country_metadata json object reference

    FieldTypeDescriptionCan be empty?Availability
    calling_codestringCalling code/Dialing code of the country.NoFREE
    tldstringTop Level Domain Name (TLD) of the country, which is also called ccTLD.NoFREE
    languageslist of stringsList of the languages’ codes, spoken in the country.NoFREE

    • currency json object reference

    FieldTypeDescriptionCan be empty?Availability
    codestringCurrency code (ISO 4217).NoFREE
    namestringCurrency name (ISO 4217).NoFREE
    symbolstringCurrency symbol.NoFREE

    • network json object reference

    FieldTypeDescriptionCan be empty?Availability
    asn.as_numberstringAutonomous system number of the autonomous system, to which IP address belongs to.YesSTANDARD
    asn.organizationstringLegal Full Name of AS organization holding the IP address.YesSTANDARD
    asn.countrystringName of the country, ASN is residing.YesSTANDARD
    asn.asn_namestringName associated with the Autonomous System, usually representing organization.YesADVANCED
    asn.typestringType of the ASN, whether ISP, Business, etc.YesADVANCED
    asn.domainstringDomain name associated with the ASN holding the IP address.YesADVANCED
    asn.date_allocatedstringLast date, when the IP address assigned to the ASN. e.g., in format '1st June 2001'YesADVANCED
    asn.allocation_statusstringWhether the IP address is currently assigned to the ASN or not.YesADVANCED
    asn.num_of_ipv4_routesstringTotal number of IPv4 routes, held by the ASN. These Routes can be queried from our ASN API.YesADVANCED
    asn.num_of_ipv6_routesstringTotal number of IPv6 routes, held by the ASN. These Routes can be queried from our ASN API.YesADVANCED
    asn.rirstringName of the Regional Internet Registry(RIR) that allocated the AS number.YesADVANCED
    company.namestringName of the company/ISP holding the IP address.NoSTANDARD
    company.typestringType of the company whether is an ISP, hosting provider or business, etc.YesADVANCED
    company.domainstringOfficial domain name used by the company.YesADVANCED
    connection_typestringType of the connection, consuming the IP address.YesADVANCED

    • time_zone json object reference

    FieldTypeDescriptionCan be empty?Availability
    namestringName (ISO 8601) of the time zone.NoSTANDARD
    offsetnumberTime zone offset from UTC.NoSTANDARD
    offset_with_dstnumberTime zone with DST offset from UTC.NoSTANDARD
    current_timestringCurrent time in ‘yyyy-MM-dd HH:mm:ss.SSS±ZZZ’ format.NoSTANDARD
    current_time_unixfloatCurrent time in seconds since 1970.NoSTANDARD
    is_dstbooleanIs the time zone in daylight savings?NoSTANDARD
    dst_savingsnumberTotal daylight savings.NoSTANDARD
    dst_existsbooleanIndicates 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_timestringThe date and time in UTC when DST begins.NoSTANDARD
    dst_start.durationstringThe time change that occurs when DST starts.NoSTANDARD
    dst_start.gapbooleanIs there a gap when the clocks jump forward or not.NoSTANDARD
    dst_start.date_time_afterstringThe local date and time that immediately follows the start of DST.NoSTANDARD
    dst_start.date_time_beforestringThe local date and time immediately before DST begins.NoSTANDARD
    dst_start.overlapbooleanWhether there is an overlap of time due to clocks being set back when DST starts.NoSTANDARD
    dst_end.utc_timestringThe date and time in UTC when DST ends.NoSTANDARD
    dst_end.durationstringThe time change that occurs when DST ends.NoSTANDARD
    dst_end.gapbooleanIs there a gap when the clocks jump backward or not.NoSTANDARD
    dst_end.date_time_afterstringThe local date and time that immediately follows the ends of DST.NoSTANDARD
    dst_end.date_time_beforestringThe local date and time immediately before DST ends.NoSTANDARD
    dst_end.overlapbooleanWhether 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_stringstringUser-Agent string passed along with the query in the 'User-Agent' header.NoSTANDARD
    namestringUser-Agent Name.NoSTANDARD
    typestringUser-Agent Class.NoSTANDARD
    versionstringUser-Agent Version.NoSTANDARD
    version_majorstringUser-Agent Version Major.NoSTANDARD
    device.namestringDevice Name.NoSTANDARD
    device.typestringDevice Type.NoSTANDARD
    device.brandstringDevice Brand.NoSTANDARD
    device.cpustringDevice CPU Model.NoSTANDARD
    engine.namestringLayout Engine NameNoSTANDARD
    engine.typestringLayout Engine ClassNoSTANDARD
    engine.versionstringLayout Engine Version.NoSTANDARD
    engine.version_majorstringLayout Engine Version Major.NoSTANDARD
    operating_system.namestringOperating System Name.NoSTANDARD
    operating_system.typestringOperating System Class.NoSTANDARD
    operating_system.versionstringOperating System Version.NoSTANDARD
    operating_system.version_majorstringOperating System Version Major.NoSTANDARD
    operating_system.buildstringOperating System Version Major.NoSTANDARD

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

    • security json object reference

    FieldTypeDescriptionCan be empty?Availability
    threat_scorenumberIP address’ threat score. It ranges from 0 to 100. 100 indicates highest threat and vice versa for lower score.NoADVANCED
    is_torbooleanIndicates if the IP address is being consumed on a Tor endpoint.NoADVANCED
    is_proxybooleanIndicates if the IP address belongs to a proxy network.NoADVANCED
    proxy_typestringType of the proxy network if the IP address belongs to a proxy network.YesADVANCED
    proxy_providerstringName of the proxy provider, if the IP address belongs to a proxy network.YesADVANCED
    is_anonymousbooleanIndicates if the IP address is being used anonymously.NoADVANCED
    is_known_attackerbooleanIndicates if the IP address is enlisted as an attacking IP address.NoADVANCED
    is_spambooleanIndicates if the IP address is enlisted as a spam IP address.NoADVANCED
    is_botbooleanIndicates if the IP address is enlisted as a bot IP address.NoADVANCED
    is_cloud_providerbooleanIndicates if the IP address belongs to a cloud provider (computing infrastructure providers).NoADVANCED
    cloud_providerbooleanName of the Cloud Provider, if the IP address belongs to a cloud provider.YesADVANCED

    • abuse json object reference

    FieldTypeDescriptionCan be empty?Availability
    routestringNetwork route associated with the IP address.YesADVANCED
    countrystringCountry where the responsible entity is located.YesADVANCED
    handlestringAbuse handle or ID found in WHOIS or RDAP records.YesADVANCED
    namestringName of the abuse contact person or entity..YesADVANCED
    organizationstringOrganization responsible for the IP address.YesADVANCED
    rolestringRole of the contact (e.g., abuse, administrative, registrant, etc.).YesADVANCED
    kindstringType of contact: individual, team, or organization.YesADVANCED
    addressstringPhysical mailing address of the responsible entity..YesADVANCED
    emailslist of stringsEmail address(es) of the abuse contact.YesADVANCED
    phone_numberslist of stringsPhone 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 paramter 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:

    IP Geolocation FAQs

    What information can I obtain using the IP Location API?
    Does the IP Location API support batch IP address lookups?
    Are there SDKs available for the IP Location API?
    How frequently is the geolocation data updated?
    What security measures are in place for the IP Location API?
    What is IP Geolocation and how does it work?
    How accurate is IP Geolocation data?
    What can I use IP Geolocation for, in my application or website?
    What is an IP Geolocation API?
    How do I get an IP Geolocation API key?
    Is there a free IP Geolocation API available?