API Documentation
GET /api/whois
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| domain | string | Yes | Domain name(s) to query (comma-separated) |
Request Example
curl "http://localhost:3000/api/whois?domain=example.com"
Request Example (Multiple Domains)
curl "http://localhost:3000/api/whois?domain=example.com,itea.dev"
Response Example
{
"example.com": {
"found": true,
"registrar": {
"id": "TEST-REGISTRAR",
"name": "Example Registrar",
"email": "[email protected]"
},
"status": ["clientDeleteProhibited", "clientTransferProhibited"],
"nameservers": ["ns1.example.com", "ns2.example.com"],
"ts": {
"created": "2020-01-01T00:00:00.000Z",
"updated": "2024-01-01T00:00:00.000Z",
"expires": "2025-01-01T00:00:00.000Z"
}
},
"itea.dev": {
"found": true,
"registrar": {
"id": "DEV-REGISTRAR",
"name": "Dev Registrar"
},
"status": [],
"nameservers": [],
"ts": {}
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| found | boolean | Whether domain was found |
| registrar | object | Registrar information |
| registrar.id | string | Registrar ID |
| registrar.name | string | Registrar name |
| registrar.email | string | Registrar abuse contact email |
| status | string[] | EPP status codes |
| nameservers | string[] | List of name servers |
| ts.created | string | Registration creation date |
| ts.updated | string | Last update date |
| ts.expires | string | Expiration date |
Error Responses
// 400 - Bad Request
{ "error": "Invalid domain format" }
// 500 - Server Error
{ "error": "Query failed, please try again later" }Usage Notes
1. Supports batch queries with comma-separated domain names
2. API uses RDAP and WHOIS protocols for lookups
3. Response data is normalized
4. Current version only supports domain names, not IP addresses