Free Domain Scanner & Reputation API

Instantly scan any domain to detect malware, botnets, and phishing threats. Our hourly-updated threat intelligence database ensures you get the most accurate reputation data for every query.

How to use?

You need to use the HTTP POST method, sending your data in the form of a JSON object within the body of the request.

POST https://inspector.gridinsoft.com/api/v1/domain/check

Request:

Field Type Description
apikey String Your unique API key that authenticates requests to our services.
domain String The domain you want to check

Example:

You can use various tools or libraries to make this POST request. Here’s how you might typically do it using curl, a command-line tool:

curl -X POST 'https://inspector.gridinsoft.com/api/v1/domain/check' \
    -H 'Content-Type: application/json' \
    -d '{
    "apikey": "YOUR_PRIVATE_APIKEY",
    "domain": "sample-domain.com"
    }'

Response:

Field Type Description
subject String The domain that was checked.
verdict String Security assessment (e.g., "Safe", "Suspicious", "Malicious").
score Integer Reputation score from 0 to 100 (higher is better).
tags String Relevant domain categories or behavioral tags.
date String Timestamp of the last analysis (YYYY-MM-DD HH:MM:SS).
fingerprint String Unique behavioral fingerprint assigned to the domain.
whitelisted Boolean Indicates if the domain is on a trusted whitelist.
report String URL to the full interactive scan report.

Note: Some fields may be omitted if the domain has no historical data in our database, in which case a basic real-time scan result is provided.

For programming languages

Using one of these samples is the easiest way to start using our API. Feel free to add additional functionalities as needed.


import requests

url = "https://inspector.gridinsoft.com/api/v1/domain/check"
data = {
    "apikey": "YOUR_PRIVATE_APIKEY",
    "domain": "example.com"
}

response = requests.post(url, json=data)
print(response.json())

$body = @{ apikey = "YOUR_PRIVATE_APIKEY"; domain = "example.com" } | ConvertTo-Json
$response = Invoke-RestMethod -Method Post -Uri "https://inspector.gridinsoft.com/api/v1/domain/check" -Body $body -ContentType "application/json"
$response | ConvertTo-Json

const response = await fetch("https://inspector.gridinsoft.com/api/v1/domain/check", {
    method: 'POST',
    headers: {'Content-Type': 'application/json'},
    body: JSON.stringify({
        apikey: "YOUR_PRIVATE_APIKEY",
        domain: "example.com"
    })
});
console.log(await response.json());

import java.net.URI
import java.net.http.*

val client = HttpClient.newHttpClient()
val data = """{"apikey":"YOUR_PRIVATE_APIKEY", "domain":"example.com"}"""
val request = HttpRequest.newBuilder()
    .uri(URI.create("https://inspector.gridinsoft.com/api/v1/domain/check"))
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(data))
    .build()
println(client.send(request, HttpResponse.BodyHandlers.ofString()).body())

package main

import (
    "bytes"
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {
    url := "https://inspector.gridinsoft.com/api/v1/domain/check"
    jsonData := []byte(`{"apikey": "YOUR_PRIVATE_APIKEY", "domain": "example.com"}`)
    
    resp, _ := http.Post(url, "application/json", bytes.NewBuffer(jsonData))
    defer resp.Body.Close()
    
    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}

curl -X POST "https://inspector.gridinsoft.com/api/v1/domain/check" \
     -H "Content-Type: application/json" \
     -d '{"apikey": "YOUR_PRIVATE_APIKEY", "domain": "example.com"}'
  • JSON Parsing: The script uses `jq` to parse the JSON response. Make sure `jq` is installed on your system to use this feature.
  • HTTP Status Codes: It captures the HTTP status code to determine whether the request was successful (`200 OK`) or if there was an error. This helps in determining the appropriate action based on the response code.
  • Output Handling: The script now properly separates the response handling and error messages, improving the readability and user experience when interacting with the script.
  • Reading Domains: Domains are read from a text file, making it easy to check multiple domains in one go.

require 'net/http'
require 'uri'
require 'json'

uri = URI.parse("https://inspector.gridinsoft.com/api/v1/domain/check")
response = Net::HTTP.post(uri, 
    {apikey: "YOUR_PRIVATE_APIKEY", domain: "example.com"}.to_json,
    "Content-Type" => "application/json"
)
puts response.body

$ch = curl_init('https://inspector.gridinsoft.com/api/v1/domain/check');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'apikey' => 'YOUR_PRIVATE_APIKEY',
    'domain' => 'example.com'
]));
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type:application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($ch);
curl_close($ch);

using var client = new HttpClient();
var data = new { apikey = "YOUR_PRIVATE_APIKEY", domain = "example.com" };
var content = new StringContent(JsonConvert.SerializeObject(data), Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://inspector.gridinsoft.com/api/v1/domain/check", content);
Console.WriteLine(await response.Content.ReadAsStringAsync());

// Using cpprestsdk
void check_domain() {
    http_client client(U("https://inspector.gridinsoft.com/api/v1/domain/check"));
    json::value data;
    data[U("apikey")] = json::value::string(U("YOUR_PRIVATE_APIKEY"));
    data[U("domain")] = json::value::string(U("example.com"));

    client.request(methods::POST, U(""), data.serialize(), U("application/json"))
        .then([](http_response response) {
            std::wcout << response.extract_json().get().serialize() << std::endl;
        }).wait();
}

HttpClient client = HttpClient.newHttpClient();
String data = "{\"apikey\":\"YOUR_PRIVATE_APIKEY\", \"domain\":\"example.com\"}";
HttpRequest request = HttpRequest.newBuilder()
        .uri(URI.create("https://inspector.gridinsoft.com/api/v1/domain/check"))
        .header("Content-Type", "application/json")
        .POST(HttpRequest.BodyPublishers.ofString(data))
        .build();
System.out.println(client.send(request, HttpResponse.BodyHandlers.ofString()).body());

// Use reqwest = { version = "0.11", features = ["blocking", "json"] }
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::blocking::Client::new();
    let res = client.post("https://inspector.gridinsoft.com/api/v1/domain/check")
        .json(&serde_json::json!({
            "apikey": "YOUR_PRIVATE_APIKEY",
            "domain": "example.com"
        }))
        .send()?;
    println!("{}", res.text()?);
    Ok(())
}
  • Dependencies: Uses `reqwest` for HTTP requests, `tokio` for async runtime, and `serde` for JSON handling.
  • Structs: `DomainCheckRequest` for the request body and `DomainCheckResponse` for parsing the JSON response.
  • Async Functionality: The `check_domain` function is asynchronous, using Tokio's async runtime to handle the HTTP requests concurrently.
  • Error Handling: Proper error handling is implemented, ensuring that any issues during the HTTP request or file operations are reported.
  • Reading Domains: Domains are read from a text file, making it easy to check multiple domains in one go.

var request = URLRequest(url: URL(string: "https://inspector.gridinsoft.com/api/v1/domain/check")!)
request.httpMethod = "POST"
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: ["apikey": "YOUR_PRIVATE_APIKEY", "domain": "example.com"])

URLSession.shared.dataTask(with: request) { data, _, _ in
    if let data = data, let result = String(data: data, encoding: .utf8) {
        print(result)
    }
}.resume()
Ready to get started?
Sign up to try Inspector API