Skip to content

Latest commit

 

History

History
44 lines (41 loc) · 19.9 KB

readme.md

File metadata and controls

44 lines (41 loc) · 19.9 KB

GeoIP-api comparison

Comparison of some different mostly free GeoIP APIs I found around the internet.

Go to https://geoip.emrik.org to do your own benchmark or lookup an IP address using multiple APIs.

Accuracy is harder to test. But the only service that seems to achieve intercity tracking is ipgeolocation.io in my limited tests. Test on https://geoip.emrik.org to see for yourself :)

Feel free to add any APIs you find to the list by creating a pull request or an issue.

Sites

Url Https Limit Clientside Client lookup delay Serverside delay
http://ip-api.com/
45/min
177 ms 29 ms
https://ipapi.co/
1000/day
398 ms 292 ms
https://ipbase.com/
150/month
114 ms 63 ms
https://ipgeolocation.io/
1000/day
n/a 107 ms
https://ipstack.com/
1000/month
323 ms 205 ms
https://ipwhois.io/
10000/month
193 ms 30 ms
https://getgeoapi.com/
300/day
111 ms 24 ms
https://geo.ipify.org/
333/account
n/a 359 ms
https://www.ip2location.io/
30000/month
183 ms 121 ms
https://ipinfo.io/
50000/month
n/a 184 ms
https://dev.maxmind.com/geoip/geoip2/geolite2/
Unlimited
n/a 263 ms
https://www.maxmind.com/en/geoip2-city-database
16667/account
n/a 117 ms
https://www.geojs.io/
Unlimited
188 ms 30 ms
https://reallyfreegeoip.org/
Unlimited
229 ms 31 ms
https://freeipapi.com
60/min
100 ms 50 ms

Example response

