Integrate in three steps.

Everything you need to screen passwords from your own server: the request, the response, the errors, the metering, and what to do when the API is down.

Base URL
https://api.knownpass.com

This host stays; it keeps the project’s original name.

API version
v1
Updated
On this page

The whole integration

Hash the password on your server with the public salt, send the first six characters of the hash, and compare the returned hashes locally. The raw password and its full hash never leave your infrastructure. One GET request, one JSON response, usually under 100 ms from Europe on an open connection.

1. Hash locally

Compute the SHA-1 of the fixed salt string followed by the password, as lowercase hex. The first six characters are the prefix you send. The remaining 34 are the suffix you keep. Normalise the password to Unicode NFC, then hash the salt and password as UTF-8 bytes. Don’t trim it or change its case.

Hash locallyJavaScript
// any runtime with SHA-1
const hash   = sha1("Salted for knownpass.com: " + password.normalize("NFC")).toLowerCase();  // SHA-1 over UTF-8 bytes
const prefix = hash.slice(0, 6);   // sent
const suffix = hash.slice(6);      // kept

// "password123"
// hash   = e4ed298fced32b284fb61840470dd5f9e030b568
// prefix = e4ed29                              (sent)
// suffix = 8fced32b284fb61840470dd5f9e030b568  (kept, 34 chars)

Why the salt keeps the old name. The salt and the API host keep the original name: PasswordRadar was called knownPass. The salt is part of every hash in the dataset, so it stays exactly as it is, trailing space included, and existing integrations keep working unchanged.

SHA-1 is a lookup key here, not a password-storage hash. The salt is public and fixed on purpose: it keeps PasswordRadar prefixes from being replayed against other services. Details in the threat model.

2. Send the prefix

One authenticated GET request, with the prefix in the path.

RequestGET /v1/range/{prefix}
GET https://api.knownpass.com/v1/range/{prefix}
Authorization: Bearer kpp_…
PartValue
{prefix}Exactly six lowercase hex characters. Anything else, uppercase included, returns 400.
AuthorizationBearer followed by your API key. Missing or invalid returns 401.

Free keys are issued by email today: write to hello@passwordradar.eu. No card. With your key in the environment variable PASSWORDRADAR_API_KEY, the worked example from step 1 is:

Try itcurl
$ curl -H "Authorization: Bearer $PASSWORDRADAR_API_KEY" \
    https://api.knownpass.com/v1/range/e4ed29

3. Compare locally

The response is JSON. prefix echoes what you sent; results maps every known hash in that bucket to the categories it was found in. Keys are full 40-character lowercase hashes: hundreds of them per bucket, and the count depends on the datasets your key includes.

Response, with the planned category labels 200
{
  "prefix": "e4ed29",
  "results": {
    "e4ed29003bbcf986aa376363a8e0de6e6f970afa": ["Brute-force space"],
    …
    "e4ed298fced32b284fb61840470dd5f9e030b568": [
      "Website leaks", "Malware leaks", "Password lists"
    ],
    …
  }
}

If the hash you computed in step 1 is a key in results, the password is known: block it at sign-up and password change, require a change at login. If it isn’t, proceed. In the example above it is: the second key shown is the hash of password123 from step 1, so that password is known. The response carries no counts and no plaintexts. The category names in this example are the planned labels; today the API returns internal names instead (see Categories).

CompareJavaScript
// hash: the 40-character value from step 1
const known = Object.hasOwn(body.results, hash);

Categories

Each known hash comes with the categories it was found in. The planned labels, used in the example above, are Website leaks, Malware leaks, Password lists, Wordlists, Common, Masks & patterns, Brute-force space and Tailored. What each one covers is in Data and provenance.

Today the live API returns internal names instead, for example Bundles, Combolists, Logs, Telegram, Websites, Wordlists and Bruteforced, while the customer-facing vocabulary is being settled. So don’t validate categories against a fixed list. Treat any match as a block, and use the categories in your logs only. Don’t show category names to your users; show your own message.

Response codes

CodeMeaningWhat to do
200JSON {prefix, results} for the prefix. An empty results object is valid: nothing known in that bucket.Compare locally.
400invalid_input: the prefix is not exactly six lowercase hex characters.Fix the client: length and hex case.
401unauthorized: missing or invalid Authorization header.Check the key. If it leaked, email hello@passwordradar.eu to rotate it; self-serve rotation is planned for the admin console.
403forbidden, bulk download only: the key has no bulk-download entitlement for this dataset.Use your own key, not the demo key. Every plan includes bulk download.
429Over the 1,000 requests a day included with the key, and no payment method or prepaid credit. Retry-After gives the wait in seconds.Fail open, and alert: screening is off for the rest of the day. Add a payment method or prepaid credit for more.
5xxOur fault.Fail open. Check the status page.

The bodies of 400, 401 and 403 are JSON with an error code and a request_id; a 400 adds a detail string. A 401 also sends the header WWW-Authenticate: Bearer. An unknown path or method currently returns 404 or 405 with {"detail": "…"} instead.

