DEV Community

Cover image for Best IP Geolocation APIs in 2023 for developers & marketers
deep
deep

Posted on • Updated on

Best IP Geolocation APIs in 2023 for developers & marketers

The concept of geolocating devices with their IP address is as old as the Internet. But, today, with 4.66 billion active internet users and more than 20 billion IoT devices, the landscape of the internet has drastically changed. Similarly, the IP geolocation technology has also evolved the way they resolve the location of an IP address and deliver the data.

Traditionally, IP geolocation services were being delivered in the form of databases that one can purchase and use. This would mean building your own lookup services and ensuring that the database is up-to-date with the latest version. Not to mention maintaining the server's uptime. As a result, IP geolocation wasn't just everyone's cup of tea. A substantial effort was required and even today, some companies still prefer to use this method. But this is changing and more and more Ip geolocation API services are available in the market that can drastically reduce your build time and deliver at a submillisecond speed.

In this post, I will share some of the popular IP geolocation API providers in the market. The list is generated using various third-party articles, google searches, and ranking tools.

Note: Only API services with public pricing page is considered and listed based on their alphabetical order. This post is not a comparison list but instead can be used as a reference to discover various IP geolocation services available for developers. I would highly encourage you to create a free account and test yourself before implementing them. Some of the services have been left out because either their website wasn't working or the service had been discontinued.

Choosing the right IP geolocation API service for your project?

You need to understand how well the API fits into your web development requirements. Some of the most important criteria are:

  1. Accuracy
  2. Speed
  3. Coverage
  4. Datapoints
  5. Scalability
  6. Pricing

List of IP geolocation API services ordered alphabetically?

Abstractapi

Abstractapi provides a suite of APIs for web development like image processing, IBAN validation, and so on. IP geolocation is one of its API offerings.

Screen Shot 2021-05-11 at 1.36.49 pm

Pricing

Free

  • 20,000 requests (1 request/second)
  • Not allowed for commercial

Starting Price

  • $9 USD per month
  • 200,000 request/month (50 requests/second)

Data Objects

  • Standard Location
    • zipcode
    • city
    • country
    • continent
    • Point geocoordinates
  • Country related
    • flag
    • currency
  • Time Zone
  • Network
    • ISP name
    • ASN
  • Security
    • VPN detect
{
  "ip_address": "72.229.28.185",
  "city": "New York",
  "city_geoname_id": 5128581,
  "region": "New York",
  "region_iso_code": "NY",
  "region_geoname_id": 5128638,
  "postal_code": "10116",
  "country": "United States",
  "country_code": "US",
  "country_geoname_id": 6252001,
  "country_is_eu": false,
  "continent": "North America",
  "continent_code": "NA",
  "continent_geoname_id": 6255149,
  "longitude": -73.9726,
  "latitude": 40.7768,
  "security": {
    "is_vpn": false
  },
  "timezone": {
    "name": "America/New_York",
    "abbreviation": "EDT",
    "gmt_offset": -4,
    "current_time": "00:15:25",
    "is_dst": true
  },
  "flag": {
    "emoji": "🇺🇸",
    "unicode": "U+1F1FA U+1F1F8",
    "png": "https://static.abstractapi.com/country-flags/US_flag.png",
    "svg": "https://static.abstractapi.com/country-flags/US_flag.svg"
  },
  "currency": {
    "currency_name": "USD",
    "currency_code": "USD"
  },
  "connection": {
    "autonomous_system_number": 12271,
    "autonomous_system_organization": "TWC-12271-NYC",
    "connection_type": "Corporate",
    "isp_name": "Charter Communications",
    "organization_name": "Spectrum"
  }
}
Enter fullscreen mode Exit fullscreen mode

Link: https://www.abstractapi.com/

BigDataCloud

BigDataCloud is an Australian-based next-generation IP geolocation API provider, started in the year 2018.

BigDataCloud's IP Geolocation API Package

Pricing

