PII Detector Redactor Emails Phones IBAN Cards SSN Secrets API
Free tier included · CybersecurityPII Detector & Redactor finds and masks personally identifiable information in text using deterministic regex and real checksum validation — no LLM, no network calls, no storage. The base API covers emails (Unicode local parts), phones (international via libphonenumber + US national formats), IBANs (MOD97-10 + per-country structure), credit cards (Luhn + issuer prefix), US SSN (area rules), IPv4, IPv6, and URLs. The extended endpoints add a secret scanner (AWS keys, GitHub tokens, Slack tokens, JWTs, PEM private keys, MAC addresses, generic credentials), JSON document scanning with JSONPath locations, and batch processing of up to 100 texts per call.
Use cases: scrub text before sending to external LLMs; sanitize logs and error trackers; redact PII from support tickets, chat transcripts, and webhook payloads; scan JSON documents field-by-field for compliance; process log pipelines with batch detection.
The API is fully offline and stateless. Text input is capped at 1 MB per request. Batch supports 1–100 items. JSON scanning enforces node count, string length, and nesting depth limits. Mask mode supports a custom mask character and optional last-N-characters kept visible. Hash mode produces stable 16-hex-char SHA-256 hashes for joinable log redaction.
Honest limits: IBAN validation uses MOD97-10 and country structure but not a full SWIFT registry lookup; plain 10-digit phone numbers without separators are not matched to avoid false positives; no MX or BIN lookups are performed.
Endpoints
| Method | Path | What it does |
|---|---|---|
GET | / | API metadata: name, version, and paths to the interactive docs and health endpoint. |
GET | /health | Liveness probe; returns status "ok" while the process is up. |
POST | /detect | Detect PII in text with offsets. Returns findings with type, start/end offsets, and matched value. Optional types array limits detection to a subset. |
POST | /mask | Mask PII in text. Replaces detected values with a mask character. Optional keep_last leaves trailing characters visible. |
POST | /detect/full | Detect PII and developer secrets with offsets, per-finding risk, and a document risk grade. Supports extended types: email, phone, iban, card, ssn, ipv4, ipv6, url, mac, aws_key, github_token, slack_token, jwt, private_key, secret. |
POST | /redact | Redact PII and secrets with mask, label, remove, or hash modes. Returns redacted text plus findings with offsets. |
POST | /scan | Scan any JSON document for PII and secrets, reporting a JSONPath location for every finding. With redact=true, returns a deep copy with values replaced. |
POST | /batch | Detect or redact PII and secrets in up to 100 texts in a single call. Returns one result per item. |
Quick start
curl -X POST "https://piidetect.p.rapidapi.com/detect" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: piidetect.p.rapidapi.com" \
-H "Content-Type: application/json" \
-d '{"text": "Email john.doe@example.com, card 4111 1111 1111 1111.", "types": ["email", "card"]}'
FAQ
Is the API truly offline and does it store any data?
Yes. All detection uses deterministic regex and checksum validation with no external network calls. No request data, findings, or logs are stored.
What PII types and secrets are supported?
Base types: emails, phones (international + US), IBANs, credit cards, US SSN, IPv4, IPv6, URLs. Extended types (via /detect/full, /redact, /scan, /batch): MAC addresses, AWS access key IDs, GitHub tokens, Slack tokens, JWTs, PEM private keys, and generic credentials.
How many texts can I process at once?
Up to 100 items per /batch call. Each text is capped at 1 MB. JSON /scan enforces node count, total string length, and nesting depth limits.
What redaction modes are available?
Mask (custom character, optional last N chars kept), label (e.g. `<EMAIL>`), remove (deletes value), and hash (stable 16-hex SHA-256 with optional salt for joinable log redaction).
Try PII Detector Redactor Emails Phones IBAN Cards SSN Secrets free
Free tier on every plan. Get an API key and start calling in under a minute.
Open on RapidAPI