NAV IP Find Navbar
IP Find Logo
CURL Ruby PHP Javascript C# (.Net) Python

IP Requests

require 'open-uri'
require 'json'

request_uri = 'https://api.ipfind.com'
ip_address = '8.8.8.8'
auth = 'YOUR_API_KEY_HERE'
url = "#{request_uri}?ip=#{ip_address}&auth=#{auth}"
document = open(url).read
result = JSON.parse(document)

<?php
$request_uri = 'https://api.ipfind.com';
$ip_address = '8.8.8.8';
$auth = 'YOUR_API_KEY_HERE';
$url = $request_uri . "?ip=" . $ip_address . "&auth=" . $auth;
$document = file_get_contents($url);
$result = json_decode($document);
?>
var xmlhttp = new XMLHttpRequest();
var ip_address = '8.8.8.8';
var auth = 'YOUR_API_KEY_HERE';
var url = "https://api.ipfind.com/?auth=" + auth + "&ip=" + ip_address;

xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
      var result = JSON.parse(this.responseText);
      console.log(result);
    }
};

xmlhttp.open("GET", url, true);
xmlhttp.send();
curl "https://api.ipfind.com?ip=8.8.8.8&auth=YOUR_API_KEY_HERE"
  using (var webClient = new System.Net.WebClient()) {
      string ip_address = "8.8.8.8";
      string auth = "YOUR_API_KEY_HERE";
      string URL = "https://api.ipfind.com/?auth=" + auth + "&ip=" + ip_address;

      var json = webClient.DownloadString(URL);
      // Now parse with JSON.Net
  }
import urllib, json
ip_address = '8.8.8.8';
auth = 'YOUR_API_KEY_HERE';
url = 'https://api.ipfind.com/?auth=' + auth + '&ip=' + ip_address;
response = urllib.urlopen(url)
data = json.loads(response.read())
print data

The above command returns JSON structured like this:

{
  "ip_address": "8.8.8.8",
  "country": "United States",
  "country_code": "US",
  "continent": "North America",
  "continent_code": "NA",
  "city": "Mountain View",
  "county": "Santa Clara County",
  "region": "California",
  "region_code": "CA",
  "timezone": "America/Los_Angeles",
  "longitude": -122.0838,
  "latitude": 37.386,
  "currency": "USD",
  "languages": [
    "en-US",
    "es-US",
    "haw",
    "fr"
  ]
}

GET https://api.ipfind.com?ip=X.X.X.X&auth=YOUR_API_KEY_HERE

This endpoint retrieves the IP metadata for a given IP

IP Find uses API keys to allow access to the API. You can register a new IP Find API key at our Developer Dashboard.

IP Find expects for the API key to be included in all API requests to the server in a header that looks like the following:

Query Parameters

Parameter Description
ip A valid IPv4 address
auth Your API key you’ve retrieved from your account dashboard

Multi-lingual results

require 'open-uri'
require 'json'

request_uri = 'https://api.ipfind.com'
ip_address = '8.8.8.8'
auth = 'YOUR_API_KEY_HERE'
# Hindi
lang = 'hi'
url = "#{request_uri}?ip=#{ip_address}&auth=#{auth}&lang=#{lang}"
document = open(url).read
result = JSON.parse(document)

<?php
$request_uri = 'https://api.ipfind.com';
$ip_address = '8.8.8.8';
$auth = 'YOUR_API_KEY_HERE';
$lang = 'hi'; // Hindi
$url = $request_uri . "?ip=" . $ip_address . "&auth=" . $auth . "&lang=" . $lang;
$document = file_get_contents($url);
$result = json_decode($document);
?>
var xmlhttp = new XMLHttpRequest();
var ip_address = '8.8.8.8';
var auth = 'YOUR_API_KEY_HERE';
var lang = 'hi'; // Hindi
var url = "https://api.ipfind.com/?auth=" + auth + "&ip=" + ip_address + '&lang=' + lang;

xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
      var result = JSON.parse(this.responseText);
      console.log(result);
    }
};

xmlhttp.open("GET", url, true);
xmlhttp.send();
  using (var webClient = new System.Net.WebClient()) {
      string ip_address = "8.8.8.8";
      string auth = "YOUR_API_KEY_HERE";
      string lang = "hi"; // Hindi
      string request_url = "https://api.ipfind.com/";
      string URL = request_url + "?auth=" + auth + "&ip=" + ip_address + "&lang=" + lang;

      var json = webClient.DownloadString(URL);
      // Now parse with JSON.Net
  }
