Scan one page
POST/api/v1/scans
Needs the scans:run scope. About scopes
Loads one public page and scores it, without adding a site to your account: for a quick check of any address, such as an "audit your site" box. It runs in the background, usually in 5–20 seconds: poll GET /scans/{id} until status is completed or failed. A scan of the same URL in the last hour is returned instead of a new one (status 200, not 201), and doesn't count towards your daily scans.
Request body
JSON: a CreateScan object.
Responses
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | Scan |
| 400 | The request isn't valid (invalid_request, invalid_body) | Error |
| 401 | No key, or the key is invalid, expired or revoked (key_required, key_invalid) | Error |
| 403 | The key lacks a scope, or the plan doesn't allow it (missing_scope, plan_no_api, plan_limit) | Error |
| 429 | Over the rate limit (rate_limited, rate_limited_daily) | Error |
Examples
curl
curl -X POST "https://app.kritano.com/api/v1/scans" \
-H "Authorization: Bearer $KRITANO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/"
}'
JavaScript
const res = await fetch("https://app.kritano.com/api/v1/scans", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KRITANO_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"url": "https://example.com/"
}),
});
const data = await res.json();
Python
import os
import requests
res = requests.post(
"https://app.kritano.com/api/v1/scans",
headers={"Authorization": f"Bearer {os.environ['KRITANO_API_KEY']}"},
json={
"url": "https://example.com/"
},
)
res.raise_for_status()
data = res.json()
Go
body := strings.NewReader(`{
"url": "https://example.com/"
}`)
req, _ := http.NewRequest("POST", "https://app.kritano.com/api/v1/scans", body)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("KRITANO_API_KEY"))
res, err := http.DefaultClient.Do(req)