WHOIS lookup for domain/IP/ASN
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.dazrik.net/whois?target=example.com"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.dazrik.net/whois?target=example.com")) .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.dazrik.net/whois?target=example.com") .get() .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.dazrik.net/whois', params: {target: 'example.com'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.dazrik.net/whois?target=example.com';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.dazrik.net/whois";
let querystring = [ ("target", "example.com"), ];
let client = reqwest::Client::new(); let response = client.get(url) .query(&querystring) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url 'https://api.dazrik.net/whois?target=example.com'Returns registration data for a domain, public IP address, or ASN such as AS15169. Hostnames are reduced to their registrable domain, so www.example.com looks up example.com. The fields in data depend on the target type. Unavailable fields are omitted, and registrant details are included only when disclosed.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Domain/hostname, IP address, or ASN (e.g. ‘AS15169’).
Example
example.comResponses
Section titled “Responses”Registration data for the target type
object
Domain registration data. All fields are optional; unavailable or undisclosed fields are omitted.
object
Registration creation date, in ISO 8601 when available; otherwise the reported date string
Last registration update, in ISO 8601 when available; otherwise the reported date string
Registration expiry date, in ISO 8601 when available; otherwise the reported date string
IP registration data. All fields are optional; unavailable fields are omitted.
object
Registration date, in ISO 8601 when available; otherwise the reported date string
Last registration update, in ISO 8601 when available; otherwise the reported date string
ASN registration data. All fields are optional; unavailable fields are omitted.
object
Registration date, in ISO 8601 when available; otherwise the reported date string
Last registration update, in ISO 8601 when available; otherwise the reported date string
Example
{ "ok": true, "query": "example.com", "data": { "domainName": "EXAMPLE.COM", "domainStatus": [ "clientTransferProhibited" ], "dnssec": "signedDelegation" }}Headers
Section titled “Headers”Request budget for the current window: limit, remaining, and reset (seconds until the window resets). Returned by known GET endpoints.
Example
limit=60, remaining=59, reset=42Maximum requests allowed per client IP per window (60 requests per 60s).
Example
60Requests remaining in the current window before the limit is hit.
Example
59Seconds until the current window resets.
Example
42Missing or invalid parameter
Error response.
object
Example
{ "ok": false, "msg": "query param target is required"}Headers
Section titled “Headers”Request budget for the current window: limit, remaining, and reset (seconds until the window resets). Returned by known GET endpoints.
Example
limit=60, remaining=59, reset=42Maximum requests allowed per client IP per window (60 requests per 60s).
Example
60Requests remaining in the current window before the limit is hit.
Example
59Seconds until the current window resets.
Example
42Target resolves to a private/reserved address
Error response.
object
Example
{ "ok": false, "msg": "target doesn't resolve to a public addr"}Headers
Section titled “Headers”Request budget for the current window: limit, remaining, and reset (seconds until the window resets). Returned by known GET endpoints.
Example
limit=60, remaining=59, reset=42Maximum requests allowed per client IP per window (60 requests per 60s).
Example
60Requests remaining in the current window before the limit is hit.
Example
59Seconds until the current window resets.
Example
42The request limit of 60 requests per minute per client IP was reached, or /connect or /website requests to the same destination are temporarily limited. The per-client request limit includes Retry-After, the number of seconds until the request budget resets. Destination-limit responses omit that header. A destination limit can apply even when RateLimit-Remaining is greater than zero.
Error response.
object
Example
{ "ok": false, "msg": "you're being rate limited, try again later."}Headers
Section titled “Headers”Request budget for the current window: limit, remaining, and reset (seconds until the window resets). Returned by known GET endpoints.
Example
limit=60, remaining=59, reset=42Maximum requests allowed per client IP per window (60 requests per 60s).
Example
60Requests remaining in the current window before the limit is hit.
Example
59Seconds until the current window resets.
Example
42Seconds to wait before retrying after the per-client request limit is reached. Destination connection limits can return HTTP 429 without this header.
Example
42Lookup failed
object
Example
{ "ok": false, "query": "example.com", "msg": "couldn't get whois info"}Headers
Section titled “Headers”Request budget for the current window: limit, remaining, and reset (seconds until the window resets). Returned by known GET endpoints.
Example
limit=60, remaining=59, reset=42Maximum requests allowed per client IP per window (60 requests per 60s).
Example
60Requests remaining in the current window before the limit is hit.
Example
59Seconds until the current window resets.
Example
42