Free Plan

  • 10K queries per month.

Starting Plan

  • $29.95 per month, 100K queries per month.
  • Pay As You Go option ($2.995 per additional 10K monthly request)

Data Objects

  • Standard Location
    • zipcode
    • city
    • state
    • country
    • continent
    • Point geocoordinates
  • Adminstrative Level Locality Details
  • Country related
    • flag
    • currency
    • phone
    • language
    • income
    • wikidataID, geonameID
  • Time Zone
  • Network
    • ISP name
    • ASN
    • Organisation name
    • Carrier Name and Network
  • Confidence Area
  • Security
    • TOR
    • VPN
    • Proxy
    • SpamhausDrop, SpamhausEdrop, SpamhausAsnDrop
    • BlacklistedUceprotect, BlacklistedBlocklistDe
    • KnownAsMailServer
    • KnownAsPublicRouter
    • Bogon and Unreachable
    • Hosting and Hosting ASN
    • Cellular
    • Threat level
{
    "ip": "72.229.28.185",
    "localityLanguageRequested": "en",
    "isReachableGlobally": true,
    "country": {
        "isoAlpha2": "US",
        "isoAlpha3": "USA",
        "m49Code": 840,
        "name": "United States of America",
        "isoName": "United States of America (the)",
        "isoNameFull": "the United States of America",
        "isoAdminLanguages": [
            {
                "isoAlpha3": "eng",
                "isoAlpha2": "en",
                "isoName": "English",
                "nativeName": "English"
            }
        ],
        "unRegion": "Americas/Northern America",
        "currency": {
            "numericCode": 840,
            "code": "USD",
            "name": "US Dollar",
            "minorUnits": 2
        },
        "wbRegion": {
            "id": "NAC",
            "iso2Code": "XU",
            "value": "North America"
        },
        "wbIncomeLevel": {
            "id": "HIC",
            "iso2Code": "XD",
            "value": "High income"
        },
        "callingCode": "1",
        "countryFlagEmoji": "🇺🇸",
        "wikidataId": "Q30",
        "geonameId": 6252001,
        "continents": [
            {
                "continent": "North America",
                "continentCode": "NA"
            },
            {
                "continent": "Oceania",
                "continentCode": "OC"
            },
            {
                "continent": "Asia",
                "continentCode": "AS"
            }
        ]
    },
    "location": {
        "continent": "North America",
        "continentCode": "NA",
        "isoPrincipalSubdivision": "New York",
        "isoPrincipalSubdivisionCode": "US-NY",
        "city": "New York City",
        "localityName": "Alphabet City",
        "postcode": "10009",
        "latitude": 40.73,
        "longitude": -73.98,
        "plusCode": "87G8P2H9+XX",
        "timeZone": {
            "ianaTimeId": "America/New_York",
            "displayName": "(UTC-05:00) Eastern Standard Time",
            "effectiveTimeZoneFull": "Eastern Daylight Time",
            "effectiveTimeZoneShort": "EDT",
            "utcOffsetSeconds": -14400,
            "utcOffset": "-04",
            "isDaylightSavingTime": true,
            "localTime": "2021-05-12T02:01:47.7236865"
        },
        "localityInfo": {
            "administrative": [
                {
                    "order": 3,
                    "adminLevel": 2,
                    "name": "United States of America",
                    "description": "country in North America",
                    "isoName": "United States of America (the)",
                    "isoCode": "US",
                    "wikidataId": "Q30",
                    "geonameId": 6252001
                },
                .........
            ]
        }
    },
    "lastUpdated": "2021-05-11T22:18:37.5251770Z",
    "network": {
        "registry": "ARIN",
        "registryStatus": "assigned",
        "registeredCountry": "US",
        "registeredCountryName": "United States of America",
        "organisation": "Charter Communications Inc",
        "isReachableGlobally": true,
        "isBogon": false,
        "bgpPrefix": "72.229.0.0/16",
        "bgpPrefixNetworkAddress": "72.229.0.0",
        "bgpPrefixLastAddress": "72.229.255.255",
        "totalAddresses": 65536,
        "carriers": [
            {
                "asn": "AS12271",
                "asnNumeric": 12271,
                "organisation": "Charter Communications Inc",
                "name": "TWC-12271-NYC",
                "registry": "ARIN",
                "registeredCountry": "US",
                "registeredCountryName": "United States of America",
                "registrationDate": "2000-06-09",
                "registrationLastChange": "2018-11-28",
                "totalIpv4Addresses": 2922487,
                "totalIpv4Prefixes": 204,
                "totalIpv4BogonPrefixes": 0,
                "rank": 162,
                "rankText": "#162 out of 71,428"
            }
        ],
        "viaCarriers": [
            {
                "asn": "AS7843",
                "asnNumeric": 7843,
                "organisation": "Charter Communications Inc",
                "registeredCountry": "US",
                "registeredCountryName": "United States of America",
                "totalIpv4Addresses": 355584,
                "rank": 731
            }
        ]
    },
    "confidence": "moderate",
    "confidenceArea": [
 ....       
{
            "latitude": 40.73086,
            "longitude": -74.32992
        }.....
    ],
    "securityThreat": "unknown",
    "hazardReport": {
        "isKnownAsTorServer": false,
        "isKnownAsVpn": false,
        "isKnownAsProxy": false,
        "isSpamhausDrop": false,
        "isSpamhausEdrop": false,
        "isSpamhausAsnDrop": false,
        "isBlacklistedUceprotect": false,
        "isBlacklistedBlocklistDe": false,
        "isKnownAsMailServer": false,
        "isKnownAsPublicRouter": false,
        "isBogon": false,
        "isUnreachable": false,
        "hostingLikelihood": 0,
        "isHostingAsn": false,
        "isCellular": false
    }
}
Enter fullscreen mode Exit fullscreen mode

