PII Detect API - Find and Mask Emails, SSNs, Cards in Text
Detects six PII categories in free-form text: emails, phone numbers (with length validation), US SSNs (filtering known-invalid prefixes), credit cards (13-19 digits, Luhn-validated), IPv4 addresses, and dates of birth near DOB keywords. Returns each finding with type, raw value, start/end character offsets, and a masked version.
Code examples
curl -X POST https://api.botoi.com/v1/pii/detect \
-H "Content-Type: application/json" \
-d '{"text":"Reach me at alice@example.com or 555-123-4567. Card on file: 4111 1111 1111 1111."}'When to use this API
Redact PII before sending to LLMs
Before a customer support transcript hits an LLM for summarization, run it through this endpoint and replace each finding with its masked version. Keeps emails, phone numbers, and card data out of third-party training and logs.
Audit stored content for leaked secrets
Periodically scan notes, support tickets, or chat logs stored in your DB. Alert when SSN or credit-card matches appear in places they shouldn't live.
Compliance checks for user-uploaded content
Run the endpoint on every form field or document upload. Block or flag submissions containing unmasked PII to stay inside your GDPR and CCPA data-minimization commitments.
Frequently asked questions
How are false positives controlled?
Which PII types are detected?
Are overlapping matches reported?
Is the text stored after scanning?
How do I redact instead of just detect?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.