dqmainerdqmainer

API Documentation

GET /api/whois

Query Parameters

ParameterTypeRequiredDescription
domainstringYesDomain 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

FieldTypeDescription
foundbooleanWhether domain was found
registrarobjectRegistrar information
registrar.idstringRegistrar ID
registrar.namestringRegistrar name
registrar.emailstringRegistrar abuse contact email
statusstring[]EPP status codes
nameserversstring[]List of name servers
ts.createdstringRegistration creation date
ts.updatedstringLast update date
ts.expiresstringExpiration 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