ipinfo.io drop-in replacement

ipinfo's compact JSON with a loc string and an org string prefixed by the AS number is reproduced at ipinfo.mygeocode.com. The official ipinfo client libraries accept a custom base URL, so they work too.

Change one hostname

Original host
  • ipinfo.io
Use insteadipinfo.mygeocode.com
Key parametertoken (put your My Geocode key here, or leave it out for the free 2,500 a day)
Before
curl "https://ipinfo.io/8.8.8.8/json?token=YOUR_IPINFO_TOKEN"
After
curl "https://ipinfo.mygeocode.com/8.8.8.8/json?token=YOUR_MYGEOCODE_KEY"

Why people move

ipinfo's free tier is 50,000 a month without geolocation details on some fields. Here the free tier is 2,500 a day with full fields, and paid usage is per request or flat.

Try it before you sign up for anything. Requests to ipinfo.mygeocode.com count toward the same 2,500 a day you get on our own endpoints, with no key and no account. Above that, credits at $0.001 per request or €50 a month unlimited. Signing up takes an email address and nothing else.

See pricing Sign up with an email

Endpoints

Path on ipinfo.mygeocode.comWhat it doesBacked by
/{ip}/jsonLookup by addressIPv4 lookup
/{ip}Lookup by address (same response)IPv4 lookup
/jsonLookup the callerIPv4 lookup
/{ip}/{field}Single field, plain text (city, country, loc, org, timezone)IPv4 lookup

Example response

This is what the request above returns. Field names, nesting and types follow ipinfo. Only the data behind them is ours.

Response from ipinfo.mygeocode.com
{
  "ip": "8.8.8.8",
  "hostname": "dns.google",
  "city": "Mountain View",
  "region": "California",
  "country": "US",
  "loc": "37.4056,-122.0775",
  "org": "AS15169 Google LLC",
  "postal": "94043",
  "timezone": "America/Los_Angeles"
}

Details and differences

  • Bearer tokens in the Authorization header are accepted as well as the token query parameter.
  • hostname is filled from a reverse DNS lookup when one exists.
  • The privacy and company objects from ipinfo's paid plans are not included; is_datacenter and is_proxy from our own IP endpoint are exposed under a mygeocode key instead.

If your client depends on a field or behaviour that is not listed here, tell us. Compatibility gaps get fixed quickly because they are usually small.

Other drop-in hosts

How the drop-ins work, the overview, and the JavaScript library drop-ins.