Website response metadata
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.dazrik.net/website?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/website?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/website?target=example.com") .get() .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.dazrik.net/website', 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/website?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/website";
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/website?target=example.com'Fetches an HTTP or HTTPS URL, follows redirects, and returns the final status and response headers without the page body. The target must resolve to a public IP. A received HTTP response, including a remote 404 or 500, returns API HTTP 200 with ok: true; statusCode contains the website’s status. Connection failures return HTTP 400.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”An HTTP/HTTPS URL or hostname. If the scheme is omitted, http:// is used. The value is a URL-encoded query parameter, including any query string in the target URL.
Example
example.comResponses
Section titled “Responses”Response metadata
object
The raw target as supplied
The requested URL, including the default scheme when omitted
Final URL after redirects
HTTP status returned by the website, independent of the API response status
Response headers of the final response
object
Example
{ "ok": true, "query": "example.com", "address": "93.184.216.34", "requestUrl": "http://example.com", "responseUrl": "https://example.com/", "statusCode": 200, "statusText": "OK"}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 target, validation failure, or the website could not be reached
object
Example
{ "ok": false, "query": "example.com", "address": "93.184.216.34", "requestUrl": "https://example.com", "msg": "can't connect to the website"}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
42Unexpected server error
Error response.
object
Example
{ "ok": false, "msg": "unknown error"}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