Overview

Our public API provides a simple RESTful interface to perform WHOIS lookups for domains. It returns structured JSON data containing registration details, expiry dates, and registrar information.

Authentication Required: An API Key is required for all requests. You can find your key in your Dashboard.
Rate Limit: 10 requests per minute per authenticated user.

Endpoint

GET/POST https://whois.yatosha.com/api/whois

Parameters

Parameter Type Required Description
domain String Yes The domain name to lookup (e.g., example.com)

Authentication

Authenticate your requests by passing your API key in the Authorization header as a Bearer token:

Authorization: Bearer YOUR_API_KEY

Example Usage

curl -G https://whois.yatosha.com/api/whois \
    -H "Authorization: Bearer YOUR_API_KEY" \
    --data-urlencode "domain=example.com"
<?php
$apiKey = 'YOUR_API_KEY';
$domain = 'example.com';
$url = 'https://whois.yatosha.com/api/whois?domain=' . urlencode($domain);

$options = [
    'http' => [
        'header' => "Authorization: Bearer $apiKey\r\n"
    ]
];
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$data = json_decode($response, true);

print_r($data);

Success Response

{
    "success": true,
    "domain": "example.com",
    "result": {
        "raw_whois": "...",
        "expiry_date": "2025-08-13",
        "registrar": "Example Registrar Inc."
    }
}