WHOIS MK domains API

WHOIS MK domains API / MK Domain Checker

 

Basic information

Service that checks the registrants of the MK domains.

 

Token and service authentication

You need to be logged in user before you can use the service.

We simplified the login / registration in the easiest way possible. Only you need to sign in with your Google / Gmail account to continue. After logging into the token field (below) you will be able to use your personal token on PHP.mk services.

Personal Token

Login to show token!

 

Using the Service v1.0

Version ({version}): v1.0

Domain to check ({domain}): ?domain= e.g. "a1.mk"

service end-point

HTTP/GET

https://api.php.mk/whoismk/{version}?token={token}&domain={domain}

Example HTTP/GET request

https://api.php.mk/whoismk/v1.0?token=&domain=a1.mk

Example PHP

$url='https://api.php.mk/whoismk/v1.0?token=&domain=a1.mk';
$jsonResponse=file_get_contents($url);
$response= json_decode($jsonResponse,true);
            
echo '<pre>';
print_r($response['data']);
exit();

Example cUrl

curl -X GET  'https://api.php.mk/whoismk/v1.0?token=&domain=a1.mk';

Пример Javascript

var xhr = new XMLHttpRequest();
xhr.addEventListener("readystatechange", function () {
  if (this.readyState === 4) {
    var response_data=JSON.parse(this.responseText).data;
    console.log(response_data);
  }
});
xhr.open("GET", "https://api.php.mk/whoismk/v1.0?token=&domain=a1.mk");
xhr.send();

Пример jQuery / JavaScript

$.getJSON('https://api.php.mk/whoismk/v1.0?token=&domain=a1.mk',function(r){

    console.log(r.data);

}).fail(function(error){

    console.log(error.responseJSON.msg);

});

 

Service response

The answer is always in JSON format

The response from the service is in JSON format and contains TXT version, HTML version and items ie. array of data.

Example response

{
    "error": false,
    "status_text": "OK",
    "status_code": 200,
    "data": {
        "text": "Registrant: UNET-R2505\nAdministrative conta...",
        "html": "Registrant: <strong>UNET-R2505<\/strong><br>Administrative contact: <strong>UNET-C2338<\/strong><br>Nameserver set...",
        "items": [
            {
                "key": "Registrant",
                "value": "UNET-R2505"
            },
            {
                "key": "Administrative contact",
                "value": "UNET-C2338"
            },
            {
                "key": "Nameserver set",
                "value": "UNET-NS3563"
            },
            {
                "key": "Registar",
                "value": "UNET-REG"
            },
            {
                "key": "Date of registration",
                "value": "08.01.2014 13:00:00"
            },
            {
                "key": "Changes",
                "value": "23.04.2018 17:32:05"
            },
            {
                "key": "Valid until",
                "value": "08.01.2021"
            },
            {
                "key": "Contct",
                "value": "UNET-R2505"
            },
            {
                "key": "Organisation",
                "value": "A1 Telekom Austria AG"
            },
            {
                "key": "Name",
                "value": "A1 Telekom Austria AG"
            },
            {
                "key": "Address",
                "value": "Lassallestrasse 9, Wien, 1020, AT"
            },
            {
                "key": "Phone",
                "value": "+43.5066422646"
            }...

Example response (when domain is not registered)

{
    "error": true,
    "status_text": "error",
    "status_code": 202,
    "msg": "Доменот `xxxxxxxxxx123.mk` не е регистриран!"
}

Example response (when there is an error - when the domain is invalid or out of the MK zone)

{
    "error": true,
    "status_text": "error",
    "status_code": 500,
    "status_msg": null,
    "msg": "Доменот `dfdsfsdfsf.netet` не може да се провери во MK зоната!"
}