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
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

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,
  "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')
  .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'));
var_dump($data);
Python detect tor spam ip
requests.get('http://ip-api.io/api/json')
Ruby get address by ip
require 'json'
require 'open-uri'

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

Features

Get geo ip information

We provide country, city, zip code, geo coordinates. ASN/network coming soon.

Filter unnecessary/malicious traffic

Our service returns the probability of IP address being a proxy, spammer, tor exit node, vpn or bot. We use sophisticated state of the art machine learning and data-science methods.

Fast and simple

Each request is usually served under 10ms. No registration/email required.

Plans & Pricing

€5

€10

per month

€50

per month