Link: https://www.bigdatacloud.com/packages/ip-geolocation
Disclaimer: I work at BigDataCloud

DB-IP

DB-IP is a France-based IP geolocation database provider. They have three tiers of IP geolocation API services:

  1. Basic
  2. Core
  3. Extended

Screen Shot 2021-05-11 at 4.34.57 pm

Pricing

Free

  • Doesn't have a free plan.

Starting Price

  • The extended API starts at 16.41€/month.
  • 2K-50K requests per day

Data Objects

  • Standard Location
    • zipcode
    • city
    • state
    • country
    • continent
    • Point geocoordinates
  • Country related
    • flag
    • currency
    • phone
    • language
  • Time Zone
  • Network
    • ISP name
    • ASN
    • Organisation name
  • Security
    • Bot detection
    • Proxy detection
    • Threat level
{
    "ipAddress": "123.45.67.89",
    "continentCode": "NA",
    "continentName": "North America",
    "countryCode": "US",
    "countryName": "United States",
    "isEuMember": false,
    "currencyCode": "USD",
    "currencyName": "Dollar",
    "phonePrefix": "1",
    "languages": [
        "en-US",
        "es-US",
        "haw",
        "fr"
    ],
    "stateProv": "California",
    "stateProvCode": "CA",
    "district": "Santa Clara County",
    "city": "Mountain View",
    "geonameId": 5375480,
    "zipCode": "94043",
    "latitude": 37.3861,
    "longitude": -122.084,
    "gmtOffset": -7,
    "timeZone": "America\/Los_Angeles",
    "weatherCode": "USCA0746",
    "asNumber": 16591,
    "asName": "GOOGLE-FIBER",
    "isp": "Google Fiber Inc.",
    "linkType": "fttx",
    "usageType": "consumer",
    "organization": "Google Fiber Inc.",
    "isCrawler": false,
    "isProxy": true,
    "proxyType": "vpn",
    "threatLevel": "high",
    "threatDetails": [
        "anonymous-proxy",
        "attack-source",
        "attack-target:web"
        "bot-name:gherran",
        "bot-type:spam"
    ],
}
Enter fullscreen mode Exit fullscreen mode

