For developers & webmasters
PakWhois developer tools
Public WHOIS API
Read-only JSON. No API key required. Supports Pakistani .pk domains. Cross-origin GET requests are allowed. Personal contact information is never returned.
GET https://pakwhois.lovable.app/api/public/whois?domain=google.com.pkJavaScript
const response = await fetch(
"https://pakwhois.lovable.app/api/public/whois?domain=" + encodeURIComponent("google.com.pk")
);
const result = await response.json();
if (!response.ok) throw new Error(result.error || "Lookup unavailable");
console.log(result.status);Response example
Illustrative values; dates, nameservers and source may be missing when the registry fallback is used.
{
"domain": "example.pk",
"status": "Available",
"code": 101,
"registrationDate": null,
"expiryDate": null,
"nameservers": [],
"source": "pknic"
}Response fields & errors
- domain, status, code: normalized name and registry availability.
- registrationDate, expiryDate: registry dates or null.
- nameservers: array of hostnames; source: domainwhois, pknic, or none.
- 200: successful lookup. Codes 101 available, 102 registered, 103 expired.
- 400: invalid or missing .pk domain; code -2.
- 503: registry services unavailable; status Unknown, code -1.
Fair use
Successful responses can be cached for 60 seconds. Cache repeated requests, avoid bulk harvesting, and back off on errors. Availability is informational; PKNIC is the final authority.
Embeddable search widget
<iframe src="https://pakwhois.lovable.app/widget" title="PakWhois domain search" width="100%" height="220" style="border:0;max-width:640px" loading="lazy"></iframe>The widget opens WHOIS results in a new tab on PakWhois. Its search remains independent of your website.