Demo

Your ip is 192.50.136.139

Country United States
Region WA
City Mukilteo
Zip/Postal code 98275
Latitude/Longitude 47.913, -122.3042
Time zone America/Los_Angeles
Organisation ACME LLC
Flag url https://ip-api.io/images/flags/us.svg
Emoji flag 🇺🇸
Currency symbol $
Currency USD,USN,USS
Calling code 1
Country capital Washington D.C.
Is proxy false
Is proxy false
Is spammer false
Mukilteo, WA, USA

How to use the API

REST API supports standard GET requests with several parameters:

https://ip-api.io/{format}/{IP-address}?api_key={YOUR_API_KEY}

Currently only JSON format is supported, XML to be added soon.

Example request: https://ip-api.io/json/1.2.3.4?api_key=YOUR_API_KEY

Example response:

{
  "ip": "192.30.253.113",
  "country_code": "US",
  "country_name": "United States",
  "region_code": "CA",
  "region_name": "California",
  "city": "San Francisco",
  "zip_code": "94107",
  "time_zone": "America/Los_Angeles",
  "latitude": 37.7697,
  "longitude": -122.3933,
  "metro_code": 1,
  "organisation": "ACME LLC",
  "flagUrl": "https://ip-api.io/images/flags/us.svg",
  "emojiFlag": "🇺🇸",
  "currencySymbol": "$",
  "currency": "USD,USN,USS",
  "callingCode": "1",
  "countryCapital": "Washington D.C.",
  "suspicious_factors": {
    "is_proxy": true,
    "is_tor_node": true,
    "is_spam": true,
    "is_suspicious": true // true if any of other fields (is_proxy, is_tor_node, is_spam) is true
    // "is_bot" and "is_vpn" to be added soon
  }
}

Get country from IP

Geo location by IP: code examples

Node.js get location by IP example
const request = require('request-promise')

request('http://ip-api.io/api/json?api_key=YOUR_API_KEY')
  .then(response => console.log(JSON.parse(response)))
  .catch(err => console.log(err))
PHP prevent scraping example
$data = json_decode(file_get_contents('http://ip-api.io/api/json?api_key=YOUR_API_KEY'));
var_dump($data);
Python detect tor spam ip
requests.get('http://ip-api.io/api/json?api_key=YOUR_API_KEY')
Ruby get address by ip
require 'json'
require 'open-uri'

JSON.parse(open('http://ip-api.io/api/json?api_key=YOUR_API_KEY').read)
Kotlin ip geo location example
val result = URL("http://ip-api.io/api/json?api_key=YOUR_API_KEY").readText()

Features

Get geo ip information and more

Get country, city, zip code, latitude, longitude by ip. Get ASN/network by ip.

Get timezone by ip, currency by ip, phone code, flag by ip.

Filter malicious traffic by ip

Ip-api.io returns probability of ip address to be a spammer, bot, proxy, crawler or a tor node.

Fast and simple

Each request is usually served under 10ms.

Simple Pricing

€10

per month

€45

per month

€80

€49

per month

€99

per month

€199

per month

Free plan ‐ 12000 queries per month, limited support. Obtain an api key!