IPstack is down. Welcome to IPinfo

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 :rainbow: it’s all green :rainbow:.

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 :white_check_mark: 50,000 Requests / Month
Free upgrade to 100k with creditlink
50,000 Requests / Month
Support :white_check_mark: :white_check_mark:
Location :white_check_mark: :white_check_mark:
SSL :white_check_mark: :white_check_mark:
Currency :white_check_mark: (Available via Libraries, Integration) :white_check_mark:
Timezone :white_check_mark: :white_check_mark:
Connection :white_check_mark: :white_check_mark:
IP database :white_check_mark: IP to Country + ASN
(Full Accuracy / Daily Updates)
:x:
Community :white_check_mark: You are here :x:
Open source tooling :white_check_mark: GitHub - Libraries, CLI, toolling :x:
Integrations :white_check_mark: Integration :x:
Unlimited queries :white_check_mark: Available via free IP databases :x:

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)

:link: https://github.com/ipinfo

{
  "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:

… 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. :slight_smile:

1 Like

A region_code equivalent module would be really needed for me to be able to switch easily.

Hey Gizmo, welcome. I saw your reply on Twitter as well.

I think we can do that from the official library side. Which programming language/framework are you using? I will take a look geonames.org and see if I can develop a quick solution.

Hey, thanks for the quick response.

We are using node.js :slightly_smiling_face:

Hey, I don’t work for IPinfo, but I can send you a list of all region codes I scraped (which is legal, by the way) from ISO’s website. DM me if you need that.

I think IPinfo can create a geonames.org-based solution, but that might take some time.

1 Like

Fantastic stuff. Is there a way to validate that these subdivision codes will match IPinfo’s data? We use geonames.org and it should match the original ISO codes, right?

My meme collection during this catastrophic event.




1 Like