Link: https://db-ip.com/

Ip2location

Ip2location is one of the popular IP geolocation API service providers based in Malaysia.

In addition to API, it also sells databases.

Screen Shot 2021-05-12 at 12.27.57 pm

Pricing

Free

  • 200 queries per day

Starting Price

  • $49 for 10,000 credits
  • 1 query can range from 1 credit to 18 credits based on a number of data points.

*The company provides separate pricing and endpoint for using its proxy detection API service.

Data Objects

  • Standard Location
    • zipcode
    • city
    • state
    • country
    • continent
    • Point geocoordinates
  • Country related
    • flag
    • currency
    • language
  • Time Zone
  • Network
    • ISP name
    • ASN
    • Organisation name
  • Security
    • Proxy detection
    • Threat level
{
    "country_code": "US",
    "country_name": "United States",
    "region_name": "California",
    "city_name": "Mountain View",
    "latitude": "37.405992",
    "longitude": "-122.078515",
    "zip_code": "94043",
    "time_zone": "-07:00",
    "isp": "Google LLC",
    "domain": "google.com",
    "net_speed": "T1",
    "idd_code": "1",
    "area_code": "650",
    "weather_station_code": "USCA0746",
    "weather_station_name": "Mountain View",
    "mcc": "-",
    "mnc": "-",
    "mobile_brand": "-",
    "elevation": "32",
    "usage_type": "DCH",
    "continent": {
        "name": "North america",
        "code": "NA",
        "hemisphere": [
            "north",
            "east"
        ],
        "translations": {
            "zh-cn": "北美洲"
        }
    },
    "country": {
        "name": "United States",
        "alpha3_code": "USA",
        "numeric_code": "840",
        "demonym": "Americans",
        "flag": "https://www.ip2location.com/assets/img/flags/us.png",
        "capital": "Washington, D.C.",
        "total_area": "9826675",
        "population": "326766748",
        "currency": {
            "code": "USD",
            "name": "United States Dollar",
            "symbol": "$"
        },
        "language": {
            "code": "EN",
            "name": "English"
        },
        "idd_code": "1",
        "tld": "us",
        "translations": {
            "zh-cn": "美国"
        }
    },
    "region": {
        "name": "California",
        "code": "06",
        "translations": {
            "zh-cn": "加利福尼亚"
        }
    },
    "city": {
        "name": "Mountain View",
        "translations": []
    },
    "geotargeting": {
        "metro": "807"
    },
    "country_groupings": [
        {
            "acronym": "Americas",
            "name": "Americas"
        },
        {
            "acronym": "APEC",
            "name": "Asia-Pacific Economic Cooperation"
        },
        {
            "acronym": "DAC",
            "name": "Development Assistance Committee"
        },
        {
            "acronym": "G2",
            "name": "Group of Two"
        },
        {
            "acronym": "G20",
            "name": "Group of Twenty"
        },
        {
            "acronym": "G7",
            "name": "Group of Seven"
        },
        {
            "acronym": "G8+5",
            "name": "G8+5"
        },
        {
            "acronym": "NAFTA",
            "name": "North American Free Trade Agreement"
        },
        {
            "acronym": "NALA",
            "name": "NALA"
        },
        {
            "acronym": "OAS",
            "name": "Organization of American States"
        },
        {
            "acronym": "OECD",
            "name": "Organisation for Economic Co-operation and Development"
        },
        {
            "acronym": "P5",
            "name": "P5"
        },
        {
            "acronym": "UN",
            "name": "United Nations"
        }
    ],
    "time_zone_info": {
        "olson": "America\/Los_Angeles",
        "current_time": "2019-03-03T23:06:07-08:00",
        "gmt_offset": -28800,
        "is_dst": "no",
        "sunrise": "06:50",
        "sunset": "19:32"
    }
}
Enter fullscreen mode Exit fullscreen mode

