We are no longer accepting new registration in IP2WHOIS. For new registration, please visit ip2location.io.
Sign Up for a FREE API NowGET https://api.ip2whois.com/v2
Parameter | Type | Description |
---|---|---|
key | string | (required) WHOIS lookup API license key. |
domain | string | (required) Domain name. |
format | string | (optional) Returns the API response in json (default) or xml format. Valid values: json | xml |
Parameter | Type | Description |
---|---|---|
domain | string | Domain name. |
domain_id | string | Domain name ID. |
status | string | Domain name status. |
create_date | string | Domain name creation date. |
update_date | string | Domain name updated date. |
expire_date | string | Domain name expiration date. |
domain_age | integer | Domain name age in day(s). |
whois_server | string | WHOIS server name. |
registrar.iana_id | string | Registrar IANA ID. |
registrar.name | string | Registrar name. |
registrar.url | string | Registrar URL. |
registrant.name | string | Registrant name. |
registrant.organization | string | Registrant organization. |
registrant.street_address | string | Registrant street address. |
registrant.city | string | Registrant city. |
registrant.region | string | Registrant region. |
registrant.zip_code | string | Registrant ZIP Code. |
registrant.country | string | Registrant country. |
registrant.phone | string | Registrant phone number. |
registrant.fax | string | Registrant fax number. |
registrant.email | string | Registrant email address. |
admin.name | string | Admin name. |
admin.organization | string | Admin organization. |
admin.street_address | string | Admin street address. |
admin.city | string | Admin city. |
admin.region | string | Admin region. |
admin.zip_code | string | Admin ZIP Code. |
admin.country | string | Admin country. |
admin.phone | string | Admin phone number. |
admin.fax | string | Admin fax number. |
admin.email | string | Admin email address. |
tech.name | string | Tech name. |
tech.organization | string | Tech organization. |
tech.street_address | string | Tech street address. |
tech.city | string | Tech city. |
tech.region | string | Tech region. |
tech.zip_code | string | Tech ZIP Code. |
tech.country | string | Tech country. |
tech.phone | string | Tech phone number. |
tech.fax | string | Tech fax number. |
tech.email | string | Tech email address. |
billing.name | string | Billing name. |
billing.organization | string | Billing organization. |
billing.street_address | string | Billing street address. |
billing.city | string | Billing city. |
billing.region | string | Billing region. |
billing.zip_code | string | Billing ZIP Code. |
billing.country | string | Billing country. |
billing.phone | string | Billing phone number. |
billing.fax | string | Billing fax number. |
billing.email | string | Billing email address. |
nameservers | array | Name servers |
curl "https://api.ip2whois.com/v2?key={your_license_key}&domain={domain_name}"
Sample codes for other languages
{
"domain": "locaproxy.com",
"domain_id": "1710914405_DOMAIN_COM-VRSN",
"status": "clientTransferProhibited https:\/\/icann.org\/epp#clientTransferProhibited",
"create_date": "2012-04-03T02:34:32Z",
"update_date": "2021-12-03T02:54:57Z",
"expire_date": "2024-04-03T02:34:32Z",
"domain_age": 3863,
"whois_server": "whois.godaddy.com",
"registrar": {
"iana_id": "146",
"name": "GoDaddy.com, LLC",
"url": "https:\/\/www.godaddy.com"
},
"registrant": {
"name": "Registration Private",
"organization": "Domains By Proxy, LLC",
"street_address": "DomainsByProxy.com",
"city": "Tempe",
"region": "Arizona",
"zip_code": "85284",
"country": "US",
"phone": "+1.4806242599",
"fax": "+1.4806242598",
"email": "Select Contact Domain Holder link at https:\/\/www.godaddy.com\/whois\/results.aspx?domain=LOCAPROXY.COM"
},
"admin": {
"name": "Registration Private",
"organization": "Domains By Proxy, LLC",
"street_address": "DomainsByProxy.com",
"city": "Tempe",
"region": "Arizona",
"zip_code": "85284",
"country": "US",
"phone": "+1.4806242599",
"fax": "+1.4806242598",
"email": "Select Contact Domain Holder link at https:\/\/www.godaddy.com\/whois\/results.aspx?domain=LOCAPROXY.COM"
},
"tech": {
"name": "Registration Private",
"organization": "Domains By Proxy, LLC",
"street_address": "DomainsByProxy.com",
"city": "Tempe",
"region": "Arizona",
"zip_code": "85284",
"country": "US",
"phone": "+1.4806242599",
"fax": "+1.4806242598",
"email": "Select Contact Domain Holder link at https:\/\/www.godaddy.com\/whois\/results.aspx?domain=LOCAPROXY.COM"
},
"billing": {
"name": "",
"organization": "",
"street_address": "",
"city": "",
"region": "",
"zip_code": "",
"country": "",
"phone": "",
"fax": "",
"email": ""
},
"nameservers": [
"vera.ns.cloudflare.com",
"walt.ns.cloudflare.com"
]
}
You may use our official SDK to assist you in code implementation
<?php
$apiKey = 'Enter_License_Key';
$params['domain'] = 'Enter_Domain_Name';
$params['format'] = 'json';
$query = '';
foreach($params as $key=>$value){
$query .= '&' . $key . '=' . rawurlencode($value);
}
$result = file_get_contents('https://api.ip2whois.com/v2?key=' . $apiKey . $query);
$data = json_decode($result);
print_r($data);
?>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Hashtable;
import java.util.Map;
public class test {
public static void main(String[] args) {
try {
String key = "Enter_License_Key";
Hashtable<String, String> data = new Hashtable<String, String>();
data.put("domain", "Enter_Domain_Name");
data.put("format", "json");
String datastr = "";
for (Map.Entry<String,String> entry : data.entrySet()) {
datastr += "&" + entry.getKey() + "=" + URLEncoder.encode(entry.getValue(), "UTF-8");
}
URL url = new URL("https://api.ip2whois.com/v2?key=" + key + datastr);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestMethod("GET");
conn.setRequestProperty("Accept", "application/json");
if (conn.getResponseCode() != 200) {
throw new RuntimeException("Failed : HTTP error code : " + conn.getResponseCode());
}
BufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));
String output;
while ((output = br.readLine()) != null) {
System.out.println(output);
}
conn.disconnect();
}
catch (MalformedURLException e) {
e.printStackTrace();
}
catch (IOException e) {
e.printStackTrace();
}
}
}
Imports System.Net
Imports System.IO
Imports System.Uri
Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim request As HttpWebRequest = Nothing
Dim response As HttpWebResponse = Nothing
Dim apiKey As String = "Enter_License_Key"
Dim data As New Dictionary(Of String, String)
data.Add("domain", "Enter_Domain_Name")
data.Add("format", "json")
Dim datastr As String = String.Join("&", data.[Select](Function(x) x.Key & "=" & EscapeDataString(x.Value)).ToArray())
request = Net.WebRequest.Create("https://api.ip2whois.com/v2?key=" & apiKey & "&" & datastr)
request.Method = "GET"
response = request.GetResponse()
Dim reader As System.IO.StreamReader = New IO.StreamReader(response.GetResponseStream())
Page.Response.Write(reader.ReadToEnd)
End Sub
End Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Net;
using System.IO;
namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
WebRequest request = null;
WebResponse response = null;
string apiKey = "Enter_License_Key";
Dictionary<string, string> data = new Dictionary<string, string>();
data.Add("domain", "Enter_Domain_Name");
data.Add("format", "json");
string datastr = string.Join("&", data.Select(x => x.Key + "=" + System.Uri.EscapeDataString(x.Value)).ToArray());
request = System.Net.WebRequest.Create("https://api.ip2whois.com/v2?key=" + apiKey + "&" + datastr);
request.Method = "GET";
response = request.GetResponse();
System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream());
Page.Response.Write(reader.ReadToEnd());
}
}
}
import urllib.parse, http.client
p = { 'key': 'Enter_License_Key', 'domain': 'Enter_Domain_Name', 'format': 'json' }
conn = http.client.HTTPSConnection("api.ip2whois.com")
conn.request("GET", "/v2?" + urllib.parse.urlencode(p))
res = conn.getresponse()
print res.read()
require 'uri'
require 'net/http'
uri = URI.parse("https://api.ip2whois.com/v2")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri)
request.set_form_data({
'key' => 'Enter_License_Key',
'domain' => 'Enter_Domain_Name',
'format' => 'json'
})
response = http.request(request)
if response == nil
return false
else
return response
end
var https = require('https');
let data = {
key: 'Enter_License_Key',
domain: 'Enter_Domain_Name',
format: 'json',
};
let urlStr = 'https://api.ip2whois.com/v2?';
Object.keys(data).forEach(function (key, index) {
if (this[key] != '') {
urlStr += key + '=' + encodeURIComponent(this[key]) + '&';
}
}, data);
urlStr = urlStr.substring(0, urlStr.length - 1);
let d = '';
let req = https.get(urlStr, function (res) {
res.on('data', (chunk) => (d = d + chunk));
res.on('end', function () {
console.log(JSON.parse(d));
});
});
req.on('error', function (e) {
console.log(e);
});
error_code | error_message |
---|---|
10000 | Missing parameter. |
10001 | API key not found. |
10002 | API key disabled. |
10003 | API key expired. |
10004 | Insufficient credits. |
10005 | Unknown error. |
10006 | No data found. |
10007 | Invalid domain. |
10008 | Invalid format. |
{
"error": {
"error_code": 10000,
"error_message": "Missing parameter."
}
}