Real-time URL Scanner & Phishing Detection API
The URL Scanner API performs real-time scans of links to identify suspicious URLs. It accurately detects phishing links, malware-infected URLs, viruses, parked domains, and other dubious URLs, assigning real-time risk scores. With industry-leading phishing detection and domain reputation assessments, it offers enhanced insights for more precise decision-making.
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.
Request:
| Field | Type | Description |
|---|---|---|
| apikey | String | Your unique API key that authenticates requests to our services. |
| url | String | The URL 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/url/scan' \
-H 'Content-Type: application/json' \
-d '{
"apikey": "YOUR_PRIVATE_APIKEY",
"url": "https://sample-domain.com/path"
}'
Response:
The API returns a highly detailed JSON response structured into logical blocks for enhanced security analysis.
| Field | Type | Description |
|---|---|---|
| url | String | The input URL that was analyzed. |
| metadata | Object | Basic information about the page, including title, description, language, and categories. |
| security | Object | Critical security indicators:
|
| analysis | Object | Deep forensic data. Available for paid users only.
|
For programming languages
Using one of these samples is the easiest way to start using our API.
import requests
url = "https://inspector.gridinsoft.com/api/v1/url/scan"
data = {
"apikey": "YOUR_PRIVATE_APIKEY",
"url": "https://example.com"
}
response = requests.post(url, json=data)
print(response.json())
$body = @{ apikey = "YOUR_PRIVATE_APIKEY"; url = "https://example.com" } | ConvertTo-Json
Invoke-RestMethod -Uri "https://inspector.gridinsoft.com/api/v1/url/scan" -Method Post -Body $body -ContentType "application/json"
const response = await fetch("https://inspector.gridinsoft.com/api/v1/url/scan", {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
apikey: "YOUR_PRIVATE_APIKEY",
url: "https://example.com"
})
});
console.log(await response.json());
val client = OkHttpClient()
val data = """{"apikey":"YOUR_PRIVATE_APIKEY", "url":"https://example.com"}"""
val request = Request.Builder()
.url("https://inspector.gridinsoft.com/api/v1/url/scan")
.post(data.toRequestBody("application/json".toMediaType()))
.build()
println(client.newCall(request).execute().body?.string())
func main() {
data := []byte(`{"apikey": "YOUR_PRIVATE_APIKEY", "url": "https://example.com"}`)
resp, _ := http.Post("https://inspector.gridinsoft.com/api/v1/url/scan", "application/json", bytes.NewBuffer(data))
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
curl -X POST "https://inspector.gridinsoft.com/api/v1/url/scan" \
-H "Content-Type: application/json" \
-d '{"apikey": "YOUR_PRIVATE_APIKEY", "url": "https://example.com"}'
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://inspector.gridinsoft.com/api/v1/url/scan")
response = Net::HTTP.post(uri, {apikey: "YOUR_PRIVATE_APIKEY", url: "https://example.com"}.to_json, "Content-Type" => "application/json")
puts response.body
$ch = curl_init('https://inspector.gridinsoft.com/api/v1/url/scan');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'apikey' => 'YOUR_PRIVATE_APIKEY',
'url' => 'https://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", url = "https://example.com" };
var content = new StringContent(JsonConvert.SerializeObject(data), Encoding.UTF8, "application/json");
var res = await client.PostAsync("https://inspector.gridinsoft.com/api/v1/url/scan", content);
Console.WriteLine(await res.Content.ReadAsStringAsync());
// Using cpprestsdk
void scan_url() {
http_client client(U("https://inspector.gridinsoft.com/api/v1/url/scan"));
json::value data;
data[U("apikey")] = json::value::string(U("YOUR_PRIVATE_APIKEY"));
data[U("url")] = json::value::string(U("https://example.com"));
client.request(methods::POST, U(""), data.serialize(), U("application/json"))
.then([](http_response res) {
std::wcout << res.extract_json().get().serialize() << std::endl;
}).wait();
}
HttpClient client = HttpClient.newHttpClient();
String data = "{\"apikey\":\"YOUR_PRIVATE_APIKEY\", \"url\":\"https://example.com\"}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://inspector.gridinsoft.com/api/v1/url/scan"))
.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/url/scan")
.json(&serde_json::json!({"apikey": "YOUR_PRIVATE_APIKEY", "url": "https://example.com"}))
.send()?;
println!("{}", res.text()?);
Ok(())
}
var request = URLRequest(url: URL(string: "https://inspector.gridinsoft.com/api/v1/url/scan")!)
request.httpMethod = "POST"
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = try? JSONSerialization.data(withJSONObject: ["apikey": "YOUR_PRIVATE_APIKEY", "url": "https://example.com"])
URLSession.shared.dataTask(with: request) { data, _, _ in
if let data = data, let result = String(data: data, encoding: .utf8) { print(result) }
}.resume()