import urllib, json
ip_address = '8.8.8.8'
auth = 'YOUR_API_KEY_HERE'
lang = 'hi'
url = 'https://api.ipfind.com/?auth=' + auth + '&ip=' + ip_address + '&lang=' + lang;
response = urllib.urlopen(url)
data = json.loads(response.read())
print data
curl "https://api.ipfind.com?ip=8.8.8.8&auth=YOUR_API_KEY_HERE&lang=hi"

The above command with lang specified as “hi” returns JSON in Hindi structured like this.

If a name can’t be found with this language it will fall back to English

{
  "ip_address": "203.122.35.1",
  "country": "भारत",
  "country_code": "IN",
  "continent": "एशिया महाद्वीप",
  "continent_code": "AS",
  "city": "Gurgaon",
  "county": "गुड़गांव जिला",
  "region": "हरियाणा",
  "region_code": "10",
  "timezone": "Asia/Kolkata",
  "owner": null,
  "longitude": 77.0333,
  "latitude": 28.4667,
  "currency": "INR",
  "languages": [
    "en-IN",
    "hi",
    "bn",
    "te",
    "mr",
    "ta",
    "ur",
    "gu",
    "kn",
    "ml",
    "or",
    "pa",
    "as",
    "bh",
    "sat",
    "ks",
    "ne",
    "sd",
    "kok",
    "doi",
    "mni",
    "sit",
    "sa",
    "fr",
    "lus",
    "inc"
  ]
}

GET https://api.ipfind.com?ip=X.X.X.X&auth=YOUR_API_KEY_HERE&lang=XX

This endpoint retrieves the IP metadata for a given IP. If you pass in a a “lang” param with a valid iso eg. “en”, “fr”, “it”, “de”. Language will fallback to English when your chosen language is unavailable.

Full list of valid languages: see here:

ISO Name Language
aa Afar
ab Abkhazian
ae Avestan
af Afrikaans
ak Akan
am Amharic
an Aragonese
ar Arabic
as Assamese
av Avaric
ay Aymara
az Azerbaijani
ba Bashkir
be Belarusian
bg Bulgarian
bh Bihari
bi Bislama
bm Bambara
bn Bengali
bo Tibetan
br Breton
bs Bosnian
ca Catalan
ce Chechen
ch Chamorro
co Corsican
cr Cree
cs Czech
cu Church Slavic
cv Chuvash
cy Welsh
da Danish
de German
dv Dhivehi
dz Dzongkha
ee Ewe
el Modern Greek (1453-)
en English
eo Esperanto
es Spanish
et Estonian
eu Basque
fa Persian
ff Fulah
fi Finnish
fj Fijian
fo Faroese
fr French
fy Western Frisian
ga Irish
gd Scottish Gaelic
gl Galician
gn Guarani
gu Gujarati
gv Manx
ha Hausa
he Hebrew
hi Hindi
ho Hiri Motu
hr Croatian
ht Haitian
hu Hungarian
hy Armenian
hz Herero
ia Interlingua (International Auxiliary Language Association)
id Indonesian
ie Interlingue
ig Igbo
ii Sichuan Yi
ik Inupiaq
io Ido
is Icelandic
it Italian
iu Inuktitut
ja Japanese
jv Javanese
ka Georgian
kg Kongo
ki Kikuyu
kj Kuanyama
kk Kazakh
kl Kalaallisut
km Central Khmer
kn Kannada
ko Korean
kr Kanuri
ks Kashmiri
ku Kurdish
kv Komi
kw Cornish
ky Kirghiz
la Latin
lb Luxembourgish
lg Ganda
li Limburgan
ln Lingala
lo Lao
lt Lithuanian
lu Luba-Katanga
lv Latvian
mg Malagasy
mh Marshallese
mi Maori
mk Macedonian
ml Malayalam
mn Mongolian
mr Marathi
ms Malay (macrolanguage)
mt Maltese
my Burmese
na Nauru
nb Norwegian Bokmål
nd North Ndebele
ne Nepali (macrolanguage)
ng Ndonga
nl Dutch
nn Norwegian Nynorsk
no Norwegian
nr South Ndebele
nv Navajo
ny Nyanja
oc Occitan (post 1500)
oj Ojibwa
om Oromo
or Oriya (macrolanguage)
os Ossetian
pa Panjabi
pi Pali
pl Polish
ps Pushto
pt Portuguese
qu Quechua
rm Romansh
rn Rundi
ro Romanian
ru Russian
rw Kinyarwanda
sa Sanskrit
sc Sardinian
sd Sindhi
se Northern Sami
sg Sango
sh Serbo-Croatian
si Sinhala
sk Slovak
sl Slovenian
sm Samoan
sn Shona
so Somali
sq Albanian
sr Serbian
ss Swati
st Southern Sotho
su Sundanese
sv Swedish
sw Swahili (macrolanguage)
ta Tamil
te Telugu
tg Tajik
th Thai
ti Tigrinya
tk Turkmen
tl Tagalog
tn Tswana
to Tonga (Tonga Islands)
tr Turkish
ts Tsonga
tt Tatar
tw Twi
ty Tahitian
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
ve Venda
vi Vietnamese
vo Volapük
wa Walloon
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
za Zhuang
zh Chinese
zu Zulu