Every response carries an x-request-id header. Quote it, or the request_id from the body, when you report a problem.

Error 400
{
  "error": "invalid_input",
  "detail": "the request does not match this endpoint",
  "request_id": "…"
}

Metering and limits

Every key
1,000 requests a day included, enough to integrate, test and, for most organisations, run in production (checking each login at most once every 30 days). Beyond that, €0.01 per request, pay as you go or from prepaid credit. The same on every plan; Free needs no card.
Without a payment method or credit
Requests over 1,000 a day return 429 with Retry-After.
Requests left
Not reported today: responses carry no quota headers. Alert on the first 429.
Bulk download
Not counted against the daily requests.
Trial keys
100 requests a day, a single key, no registration, deleted after 30 days without activity. They belong to the self-serve sign-up, which is still a preview.
Demo key
The key in the landing-page demo is public and shared. It is throttled and may be rotated without notice. Don’t build on it.

Key holders get 90 days’ notice before any change to limits or prices affects their keys. Plans are in pricing; to add a payment method or prepaid credit, write to hello@passwordradar.eu.

Fail open

PasswordRadar is a check, not a dependency. If the request times out, the network fails, or the API returns 5xx: let the flow continue, log that the check was skipped, and re-check at the next login or password change. A 429 also fails open, but alert on it (below). A 400, 401 or 403 is different: the client or the key is misconfigured, and screening stays off until someone fixes it. So is any other error, such as a key with a stray invisible character, which the HTTP client refuses before sending anything, or a TLS failure. Let the flow continue there too, but log it as an error, with its cause, so it can’t go unnoticed. If every check is being skipped, look at the path to the API: a firewall, or a proxy your HTTP client doesn’t use. Suggested client timeout: 2 seconds. It also covers opening the connection, a few round trips when the connection is new, as it is for most checks on a quiet server: well under 200 ms from Europe, close to a second from Asia or South America. There is no uptime SLA today; the status page is updated by hand.

Treat 429 as a signal to alert on, not just a warning: the key has used its 1,000 requests for the day, and screening is off for the rest of the day. Anyone who can trigger checks can spend those requests, so call the API only as Where to put the check says, behind your own rate limits. If you need screening during an outage, keep a small local fallback list, such as the most common passwords and your organisation’s own words, and check against it when the API can’t be reached.

Complete example: Node.js

The three steps and the fail-open rules above, in one piece, for Node.js 18 or later. password is the password your server just received. It hashes locally, sends only the prefix and compares locally.

password must be in scope; the sample uses top-level await, so run it as an ES module (.mjs or "type": "module").

Node.js 18 or laterGET /v1/range/{prefix}
import { createHash } from "node:crypto";

// 1. Hash locally. The salt stays exactly as written.
//    NFC first; update() hashes a string as UTF-8.
const hash = createHash("sha1")
  .update("Salted for knownpass.com: " + password.normalize("NFC"))
  .digest("hex");

// 2. Send only the first six characters.
const prefix = hash.slice(0, 6);
const key = process.env.PASSWORDRADAR_API_KEY?.trim();
let known = false;
try {
  // no key: nothing is screened, so don't send the request
  if (!key) throw new Error("PASSWORDRADAR_API_KEY is not set");
  const res = await fetch(
    `https://api.knownpass.com/v1/range/${prefix}`,
    {
      headers: { Authorization: `Bearer ${key}` },
      // 2 s: a new connection takes a few round trips
      signal: AbortSignal.timeout(2000),
    },
  );
  if (res.ok) {
    // 3. Compare locally.
    //    A match means the password is known.
    const { results } = await res.json();
    known = Object.hasOwn(results, hash);
  } else if (res.status >= 500) {
    // our fault: fail open, check again next time
    console.warn("password check skipped:", res.status);
  } else if (res.status === 429) {
    // over the daily limit: fail open, but alert on it,
    // nothing is screened until the limit resets
    console.error("password check OFF until the limit resets: HTTP 429");
  } else {
    // 400, 401 or 403: your setup, not an outage.
    // The flow carries on, but nothing is screened
    // until you fix it. 401: check the key.
    console.error("password check OFF: HTTP", res.status);
  }
} catch (err) {
  // a timeout, or the network failing before the answer
  // or during it (terminated): fail open. For "fetch
  // failed", the cause tells the network from your setup.
  const net = ["ECONNREFUSED", "ECONNRESET", "ENOTFOUND",
    "EAI_AGAIN", "ETIMEDOUT", "EHOSTUNREACH", "ENETUNREACH",
    "ENETDOWN", "EHOSTDOWN", "EADDRNOTAVAIL", "ECONNABORTED",
    "EPIPE", "UND_ERR_SOCKET", "UND_ERR_CONNECT_TIMEOUT"];
  const transient = err.name === "TimeoutError"
    || err.name === "AbortError"
    || err.message === "terminated"
    || (err.message === "fetch failed"
      && net.includes(err.cause?.code));
  // log the cause as well; some messages quote the key
  const cause = err.cause?.message || err.cause?.code;
  let why = cause ? `${err.message}: ${cause}` : err.message;
  if (key) why = why.replaceAll(key, "[key]");
  if (transient) {
    // check again at the next login. (Every check skipped
    // behind a proxy? fetch ignores HTTPS_PROXY by default.)
    console.warn("password check skipped:", why);
  } else {
    // won't fix itself: no key, a stray character in the key,
    // Node before 18, a TLS failure (a proxy Node doesn't
    // trust, or a certificate problem on our side)
    console.error("password check OFF:", why);
  }
}