Link: https://www.ip2location.com/

ipdata

Ipdata is a US-based Ip geolocation API provider founded in the year 2017. The company provides aggregated Open Source threat intelligence data, IP to company lookups, and other location-based data.

Screen Shot 2021-05-12 at 1.20.25 pm

Pricing

Free

  • 1500 free requests per day
  • Restricted to non-commercial use only.

Starting Price

  • $10 per month for 2,500 daily requests.

Data Objects

  • Standard Location
    • postal codes
    • city
    • state
    • country
    • continent
    • Point geocoordinates
  • Country related
    • flag
    • currency
    • language
  • Time Zone
  • Network
    • ISP name
    • ASN
    • Organisation name
  • Security
    • Proxy detection
    • Tor Detect
    • Anonymous IP detect
    • Known Attacker detect
    • Bogon Detect
    • Threat level
{
    ip: "72.229.28.185",
    is_eu: false,
    city: "New York",
    region: "New York",
    region_code: "NY",
    country_name: "United States",
    country_code: "US",
    continent_name: "North America",
    continent_code: "NA",
    latitude: 40.7768,
    longitude: -73.9726,
    postal: "10116",
    calling_code: "1",
    flag: "https://ipdata.co/flags/us.png",
    emoji_flag: "🇺🇸",
    emoji_unicode: "U+1F1FA U+1F1F8",
    asn: {
        asn: "AS12271",
        name: "Charter Communications Inc",
        domain: "spectrum.com",
        route: "72.229.0.0/17",
        type: "isp"
    },
    languages: [
        {
            name: "English",
            native: "English"
        }
    ],
    currency: {
        name: "US Dollar",
        code: "USD",
        symbol: "$",
        native: "$",
        plural: "US dollars"
    },
    time_zone: {
        name: "America/New_York",
        abbr: "EDT",
        offset: "-0400",
        is_dst: true,
        current_time: "2021-05-11T23:55:34.840149-04:00"
    },
    threat: {
        is_tor: false,
        is_proxy: false,
        is_anonymous: false,
        is_known_attacker: false,
        is_known_abuser: false,
        is_threat: false,
        is_bogon: false
    }
}
Enter fullscreen mode Exit fullscreen mode

Link: https://ipdata.co/

Ipinfo.io

IPinfo.io is a US-based IP intelligence data provider established in the year 2013.

Pricing

Free

  • 50k lookups.

Starting Price

  • $49 per month for limited data points for 250K lookups.
  • Additional 50K queries for $10.

In order to access all the data points, the price begins at $1499 per month for 2.5M lookups. You can purchase additional 200K lookups are $100.

Data Objects

  • Standard Location
    • postal code
    • city
    • state
    • country
    • continent
    • Point geocoordinates
  • Time Zone
  • Network
    • ISP name
    • ASN
    • Organisation name
  • Security
    • VPN
    • Proxy
    • Tor
    • Hosting
  • Domain
{
 ip: "72.229.28.185",
 hostname: "cpe-72-229-28-185.nyc.res.rr.com",
 city: "New York City",
 region: "New York",
 country: "US",
 loc: "40.7143,-74.0060",
 org: "AS12271 Charter Communications Inc",
 postal: "10004",
 timezone: "America/New_York",
 asn: {
 asn: "AS12271",
 name: "Charter Communications Inc",
 domain: "charter.com",
 route: "72.229.0.0/17",
 type: "isp"},
 company: {
 name: "Charter Communications Inc",
 domain: "spectrum.com",
 type: "isp"},
 privacy:{
 vpn: false,
 proxy: false,
 tor: false,
 hosting: false},
 abuse: {
 address: "US, CO, Greenwood Village, 6399 S Fiddlers Green Circle, 80111",
 country: "US",
 email: "ipaddressing@chartercom.com",
 name: "IPAddressing",
 network: "72.224.0.0/13",
 phone: "+1-720-536-1278"},
 domains: {
 ip: "72.229.28.185",
 total: 1,
 domains: Array,
 0: "advertisa.tk"}
}
Enter fullscreen mode Exit fullscreen mode

