BKNS Whois API
REST API for WHOIS lookup and domain availability checking.
Supports 1,260+ TLDs · .vn data from official VNNIC · Latency < 200ms
All requests over HTTPS. JSON response, UTF-8 encoding.
Authentication
Attach your API key to the X-API-Key header in every request. Missing or invalid key → HTTP 401.
GET /api/v1/whois?domain=bkns.vn X-API-Key: bkns_par_xxxxxxxxxxxxxxxxxx Content-Type: application/json
Rate Limits
Request limits per tier. Exceeding the threshold → 429 Too Many Requests with a Retry-After header.
X-RateLimit-Limit: 300 X-RateLimit-Remaining: 0 X-RateLimit-Reset: 1711234567 Retry-After: 15
Error codes
GETWHOIS Lookup
Full WHOIS lookup: owner, registrar, creation/expiry dates, nameservers, EPP status.
Parameter / Type / Description
| Parameter | Type | Description |
|---|---|---|
| domain required | string | Domain to look up. Accepts ASCII (bkns.vn), punycode (xn--...), or Unicode IDN (münchen.de). Automatically normalizes to punycode. |
Response
{
"domain": "bkns.vn",
"tld": "vn",
"status": "registered",
"cached": true,
"cacheTtlRemaining": null,
"data": {
"registrant": {
"name": "Công ty Cổ phần Giải pháp Mạng Bạch Kim"
},
"registrar": {
"name": "Công ty cổ phần giải pháp mạng Bạch Kim"
},
"nameservers": ["ns1.bkdns.vn", "ns2.bkdns.vn", "ns3.bkdns.vn"],
"dates": {
"created": "2010-06-24T17:00:00.000Z",
"updated": null,
"expiry": "2030-06-24T17:00:00.000Z",
"renewalDeadline": null
},
"domainStatus": ["clientTransferProhibited"],
"dnssec": false
}
}GETDomain Check
Quickly check whether a domain is available. Faster than WHOIS as it only returns status.
Parameter / Type / Description
| Parameter | Type | Description |
|---|---|---|
| domain required | string | Domain to check. Accepts ASCII, punycode, or Unicode IDN. Automatically normalizes to punycode. |
{
"domain": "example-notexist.vn",
"tld": "vn",
"available": true,
"premium": false,
"cached": false
}POSTBulk WHOIS
Look up multiple domains in a single request. Maximum 20 domains/request. Requires Partner tier.
Request Body
{
"domains": ["bkns.vn", "google.com", "example.org"]
}Response
{
"results": [
{ "domain": "bkns.vn", "status": "registered", "data": { ... } },
{ "domain": "example.org", "status": "available" }
],
"total": 3,
"queryTime": 512
}Response Schema
Full structure of the WHOIS response object.
Top-level fields
data object (registered only)
Supported TLDs
1,260+ TLD types including all ccTLDs, popular gTLDs, and new gTLDs.
Code samples
WHOIS Lookup
const domain = 'bkns.vn'; const apiKey = 'YOUR_API_KEY'; const res = await fetch( `https://whois.bkns.vn/api/v1/whois?domain=${domain}`, { headers: { 'X-API-Key': apiKey } } ); if (!res.ok) throw new Error(`HTTP ${res.status}`); const data = await res.json(); // Always check status before accessing data.* if (data.status === 'registered') { console.log('Registrar:', data.data.registrar.name); console.log('Expires: ', data.data.dates.expiry); console.log('Nameservers:', data.data.nameservers.join(', ')); } else { console.log('Domain is not registered.'); }
Handle 429 — Retry with backoff
async function whoisWithRetry(domain, apiKey, maxRetries = 3) { for (let i = 0; i < maxRetries; i++) { const res = await fetch( `https://whois.bkns.vn/api/v1/whois?domain=${domain}`, { headers: { 'X-API-Key': apiKey } } ); if (res.status === 429) { const wait = Number(res.headers.get('Retry-After') ?? 5) * 1000; await new Promise(r => setTimeout(r, wait)); continue; } if (!res.ok) throw new Error(`HTTP ${res.status}`); return res.json(); } }
Contact
Need technical support or want to register a Partner API key?