Each log line gives the cause, with the key masked if an error message quotes it. A missing key and a Node version without fetch are logged as errors, like a 401 (check the key).

Where to put the check

Sign-up and password change
Block on match and ask for a different password. Tell the user why: “This password is on a list of passwords attackers try first. Please choose another.”
Login
Check only after the password has verified, never for a failed login: otherwise anyone can spend your daily requests by typing wrong passwords. Check the password the user just typed, at most once every 30 days per user: store when you last checked, and skip the call if it was recent. On a match, let them in, then require a new password before anything else; it may have leaked since they set it.
Reset
Same as sign-up.
Rate limits first
Rate-limit your sign-up, password-change and reset endpoints before they call us, so a script can’t use up your daily requests, or your credit if you have a payment method.

The reference is NIST SP 800-63B-4 (opens in a new tab), section 3.1.1.2: when a password is set or changed, the verifier SHALL compare it against a blocklist of commonly used, expected or compromised passwords, and context-specific words such as the name of the service, the username and derivatives of them belong on that list. The same section rules out composition rules and periodic rotation. National rules can differ: the Czech Decrees No. 409/2025 Sb. and No. 410/2025 Sb. still require a change at least every 18 months for accounts that rely on a password alone. Check the rules that apply to you before you drop rotation.

Machine-readable

OpenAPI 3.1
passwordradar.eu/openapi.json live

The public spec: the range, health and bulk-download endpoints, bearer auth, and the error codes above.

llms.txt
passwordradar.eu/llms.txt live

Written for coding assistants. Paste the URL into Claude Code, Cursor or Copilot and ask for the integration. It tells the assistant to hash locally and send only the prefix; check that the code it writes does.

Reference client
in progress

A single self-contained JavaScript component, licensed Apache-2.0. The repository link is coming.

Bulk download

live

Download the base dataset as files and screen passwords inside your own network. Included in every plan, Free too: self-hosting needs it. Downloads don’t count against the daily requests.

Bulk downloadRange and resume supported
GET https://api.knownpass.com/v1/bulk/{dataset}/manifest
GET https://api.knownpass.com/v1/bulk/{dataset}/files/{filename}
Authorization: Bearer kpp_…

The manifest lists the published files; each file is served with Range support, so an interrupted download resumes where it stopped. A key without the bulk-download entitlement gets 403. The dataset IDs and the manifest’s format aren’t published yet: ask at hello@passwordradar.eu, for example when you ask for a key.

The base dataset is licensed CC BY-NC 4.0, plus an added permission: commercial self-hosting is allowed. Screening the passwords of your own staff and of your own product’s users is fine, paid products included. Selling the screening itself needs a written exemption from the author, Šimon Podlesný (hello@passwordradar.eu): reselling or redistributing the dataset, running it for other organisations, or making it a paid feature of a security product. The full terms are in Data and provenance.

Identity providers

Plain REST
live

Your own code can call PasswordRadar today with one GET request, from any language, as above.

Integrations
planned

Keycloak, Zitadel, Ory, Authentik, Nextcloud and Supabase Auth. Until they ship, an off-the-shelf identity provider needs an extension of its own to make that call. For Keycloak that is a Java extension (a password-policy provider): see Keycloak today.

Design partners decide the order. Running one of these and want it sooner?

Apply as a design partner

Keycloak today

A ready-made Keycloak integration is planned. Until then, you can add the check yourself as a password policy, Keycloak’s own extension point for password rules:

  1. Implement the Password Policy provider SPI: a PasswordPolicyProviderFactory and a PasswordPolicyProvider. In validate(realm, user, password), normalise the password to NFC with java.text.Normalizer, hash the salt and password as getBytes(StandardCharsets.UTF_8) with SHA-1, call the range endpoint with java.net.http.HttpClient and a 2-second timeout, and compare locally. Return a PolicyError on a match. When the check can’t run, log why and return null, so it fails open. Implement validate(String username, String password) too; it can return null.
  2. Package it as a jar in /opt/keycloak/providers/ and run kc.sh build.
  3. Add the policy to the realm under Authentication → Policies.

The policy runs whenever a password is set: at registration, on a change or reset, and when an admin sets one. It doesn’t run at login. A login-time check needs a custom Authenticator placed after the username and password form: it remembers when it last checked the user, for example in a user attribute, and on a match adds the UPDATE_PASSWORD required action. Keycloak’s built-in passwordBlacklist policy can’t use the bulk dataset: it expects a list of plaintext words, and the dataset holds salted hashes.