Migration Guide: Switching from IPinfo.io to IP2Location.io for IP Geolocation

Switching from IPinfo.io to IP2Location.io for IP Geolocation

This article will explain how to migrate your geolocation implementation from IPinfo.io to IP2Location.io, providing step-by-step migration guide for a seamless transition.

1. Review the IP2Location.io Documentation to Gain an Understanding

Before the migration, review the IP2Location API documentation to understand its capabilities and structure.  

For example, the API endpoint URL and the authentication method, the API endpoint URLs, the request and response format, and the available fields in the response. 

Refer to IP2Location.io API documentation for details.

2. Sign Up for IP2Location.io

Create an account at IP2Location.io

Select the appropriate subscription plan based on your usage requirements. You may get started with Free Plan.

Retrieve your API key from the dashboard after setting up your user account.

3. Update Your Application API Request

Compare and align the response fields between IPInfo.io and IP2Location.io to ensure correct data mapping. Please read the section below for detailed explanation. In this article, we will be using the IP2Location.io Security Plan as example.

Update your code to handle the new response structure. For example,

https://api.ip2location.io/?key={YOUR_API_KEY}&ip=8.8.8.8&format=json

You might also be interested in exploring more sample code examples.

IPInfo.IO IP Geolocation API => IP2Location.io IP Geolocation API

Compared to IPInfo’s response output, IP2Location.io delivers a more comprehensive suite of data, tailored to meet the diverse needs of all industries. Our offerings include detailed weather station data, elevation, continent and country information, time zone details, and geotargeting metro data, providing an unmatched level of granularity and utility for businesses across sectors.

This overview will be complemented by a few examples for better understanding, rather than diving into extensive details.

For example, IPInfo’s is_anycast returns Boolean value whereas in IP2Location.io, it can be considered as a subset of IP2Location.io’s address_type field. We provide detailed information under this address_type field where you can find if it is an A(Anycast), U(Unicast), M(Multicast) or B(Broadcast).

IPInfo’s is_satellite indicates whether the IP address is part of a satellite internet connection and returns true if the IP address belongs to a satellite internet pool. In IP2Location.io, it is a subset of net_speed. You get further information if the internet connection is a DIAL(dial-up), DSL(broadband/cable/fiber/mobile), COMP(corporate), T1(data center/transit), or SAT(satellite).

The Country Information

IP2Location.io API stands out by offering a comprehensive dataset that includes country names, ISO codes, population, area, language, currency, and more, making it ideal for diverse applications. 

With rich localization support, it enables applications to display country names in a user’s preferred language, enhancing global accessibility. Features like country flags and native demonyms create visually appealing, localized interfaces for a better user experience. Business-critical insights, such as currency, language, and capital cities, make it ideal for e-commerce localization, currency conversion, and targeted marketing. Additionally, the inclusion of continent details and ISO-based codes ensures a standardized approach to organizing and analyzing international data. See below.

country.name:Country name based on ISO 3166.
country.alpha3_code:Three-character country code based on ISO 3166.
country.numeric_code:Three-character country numeric code based on ISO 3166.
country.demonym:Native of the country.
country.flag:URL of the country flag image.
country.capital:Capital of the country.
country.total_area:Total area in km2.
country.population:Population of the country.
country.currency:Currency of the country, such as code, name and symbol.
country.language:Language of the country.
country.tld:Country-Code Top-Level Domain.
country.translation:Translation data based on the given lang code.

The Proxy Information

Proxy detection is a critical tool in identifying and mitigating online threats, ensuring security and reliability in digital environments. IP2Location.io provides extra information about proxy IP address, including:

fraud_score:Potential risk score (0 – 99) associated with IP address. A higher IP2Proxy Fraud Score indicates a greater likelihood of fraudulent activity and a lower reputation.
proxy.last_seen:Proxy last seen in days.
proxy.proxy_type:Type of proxy, such as
(VPN) Virtual Private Networks
(TOR) Tor Exit Nodes
(DCH) Hosting Providers, Data Centers or Content Delivery Networks
(PUB) Public Proxies
(WEB) Web Proxies
(SES) Search Engine Robots
(RES) Residential Proxies
(CPN) Consumer Privacy Networks
(EPN) Enterprise Private Networks.
proxy.threat:Security threat reported.
(SPAM) Email and forum spammers
(SCANNER) Network security scanners
(BOTNET) Malware infected devices.
proxy.provider:Name of VPN provider if available.
proxy.is_residential_proxy:Residential proxies.
proxy.is_spammer:Email and forum spammers.
proxy.is_scanner:Network security scanners.
proxy.is_botnet:Malware infected devices.
proxy.is_consumer_privacy_network:Consumer Privacy Networks.
proxy.is_enterprise_private_network:Enterprise Private Networks.

Here is the comparison of both API fields looks like:

IPInfo.ioIP2Location.ioRemarks
ip=ip
hostname=n/a
city=city_name
region=region_name
country=country_code
loc=latitude, longitude
org=asn, as
postal=zip_code
timezone=time_zone_info.olsontime_zone in IP2Location.io is offset format
is_anonymous=is_proxyIndicates whether the IP address is anonymous. true if the IP address is associated with an IP privacy service, such as a VPN, proxy, Tor, or relay.
is_anycast=address_type: “anycast”Indicates whether the IP address is an anycast IP. true if the IP address maps to multiple physical servers in different locations via anycast routing.

*is_anycast is subset of IP2Location.io’s address_type*
is_mobile=n/aIndicates whether the IP address belongs to a mobile network. true if the IP address is associated with a cellular network, carrier, or mobile device.
is_satellite=net_speed: “SAT”Indicates whether the IP address is part of a satellite internet connection. true if the IP address belongs to a satellite internet pool.

*is_satellite is subset of IP2Location.io’s net_speed*
is_hosting=proxy.is_data_centerIndicates whether the IP address is an internet service hosting IP address. This information is separately derived from our IP to Privacy database
asn.asn=asn
asn.name=as
asn.domain=domain
asn.route=n/a
asn.type=usage_type
company.name=isp
company.domain=domain
company.type=usage_type
carrier.name=mobile_brand
carrier.mcc=mcc
carrier.mnc=mnc
privacy.vpn=proxy.is_vpn
privacy.proxy=is_proxy
privacy.tor=proxy.is_tor
privacy.relay=proxy.provider: “Apple iCloud Private Relay”*relay is subset of IP2Location.io’s proxy.provider*
privacy.hosting=proxy.is_data_center
privacy.service=n/a
abuse.address=n/a
abuse.country=n/a
abuse.email=n/a
abuse.name=n/a
abuse.network=n/a
abuse.phone=n/a
domains.ip=n/a
domains.total=n/a
domains.domains=n/a

Whether you’re switching data providers or integrating our IP geolocation solution, our team is here to help—contact us today!


THE POWER OF IP GEOLOCATION

Find a solution that fits.


Was this article helpful?

Related Articles