Link: https://ipinfo.io/

Ipstack

Ipstack is an IP geolocation API service provided by an Austrian tech company called APILayer. Along with IP geolocation services, it also provides various other business APIs.

Screen Shot 2021-05-12 at 2.10.39 pm

Pricing

Free

  • 5,000 requests per month for limited data objects.

Starting Price

  • $9.99 per month for 50,000 requests per month.

Data Objects

  • Standard Location
    • zipcode
    • city
    • state
    • country
    • continent
    • Point geocoordinates
  • Country related
    • flag
    • currency
    • language
    • phone
  • Time Zone
  • Network
    • ISP name
    • ASN
  • Security
    • Proxy
    • Bot
    • Tor
    • Threat level
{
  "ip": "134.201.250.155",
  "hostname": "134.201.250.155",
  "type": "ipv4",
  "continent_code": "NA",
  "continent_name": "North America",
  "country_code": "US",
  "country_name": "United States",
  "region_code": "CA",
  "region_name": "California",
  "city": "Los Angeles",
  "zip": "90013",
  "latitude": 34.0453,
  "longitude": -118.2413,
  "location": {
    "geoname_id": 5368361,
    "capital": "Washington D.C.",
    "languages": [
        {
          "code": "en",
          "name": "English",
          "native": "English"
        }
    ],
    "country_flag": "https://assets.ipstack.com/images/assets/flags_svg/us.svg",
    "country_flag_emoji": "🇺🇸",
    "country_flag_emoji_unicode": "U+1F1FA U+1F1F8",
    "calling_code": "1",
    "is_eu": false
  },
  "time_zone": {
    "id": "America/Los_Angeles",
    "current_time": "2018-03-29T07:35:08-07:00",
    "gmt_offset": -25200,
    "code": "PDT",
    "is_daylight_saving": true
  },
  "currency": {
    "code": "USD",
    "name": "US Dollar",
    "plural": "US dollars",
    "symbol": "$",
    "symbol_native": "$"
  },
  "connection": {
    "asn": 25876,
    "isp": "Los Angeles Department of Water & Power"
  },
  "security": {
    "is_proxy": false,
    "proxy_type": null,
    "is_crawler": false,
    "crawler_name": null,
    "crawler_type": null,
    "is_tor": false,
    "threat_level": "low",
    "threat_types": null
  }
}
Enter fullscreen mode Exit fullscreen mode

Link: https://ipstack.com/

Maxmind

Maxmind is one of the oldest IP geolocation service providers based in the US, established in the year 2002.

The company is widely recognized as the provider of a free GeoIP database. However, it also provides paid API services.

Screen Shot 2021-05-12 at 2.37.38 pm

Pricing

Free

  • You can download a free version of the GeoIP database.

Starting Price

  • $25 for 12,500 queries

Data Objects

  • Standard Location
    • zipcode
    • city
    • state
    • country
    • continent
    • Point geocoordinates
  • Country Related
    • Average Income (US only)
    • Population Density (US only)
  • Time Zone
  • Network
    • ISP name
    • ASN
    • Organisation name
  • Security
    • Proxy
    • Residential Proxy
    • Tor Exit Node
    • Anonymous IP
    • Hosting
  • Domain
  • Accuracy Radius

Link: https://www.maxmind.com/en/home

Oldest comments (2)

Collapse
 
ip2location profile image
IP2Location

Thank you for mentioning IP2Location!

Collapse
 
steinbring profile image
Joe Steinbring

I would suggest checking out Cloudflare workers as a cheap alternative. The request.cf scope gets you not only the latitude/longitude but also stuff like city, region, postal code, and timezone. The free plan includes 100k requests per day, too.

developers.cloudflare.com/workers/...