PIIGuard / Detectors
URL
Detects URLs including those with query parameters and paths that may carry user identifiers. Bare domains without protocol or www are returned at lower confidence.
Endpoint: POST /v1/pii/detect/url
Validation & Confidence
Protocol detection (http/https/ftp) + TLD validation + domain structure check.
Full URL with protocol: 1.0. www.domain.tld without protocol: 0.8. Bare domain (example.io): 0.4 (filtered by default). Severity: low.
Example
from instructeer.guards import PIIGuard
# api_key = os.environ["INSTRUCTEER_API_KEY"]
pii = PIIGuard(api_key="rg_your_key")
result = pii.detect_url("Profile at https://example.com/users/12345?token=abc")// Response
{
"entity_type": "URL",
"value": "https://example.com/users/12345?token=abc",
"severity": "low",
"confidence": 1.0,
"extra": { "has_protocol": true, "domain": "example.com" }
}Notes
- Why low severity: A URL is an indirect identifier — it may or may not contain PII depending on its structure.
- Bare domains filtered: example.io without protocol scores 0.4 and is filtered by the default 0.6 threshold. Set min_confidence: 0.0 to see them.