Developer Documentation

  • CURL
  • Node.js
  • jQuery
  • Python
  • Ruby
Getting Started

Use the IP lookup API to quickly and simply integrate IP geolocation into your script or website. Save yourself the hassle of setting up local GeoIP libraries and having to remember to regularly update the data.

{ "ip": "", "hostname": "", "city": "Ho Chi Minh City", "region": "Ho Chi Minh City", "country": "VN", "loc": "10.8142,106.6438", "org": "AS45903 CMC Telecom Infrastructure Company" }
Full IP Details

When called from the command line or a script we will return a JSON response with all of the IP details that you see on the website. You can pass in the IP you're interested in, or ommit it to get details about your own IP.

{ "ip": "", "hostname": "", "loc": "37.385999999999996,-122.0838", "org": "AS15169 Google Inc.", "city": "Mountain View", "region": "California", "country": "US", "phone": 650 }

We do a little bit of magic on the server to determine if we should send the JSON response or the webpage. We usually get it right, but if you're seeing the webpage instead of the JSON (or want to check the JSON output in a browser) you can force the JSON response by adding /json to the end of the URL, eg: for your own IP for details on another IP

Specific fields

If you're only interested in specific details you can add a field to get a plain text response that includes just the field you're after.

curl AS15169 Google Inc.
curl Mountain View

You can also specify /geo to get just the geolocation information, which will often be faster than getting the full response.

{ "ip": "", "loc": "37.385999999999996,-122.0838", "city": "Mountain View", "region": "California", "country": "US" }
JSONP Requests

JSONP is also supported, which allows you to use entirely in client-side code. You just need to specify the callback parameter, eg. Most javascript libraries will automatically handle this for you though. Here's a jQuery example that logs the client IP and country:

$.get("", function(response) { console.log(response.ip,; }, "jsonp")
IPv6 Support

We support looking up data for IPv6 addresses, but we don't support IPv6 connections due to us using Amazon AWS. As soon as Amazon add support for IPv6 we'll support it!

{ "ip": "2601:9:7680:363:75df:f491:6f85:352f", "hostname": "No Hostname", "city": null, "region": null, "country": "US", "loc": "38.0000,-97.0000", "org": "AS7922 Comcast Cable Communications, Inc." }
Rate Limits

Free usage of our API is limited to 1,000 API requests per day. If you exceed 1,000 requests in a 24 hour period we'll return a 429 HTTP status code to you. If you need to make more requests or custom data, see our paid plans, which all have soft limits.

Terms of Use

This is all provided as-is, with no guarantees on availability or accuracy of the results. We'll certainly do our best to make the service highly-available though, and the results accurate. You can use it for any purpose. Attribution is not required, but is appreciated.