IP Find uses API keys to allow access to the API. You can register a new IP Find API key at our Developer Dashboard.

IP Find expects for the API key to be included in all API requests to the server in a header that looks like the following:

Get the Current User or client’s IP Location

require 'open-uri'
require 'json'

request_uri = 'https://api.ipfind.com/me'
auth = 'YOUR_API_KEY_HERE'
ip_info = "#{request_uri}?auth=#{auth}"

<?php
$request_uri = 'https://api.ipfind.com/me';
$auth = 'YOUR_API_KEY_HERE';
$url = $request_uri . "?auth=" . $auth;
$ip_info = file_get_contents($url);
?>
var xmlhttp = new XMLHttpRequest();
var auth = 'YOUR_API_KEY_HERE';
var url = "https://api.ipfind.com/me?auth=" + auth;
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
      var result = JSON.parse(this.responseText);
      console.log(result);
    }
};
xmlhttp.open("GET", url, true);
xmlhttp.send();
  using (var webClient = new System.Net.WebClient()) {
      string auth = "YOUR_API_KEY_HERE";
      string URL = "https://api.ipfind.com/me?auth=" + auth;

      var json = webClient.DownloadString(URL);
      // Now parse with JSON.Net
  }
import urllib, json
auth = 'YOUR_API_KEY_HERE'
url = 'https://api.ipfind.com/me?auth=' + auth;
response = urllib.urlopen(url)
data = json.loads(response.read())
print data
curl "https://api.ipfind.com/me?auth=YOUR_API_KEY_HERE"

The above command returns the meta data for the IP address of the request client: eg.

{
  "ip_address": "8.8.8.8",
  "country": "United States",
  "country_code": "US",
  "continent": "North America",
  "continent_code": "NA",
  "city": "Mountain View",
  "county": "Santa Clara County",
  "region": "California",
  "region_code": "CA",
  "timezone": "America/Los_Angeles",
  "longitude": -122.0838,
  "latitude": 37.386,
  "currency": "USD",
  "languages": [
    "en-US",
    "es-US",
    "haw",
    "fr"
  ]
}

GET https://api.ipfind.com/me?auth=YOUR_API_KEY_HERE

Query Parameters

Parameter Description
ip A valid IPv4 address
auth Your API key you’ve retrieved from your account dashboard

Get a country flag from an IP address

require 'open-uri'
require 'json'

request_uri = 'https://api.ipfind.com/flag'
ip_address = '8.8.8.8'
auth = 'YOUR_API_KEY_HERE'
flag = "#{request_uri}?ip=#{ip_address}&auth=#{auth}"

<?php
$request_uri = 'https://api.ipfind.com/flag';
$ip_address = '8.8.8.8';
$auth = 'YOUR_API_KEY_HERE';
$url = $request_uri . "?ip=" . $ip_address . "&auth=" . $auth;
$flag = file_get_contents($url);
?>
var ip_address = '8.8.8.8';
var auth = 'YOUR_API_KEY_HERE';
var imgSrc = "https://api.ipfind.com/flag?auth=" + auth + "&ip=" + ip_address;
string ip_address = "8.8.8.8";
string auth = "YOUR_API_KEY_HERE";
string imgSrc = "https://api.ipfind.com/flag?auth=" + auth + "&ip=" + ip_address;
ip_address = '8.8.8.8'
auth = 'YOUR_API_KEY_HERE'
imgSrc = 'https://api.ipfind.com/flag?auth=' + auth + '&ip=' + ip_address;
curl "https://api.ipfind.com/flag?ip=8.8.8.8&auth=YOUR_API_KEY_HERE"

The above command redirects to an image like this: https://api.ipfind.com/flag/64/us.png

GET https://api.ipfind.com/flag?ip=X.X.X.X&auth=YOUR_API_KEY_HERE


Flag from IP Address

Query Parameters

Parameter Description
ip A valid IPv4 address
auth Your API key you’ve retrieved from your account dashboard