PIIGuard / Detectors
Physical Address
Detects US physical addresses including full street addresses, partial addresses, and PO Box formats. Validates state abbreviation and ZIP code format.
Endpoint: POST /v1/pii/detect/address
Validation & Confidence
Regex + US state abbreviation list + ZIP/ZIP+4 format check.
Full addresses: 1.0. Partial addresses without ZIP: 0.5 (filtered by default — raise with min_confidence: 0.0 to see them). Severity: medium.
Example
from instructeer.guards import PIIGuard
# api_key = os.environ["INSTRUCTEER_API_KEY"]
pii = PIIGuard(api_key="rg_your_key")
result = pii.detect_address("Ship to 123 Main St, Springfield, IL 62701")// Response
{
"entity_type": "US_ADDRESS",
"value": "123 Main St, Springfield, IL 62701",
"severity": "medium",
"confidence": 1.0,
"extra": { "state": "IL", "zip": "62701" }
}Notes
- PO Box: P.O. Box 123, City, ST 00000 — detected.
- Partial address: Street + city without ZIP scores 0.5 and is filtered by the default threshold.
- Non-US: Only US addresses with valid state abbreviations and ZIP formats are returned.