JSON endpoint

You can call the API by sending HTTP GET requests to http://ip-api.com/json/{query}

{query} can be an IP address or a domain, or none to use the current IP address.


You can edit this query and experiment with the options

Actual response

Returned data

The API can return the following fields and values

If you don't require all the returned fields, use the GET parameter fields to specify which data should be returned.
Separate the fields by comma (fields=status,message,query,country,city) or use a generated, numeric value (to save bandwidth)

statussuccess or failsuccessstring
messageincluded only when status is fail
Can be one of the following: private range, reserved range, invalid query
invalid querystring
countryCountry nameUnited Statesstring
countryCodeTwo-letter country code ISO 3166-1 alpha-2USstring
regionRegion/state short code (FIPS or ISO)CA or 10string
cityCityMountain Viewstring
districtDistrict (subdivision of city)Old Farm Districtstring
zipZip code94043string
timezoneCity timezoneAmerica/Los_Angelesstring
ispISP nameGooglestring
orgOrganization nameGooglestring
asAS number and name, separated by spaceAS15169 Google Inc.string
reverseReverse DNS of the IPwi-in-f94.1e100.netstring
mobileMobile (cellular) connectiontruebool
proxyProxy (anonymous)truebool
queryIP used for the query173.194.67.94string
generated fields

generated numeric


Localized city, regionName and country can be requested by setting the GET parameter lang to one of the following:

lang (ISO 639)description
enEnglish (default)
deDeutsch (German)
esEspañol (Spanish)
pt-BREspañol - Argentina (Spanish)
frFrançais (French)
ja日本語 (Japanese)
zh-CN中国 (Chinese)
ruРусский (Russian)

Callback (JSONP)

By default there is no callback function called, but you can supply your own with the GET parameter callback

Example: http://ip-api.com/json/{query}?callback={callback}

Human usage

You can call ip-api.com, without /json/, from cURL, Wget and other CLI HTTP clients and get colourized, pretty printed JSON

Example: curl ip-api.com or curl ip-api.com/{query}

Usage limits

This endpoint is limited to 150 requests per minute from an IP address. If you go over this limit your IP address will be blackholed. You can unban here.

We do not allow commercial use of this endpoint. Please see our pro service for SSL access, unlimited queries and commercial support.