API Serverside Lookup
ip-api.com
{
"status": "success",
"country": "United States",
"countryCode": "US",
"region": "VA",
"regionName": "Virginia",
"city": "Ashburn",
"zip": "20149",
"lat": 39.03,
"lon": -77.5,
"timezone": "America/New_York",
"isp": "Google LLC",
"org": "Google Public DNS",
"as": "AS15169 Google LLC",
"query": "8.8.8.8"
}
ipapi.co
{
"ip": "8.8.8.8",
"network": "8.8.8.0/24",
"version": "IPv4",
"city": "Mountain View",
"region": "California",
"region_code": "CA",
"country": "US",
"country_name": "United States",
"country_code": "US",
"country_code_iso3": "USA",
"country_capital": "Washington",
"country_tld": ".us",
"continent_code": "NA",
"in_eu": false,
"postal": "94043",
"latitude": 37.42301,
"longitude": -122.083352,
"timezone": "America/Los_Angeles",
"utc_offset": "-0700",
"country_calling_code": "+1",
"currency": "USD",
"currency_name": "Dollar",
"languages": "en-US,es-US,haw,fr",
"country_area": 9629091,
"country_population": 327167434,
"asn": "AS15169",
"org": "GOOGLE"
}
ipbase.com
{
"data": {
"ip": "8.8.8.8",
"hostname": null,
"type": "v4",
"range_type": {
"type": "PUBLIC",
"description": "Public address"
},
"connection": {
"asn": 15169,
"organization": "Google LLC",
"isp": "Google LLC",
"range": "8.8.8.0/24"
},
"location": {
"geonames_id": 85922355,
"latitude": 37.386051177978516,
"longitude": -122.08384704589844,
"zip": "94035",
"continent": {
"code": "NA",
"name": "North America",
"name_translated": "North America",
"geonames_id": 6255149,
"wikidata_id": "Q49"
},
"country": {
"alpha2": "US",
"alpha3": "USA",
"calling_codes": [
"+1"
],
"currencies": [
{
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars",
"type": "fiat"
}
],
"emoji": "🇺🇸",
"ioc": "USA",
"languages": [
{
"name": "English",
"name_native": "English"
}
],
"name": "United States",
"name_translated": "United States",
"timezones": [
"America/New_York",
"America/Detroit",
"America/Kentucky/Louisville",
"America/Kentucky/Monticello",
"America/Indiana/Indianapolis",
"America/Indiana/Vincennes",
"America/Indiana/Winamac",
"America/Indiana/Marengo",
"America/Indiana/Petersburg",
"America/Indiana/Vevay",
"America/Chicago",
"America/Indiana/Tell_City",
"America/Indiana/Knox",
"America/Menominee",
"America/North_Dakota/Center",
"America/North_Dakota/New_Salem",
"America/North_Dakota/Beulah",
"America/Denver",
"America/Boise",
"America/Phoenix",
"America/Los_Angeles",
"America/Anchorage",
"America/Juneau",
"America/Sitka",
"America/Metlakatla",
"America/Yakutat",
"America/Nome",
"America/Adak",
"Pacific/Honolulu"
],
"is_in_european_union": false,
"fips": "US",
"geonames_id": 85633793,
"hasc_id": "US",
"wikidata_id": "Q30"
},
"city": {
"fips": "0649670",
"alpha2": null,
"geonames_id": 85922355,
"hasc_id": null,
"wikidata_id": "Q486860",
"name": "Mountain View",
"name_translated": "Mountain View"
},
"region": {
"fips": "US06",
"alpha2": "US-CA",
"geonames_id": 85688637,
"hasc_id": "US.CA",
"wikidata_id": "Q99",
"name": "California",
"name_translated": "California"
}
},
"tlds": [
".us"
],
"timezone": {
"id": "America/Los_Angeles",
"current_time": "2024-09-20T02:47:08-07:00",
"code": "PDT",
"is_daylight_saving": true,
"gmt_offset": -25200
},
"security": {
"is_anonymous": null,
"is_datacenter": null,
"is_vpn": null,
"is_bot": null,
"is_abuser": null,
"is_known_attacker": null,
"is_proxy": null,
"is_spam": null,
"is_tor": null,
"proxy_type": null,
"is_icloud_relay": null,
"threat_score": null
},
"domains": {
"count": null,
"domains": []
}
}
}
ipgeolocation.io
{
"ip": "8.8.8.8",
"continent_code": "NA",
"continent_name": "North America",
"country_code2": "US",
"country_code3": "USA",
"country_name": "United States",
"country_name_official": "United States of America",
"country_capital": "Washington, D.C.",
"state_prov": "California",
"state_code": "US-CA",
"district": "",
"city": "Mountain View",
"zipcode": "94043-1351",
"latitude": "37.42240",
"longitude": "-122.08421",
"is_eu": false,
"calling_code": "+1",
"country_tld": ".us",
"languages": "en-US,es-US,haw,fr",
"country_flag": "https://ipgeolocation.io/static/flags/us_64.png",
"geoname_id": "6301403",
"isp": "Google LLC",
"connection_type": "",
"organization": "Google LLC",
"country_emoji": "🇺🇸",
"currency": {
"code": "USD",
"name": "US Dollar",
"symbol": "$"
},
"time_zone": {
"name": "America/Los_Angeles",
"offset": -8,
"offset_with_dst": -7,
"current_time": "2024-09-20 02:47:08.774-0700",
"current_time_unix": 1726825628.774,
"is_dst": true,
"dst_savings": 1,
"dst_exists": true,
"dst_start": {
"utc_time": "2024-03-10 TIME 10",
"duration": "+1H",
"gap": true,
"dateTimeAfter": "2024-03-10 TIME 03",
"dateTimeBefore": "2024-03-10 TIME 02",
"overlap": false
},
"dst_end": {
"utc_time": "2024-11-03 TIME 09",
"duration": "-1H",
"gap": false,
"dateTimeAfter": "2024-11-03 TIME 01",
"dateTimeBefore": "2024-11-03 TIME 02",
"overlap": true
}
}
}
ipstack.com
{
"ip": "8.8.8.8",
"type": "ipv4",
"continent_code": "NA",
"continent_name": "North America",
"country_code": "US",
"country_name": "United States",
"region_code": "OH",
"region_name": "Ohio",
"city": "Glenmont",
"zip": "44628",
"latitude": 40.5369987487793,
"longitude": -82.12859344482422,
"msa": null,
"dma": "510",
"radius": null,
"ip_routing_type": "fixed",
"connection_type": "ocx",
"location": {
"geoname_id": null,
"capital": "Washington D.C.",
"languages": [
{
"code": "en",
"name": "English",
"native": "English"
}
],
"country_flag": "https://assets.ipstack.com/flags/us.svg",
"country_flag_emoji": "🇺🇸",
"country_flag_emoji_unicode": "U+1F1FA U+1F1F8",
"calling_code": "1",
"is_eu": false
}
}
ipwhois.io
{
"ip": "8.8.8.8",
"success": true,
"type": "IPv4",
"continent": "North America",
"continent_code": "NA",
"country": "United States",
"country_code": "US",
"region": "California",
"region_code": "CA",
"city": "Mountain View",
"latitude": 37.3860517,
"longitude": -122.0838511,
"is_eu": false,
"postal": "94039",
"calling_code": "1",
"capital": "Washington D.C.",
"borders": "CA,MX",
"flag": {
"img": "https://cdn.ipwhois.io/flags/us.svg",
"emoji": "🇺🇸",
"emoji_unicode": "U+1F1FA U+1F1F8"
},
"connection": {
"asn": 15169,
"org": "Google LLC",
"isp": "Google LLC",
"domain": "google.com"
},
"timezone": {
"id": "America/Los_Angeles",
"abbr": "PDT",
"is_dst": true,
"offset": -25200,
"utc": "-07:00",
"current_time": "2024-09-20T02:47:09-07:00"
}
}
getgeoapi.com
{
"ip": "8.8.8.8",
"type": "IPv4",
"location": {
"latitude": 37.386051,
"longitude": -122.083847
},
"postcode": "94035",
"area": {
"code": "US-CA",
"geonameid": 5332921,
"name": "California"
},
"asn": {
"number": 15169,
"organisation": "GOOGLE"
},
"city": {
"geonameid": 5375480,
"name": "Mountain View",
"population": 80435
},
"continent": {
"geonameid": 6255149,
"name": "North America",
"code": "NA"
},
"country": {
"geonameid": 6252001,
"name": "United States of America",
"code": "US",
"capital": "Washington",
"area_size": "9629091.00 sq. km",
"population": 327167434,
"phone_code": "1",
"is_in_eu": false,
"languages": {
"en": "English language",
"es": "Spanish language",
"haw": "Hawaiian language",
"fr": "French language"
},
"flag": {
"file": "https://commons.wikimedia.org/wiki/Special:FilePath/Flag_of_the_United_States.svg",
"emoji": "🇺🇸",
"unicode": "U+1F1FA U+1F1F8"
},
"tld": ".us"
},
"currency": {
"code": "USD",
"name": "United States dollar"
},
"security": {
"is_tor": false,
"is_proxy": false,
"is_crawler": false,
"is_threat": false,
"is_thread": false
},
"time": {
"timezone": "America/Los_Angeles",
"gtm_offset": -25200,
"gmt_offset": -25200,
"is_daylight_saving": true,
"code": "PDT"
},
"status": "success"
}
geo.ipify.org
{
"ip": "8.8.8.8",
"location": {
"country": "US",
"region": "California",
"city": "Mountain View",
"lat": 32.69922,
"lng": -117.11281,
"postalCode": "",
"timezone": "-07:00",
"geonameId": 5375481
},
"domains": [
"125721af2e.dlszywz.com",
"dexsn.com",
"enyiteng.com",
"pioneer-sro.com",
"amst.store"
],
"as": {
"asn": 15169,
"name": "GOOGLE",
"route": "8.8.8.0/24",
"domain": "https://about.google/intl/en/",
"type": "Content"
},
"isp": "Google LLC",
"proxy": {
"proxy": false,
"vpn": false,
"tor": false
}
}
ip2location.io
{
"ip": "8.8.8.8",
"country_code": "US",
"country_name": "United States of America",
"region_name": "California",
"city_name": "Mountain View",
"latitude": 37.38605,
"longitude": -122.08385,
"zip_code": "94035",
"time_zone": "-07:00",
"asn": "15169",
"as": "Google LLC",
"is_proxy": false
}
ipinfo.io
{
"ip": "8.8.8.8",
"hostname": "dns.google",
"anycast": true,
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.4056,-122.0775",
"org": "AS15169 Google LLC",
"postal": "94043",
"timezone": "America/Los_Angeles"
}
geolite2
{
"continent": {
"code": "NA",
"geonameId": 6255149,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "Norteamérica",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
},
"country": {
"isoCode": "US",
"geonameId": 6252001,
"names": {
"pt-BR": "EUA",
"ru": "США",
"zh-CN": "美国",
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États Unis",
"ja": "アメリカ"
}
},
"registeredCountry": {
"isoCode": "US",
"geonameId": 6252001,
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États Unis",
"ja": "アメリカ",
"pt-BR": "EUA",
"ru": "США",
"zh-CN": "美国"
},
"isInEuropeanUnion": false
},
"traits": {
"autonomousSystemNumber": 15169,
"autonomousSystemOrganization": "GOOGLE",
"ipAddress": "8.8.8.8",
"network": "8.8.8.0/24",
"isAnonymous": false,
"isAnonymousProxy": false,
"isAnonymousVpn": false,
"isHostingProvider": false,
"isLegitimateProxy": false,
"isPublicProxy": false,
"isResidentialProxy": false,
"isSatelliteProvider": false,
"isTorExitNode": false
},
"location": {
"accuracyRadius": 1000,
"latitude": 37.751,
"longitude": -97.822,
"timeZone": "America/Chicago"
}
}
geoip2
{
"continent": {
"code": "NA",
"geonameId": 6255149,
"names": {
"es": "Norteamérica",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲",
"de": "Nordamerika",
"en": "North America"
}
},
"country": {
"isoCode": "US",
"geonameId": 6252001,
"names": {
"en": "United States",
"es": "Estados Unidos",
"fr": "États Unis",
"ja": "アメリカ",
"pt-BR": "EUA",
"ru": "США",
"zh-CN": "美国",
"de": "USA"
}
},
"maxmind": {
"queriesRemaining": 16390
},
"registeredCountry": {
"isoCode": "US",
"geonameId": 6252001,
"names": {
"de": "USA",
"en": "United States",
"es": "Estados Unidos",
"fr": "États Unis",
"ja": "アメリカ",
"pt-BR": "EUA",
"ru": "США",
"zh-CN": "美国"
},
"isInEuropeanUnion": false
},
"traits": {
"autonomousSystemNumber": 15169,
"autonomousSystemOrganization": "GOOGLE",
"connectionType": "Corporate",
"isp": "Google",
"organization": "Google",
"ipAddress": "8.8.8.8",
"network": "8.8.8.8/32",
"isAnonymous": false,
"isAnonymousProxy": false,
"isAnonymousVpn": false,
"isHostingProvider": false,
"isLegitimateProxy": false,
"isPublicProxy": false,
"isResidentialProxy": false,
"isSatelliteProvider": false,
"isTorExitNode": false
},
"location": {
"accuracyRadius": 1000,
"latitude": 37.751,
"longitude": -97.822,
"timeZone": "America/Chicago"
}
}
GeoJS
{
"accuracy": 1000,
"ip": "8.8.8.8",
"timezone": "America/Chicago",
"organization": "AS15169 GOOGLE",
"asn": 15169,
"area_code": "0",
"organization_name": "GOOGLE",
"country_code": "US",
"country_code3": "USA",
"continent_code": "NA",
"country": "United States",
"latitude": "37.751",
"longitude": "-97.822"
}
ReallyFreeGeoIP
{
"ip": "8.8.8.8",
"country_code": "US",
"country_name": "United States",
"region_code": "",
"region_name": "",
"city": "",
"zip_code": "",
"time_zone": "America/Chicago",
"latitude": 37.751,
"longitude": -97.822,
"metro_code": 0
}
FreeIPAPI
{
"ipVersion": 4,
"ipAddress": "8.8.8.8",
"latitude": 37.386051,
"longitude": -122.083847,
"countryName": "United States of America",
"countryCode": "US",
"timeZone": "-07:00",
"zipCode": "94035",
"cityName": "Mountain View",
"regionName": "California",
"isProxy": false,
"continent": "Americas",
"continentCode": "AM",
"currency": {
"code": "USD",
"name": "US Dollar"
},
"language": "English",
"timeZones": [
"America/Adak",
"America/Anchorage",
"America/Boise",
"America/Chicago",
"America/Denver",
"America/Detroit",
"America/Indiana/Indianapolis",
"America/Indiana/Knox",
"America/Indiana/Marengo",
"America/Indiana/Petersburg",
"America/Indiana/Tell_City",
"America/Indiana/Vevay",
"America/Indiana/Vincennes",
"America/Indiana/Winamac",
"America/Juneau",
"America/Kentucky/Louisville",
"America/Kentucky/Monticello",
"America/Los_Angeles",
"America/Menominee",
"America/Metlakatla",
"America/New_York",
"America/Nome",
"America/North_Dakota/Beulah",
"America/North_Dakota/Center",
"America/North_Dakota/New_Salem",
"America/Phoenix",
"America/Sitka",
"America/Yakutat",
"Pacific/Honolulu"
],
"tlds": [
".us"
]
}