API Layer’s IP geolocation data service IPstack have been down for several hours, and some users have inquired about migrating to our services. Here is a quick weekend post on the migration process.
Not trying to dab on them during an outage over the weekend, but I cannot help but mention the fact that their service is returning a 502 Bad Gateway error, even though the server’s operational status says it’s all green .
Protip: We post our updates from IPinfo Updates channel.
API Features
That is just a fraction of what is available in our free tier account… and they charge for it.
Features | IPinfo (Free Tier) | IPstack ($13 / Month Tier) |
---|---|---|
Requests | 50,000 Requests / Month Free upgrade to 100k with creditlink |
50,000 Requests / Month |
Support | ||
Location | ||
SSL | ||
Currency | (Available via Libraries, Integration) | |
Timezone | ||
Connection | ||
IP database | IP to Country + ASN (Full Accuracy / Daily Updates) |
|
Community | You are here | |
Open source tooling | GitHub - Libraries, CLI, toolling | |
Integrations | Integration | |
Unlimited queries | Available via free IP databases |
It is not even a fair comparison! We are comparing our free account to their paid tier, and we are still miles apart!
Migration
API URL
++ https://api.ipstack.com/134.201.250.155?access_key=<access_token>
-- https://ipinfo.io/134.201.250.155?token=<access_token>
IPstack does not support tokenless access to their API service. But IPinfo does. You can check the API out without providing the parameter: https://ipinfo.io/134.201.250.155/json
API Payload
IPstack API Payload structure (Full service)
{
"ip": "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"
}
}
IPinfo API Payload structure (Full service)
{
"ip": "8.8.8.8",
"hostname": "dns.google",
"anycast": true,
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.4056,-122.0775",
"postal": "94043",
"timezone": "America/Los_Angeles",
"asn": {
"asn": "AS15169",
"name": "Google LLC",
"domain": "google.com",
"route": "8.8.8.0/24",
"type": "hosting"
},
"company": {
"name": "Google LLC",
"domain": "google.com",
"type": "hosting"
},
"privacy": {
"vpn": false,
"proxy": false,
"tor": false,
"relay": false,
"hosting": true,
"service": ""
},
"abuse": {
"address": "US, CA, Mountain View, 1600 Amphitheatre Parkway, 94043",
"country": "US",
"email": "network-abuse@google.com",
"name": "Abuse",
"network": "8.8.8.0/24",
"phone": "+1-650-253-0000"
},
"domains": {
"ip": "8.8.8.8",
"total": 9791,
"domains": [
"musicool.cn",
"kagou.vip",
"nmgk2.com",
"91xiazai.com",
"bits-hyderabad.ac.in"
]
}
}
IPinfo API Payload structure (Free tier)
{
"ip": "134.201.250.155",
"city": "Los Angeles",
"region": "California",
"country": "US",
"loc": "34.0522,-118.2437",
"org": "AS25876 Los Angeles Department of Water & Power",
"postal": "90009",
"timezone": "America/Los_Angeles"
}
IPinfo API Payload structure (Free tier - Official Libraries)
{
"ip": "134.201.250.155",
"city": "Los Angeles",
"region": "California",
"country": "US",
"loc": "34.0522,-118.2437",
"org": "AS25876 Los Angeles Department of Water & Power",
"postal": "90009",
"timezone": "America/Los_Angeles",
"country_name": "United States",
"isEU": false,
"country_flag_url": "https://cdn.ipinfo.io/static/images/countries-flags/US.svg",
"country_flag": {
"emoji": "\ud83c\uddfa\ud83c\uddf8",
"unicode": "U+1F1FA U+1F1F8"
},
"country_currency": {
"code": "USD",
"symbol": "$"
},
"continent": {
"code": "NA",
"name": "North America"
},
"latitude": "34.0522",
"longitude": "-118.2437"
}
API Migration data access reference
IPstack adds a lot of static reference information. We like to avoid adding static reference information to our core API service, but we add some useful ones through our official libraries, modules, packages, and integrations. So, to replace their API service, it is best to use one of our official libraries:
- Python: https://github.com/ipinfo/python
- PHP: https://github.com/ipinfo/php
- Laravel: https://github.com/ipinfo/laravel
- Node.js: https://github.com/ipinfo/node
- Golang: https://github.com/ipinfo/go
- Java: https://github.com/ipinfo/java
… We have more. Find the one you need from our GitHub.
While you are at it, install the IPinfo CLI
For additional static reference information, feel free to use the data from geonames.org.
If the “modules” IPstack provides are important, please comment, and we will add them to our official libraries. Also, if you need someone to take a look at your code to assist with the migration, please ping me.