piidetectionapi.com
Home
Solutions - Fundamentals
What Is PII Detection? NER vs Regex vs Rules Accuracy, Precision & Recall PII in Test Data
Solutions - Compliance
GDPR Personal Data HIPAA PHI Detection CCPA / CPRA PCI DSS Card Data
Solutions - AI & LLM Safety
LLM Guardrails Chatbot PII Filtering RAG Pipelines
Solutions - Data Discovery & DLP
Data Loss Prevention Log File Scanning Support Tickets Email Scanning Documents & PDFs Database Discovery ETL & Streaming Pipelines
Industries - Financial
Banking Fintech Insurance
Industries - Healthcare
Healthcare Pharma & Clinical Trials Telehealth
Industries - Public Sector & Legal
Government & FOIA Law Enforcement Law Firms & eDiscovery Education (FERPA)
Industries - Technology
SaaS Platforms Cybersecurity & IR Telecommunications Gaming & Platforms
Industries - Other
HR & Recruiting Retail & E-commerce Call Centers & BPO Real Estate Travel & Hospitality Marketing & AdTech
How-to Guides - Identity & Contact
Detect Names Detect Email Addresses Detect Phone Numbers Detect Physical Addresses Detect Dates of Birth
How-to Guides - IDs & Financial
Detect SSNs Detect Passport Numbers Detect Drivers Licenses Detect Credit Card Numbers Detect Bank Accounts & IBAN
How-to Guides - Technical & Health
Detect IP & Device IDs Detect Medical Records & PHI
Resources
Pricing API Docs Supported Entities Languages About Contact Sign In Try the Live Demo Get Started
AI-powered detection · live demo online

Detect PII, PHI & Sensitive Data Before It Leaks

Our PII Detection API detects, classifies, and locates personal data in any text — returning structured entities with entity types, character offsets, and confidence scores. Need redaction too? Flip on mask_mode and get a masked copy in the same response. Built for GDPR, HIPAA, CCPA, and PCI DSS workflows.

Every scan covers:   names & people   SSNs & national IDs   cards & IBANs   medical & PHI   emails, phones & addresses

By Alpha Quantum — the team behind the 120M-domain Web Filtering Database.

150+Entity types
60+Languages
18HIPAA identifiers
4 modesreplace · mask · redact · hash
Detection quality

Catches what pattern-matching tools miss

These rows are from our adversarial test set — the cases where regex-based and legacy NER tools silently fail. Paste any of them into the live demo and watch them get caught.

hard cases  context-aware detection in action

input textdetected aswhy it’s hard
write to john dot smith at acme dot comEMAILobfuscated — no @ sign for regex to find
+1 (2 1 2) 5 5 5 - 0 1 8 2PHONEspaced out to evade filters
Herr Müller, Goethestraße 14, 80336 MünchenPERSON + ADDRESSnon-English name and address format
MRN 88-4417-C, prior admission under Dr. OseiMEDICAL_RECORD + PERSONfree-text clinical note, no fixed format
A Morgan Stanley adviser phoned Morgan FreemanPERSON (not the bank)same word — organization vs. person
born on the fourth of July, nineteen eighty-twoDATE_OF_BIRTHfully spelled out, zero digits

Every entity is returned with character offsets and a confidence score, so you can highlight, mask, or route each hit programmatically. That level of nuance is the product.

API  detect + mask

One POST request returns the entity list and the anonymized text together — no second round-trip, no separate redaction service.

portal  batch jobs

Upload documents in the client portal, run batch detection jobs, and download results — the same engine behind the API.

privacy  never stored

Submitted text is processed in memory and never used for training. A fully self-hosted deployment is available for regulated environments.

Trusted globally

Over 300 organisations globally rely on our AI-powered PII detection services to find and classify sensitive data — among them

  • Tier 1 Telcos
  • Media Conglomerates
  • Leading TV Networks
  • Global Digital Marketplaces
  • Cybersecurity Corporations
  • Leading Institutional Asset Managers
  • Virtualization Software Providers
  • Defense Industry Companies
  • School Districts
  • AdTech Corporations
  • and many others
GDPR-native
99.9% Uptime SLA
60+ Languages
Cloud API & On-Premise
24/7 Support
Core Capabilities

Find Sensitive Data Wherever It Hides

One detection API for PII, PHI, payment card data, and credentials — in free text, documents, chat transcripts, logs, and OCR output.

Detect & Classify 150+ Entity Types

From PERSON_NAME, EMAIL_ADDRESS, and SSN to MEDICAL_RECORD_NUMBER, CREDIT_CARD_NUMBER, IBAN_CODE, and AWS_CREDENTIALS — every match is labeled with a precise entity type you can route, report on, or block.

Browse all entity types

Locate with Offsets & Confidence

Every detected entity comes with exact character start/end offsets and a calibrated confidence score. Tune the threshold parameter to trade precision for recall, and highlight, tag, or transform matches in place.

See the response schema

Optional Masking & Redaction

Detection first, redaction on demand. Set mask_mode to replace for [TYPE] placeholders, redact to remove matches, or hash for consistent pseudonyms — and receive a masked copy alongside the detections.

What is PII detection?

A Complete Detection Pipeline in One Call

A single request to our API runs the full pipeline: detect candidate entities, classify them into 150+ types, locate them with character-level offsets, and score each match with a confidence value — with optional masking as the final step.

You stay in control: scope detection with the entities and exclude_entities lists, set a confidence threshold, and add natural-language exclusions with custom_instruction — for example, "do not flag employee names of our own staff".

Get Started in Minutes

Context-Aware AI, Not Just Regex

Our API is powered by transformer-based Named Entity Recognition (NER) models that understand context — so you get far fewer false positives and missed entities than pattern-matching tools.

The AI can tell "Dr. Smith" (a person) apart from "a blacksmith" (a profession), and "Paris, France" (a location) from "Paris Hilton" (a person). It catches unformatted identifiers regex can't, like an SSN written as "social is 478 92 6541". See our comparison of NER vs regex vs rules for the details.

NER vs Regex Compared

Real-Time Detection for LLMs & Chat

Catch personal data the instant it appears. Our stateless, low-latency architecture is built to sit inline: screen prompts before they reach an LLM, scrub model outputs before they reach users, and filter chat messages as they stream.

Ideal for: LLM guardrails, real-time chatbot filtering, live support conversations, and streaming data pipelines that must stay PII-free.

PII Guardrails for LLMs
150+
Entity Types Detected
60+
Languages Supported
<200ms
Typical Response Time
50K
Characters per Request
Quick Start

One Endpoint, Structured Results

Send text to POST /api/moderate.php with api_type: "pii_detection" and get back every entity with its type, exact position, and confidence score — plus an optional masked version. Full reference in the API documentation.

curl -X POST https://piidetectionapi.com/api/moderate.php \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_API_KEY",
    "api_type": "pii_detection",
    "text": "Contact John Doe at [email protected] or 555-123-4567.",
    "entities": ["PERSON_NAME", "EMAIL_ADDRESS", "PHONE_NUMBER"],
    "mask_mode": "replace",
    "threshold": 0.5
  }'
import requests

resp = requests.post(
    "https://piidetectionapi.com/api/moderate.php",
    json={
        "api_key": "YOUR_API_KEY",
        "api_type": "pii_detection",
        "text": "Contact John Doe at [email protected] or 555-123-4567.",
        "entities": ["PERSON_NAME", "EMAIL_ADDRESS", "PHONE_NUMBER"],
        "mask_mode": "replace",
    },
    timeout=30,
)
data = resp.json()
for e in data["detected_entities"]:
    print(e["type"], e["text"], e["start"], e["end"], e["confidence"])
const resp = await fetch("https://piidetectionapi.com/api/moderate.php", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    api_key: "YOUR_API_KEY",
    api_type: "pii_detection",
    text: "Contact John Doe at [email protected] or 555-123-4567.",
    entities: ["PERSON_NAME", "EMAIL_ADDRESS", "PHONE_NUMBER"],
    mask_mode: "replace",
  }),
});
const data = await resp.json();
data.detected_entities.forEach((e) =>
  console.log(e.type, e.text, e.start, e.end, e.confidence)
);
Response
{
  "detected_entities": [
    {"type": "PERSON_NAME", "text": "John Doe", "start": 8, "end": 16, "confidence": 0.95},
    {"type": "EMAIL_ADDRESS", "text": "[email protected]", "start": 20, "end": 36, "confidence": 0.98},
    {"type": "PHONE_NUMBER", "text": "555-123-4567", "start": 40, "end": 52, "confidence": 0.97}
  ],
  "anonymized_text": "Contact [NAME] at [EMAIL] or [PHONE].",
  "entities_detected": 3,
  "processing_time_ms": 187,
  "mask_mode_used": "replace",
  "status": 200
}
Use Cases

PII Detection Across Every Industry

From healthcare to finance, teams use our API to discover sensitive data, enforce privacy policies, and prove compliance.

Healthcare & Life Sciences

Detect PHI across clinical notes, discharge summaries, and transcripts — covering all 18 HIPAA identifiers before data is shared or analyzed.

Healthcare PHI detection

Banking & Financial Services

Discover cardholder data, account numbers, and IBANs in documents and support channels to keep PCI DSS scope under control.

PII detection for banking

AI, LLM & RAG Pipelines

Screen prompts, completions, and retrieved documents for personal data before it reaches models, vector stores, or end users.

PII protection in RAG

DevOps & Application Logs

Scan log streams for emails, tokens, credentials, and IP addresses so sensitive data never lands in your observability stack.

Log file PII scanning

Support & Call Centers

Flag PII in tickets, chats, and call transcripts in real time — before it spreads into CRMs, analytics tools, and training data.

Call center PII detection

Legal & eDiscovery

Locate personal data across matter files and productions with exact offsets, so review teams can redact precisely and defensibly.

PII detection for legal
Compliance

Built for Global Privacy Regulations

Automated PII detection is the first step of every privacy program: you can't protect, delete, or report on personal data you haven't found.

Detection-Driven Compliance Workflows

Regulations like GDPR, HIPAA, CCPA/CPRA, and PCI DSS all start from the same question: where does personal data live? Our API answers it automatically — classifying every match by entity type so you can map findings to GDPR personal data categories, HIPAA's 18 PHI identifiers, or PCI's cardholder data definitions.

Every response is a ready-made audit record: what was detected, where it was located, and how confident the model was. Use it to power data subject access requests, breach-scope assessments, data mapping, and evidence for regulators — without armies of manual reviewers.

GDPR PII Detection Guide
How It Works

Simple Integration, Precise Detections

Integrate in minutes: one JSON request to /api/moderate.php, one structured response. No models to host, no rules to maintain.

1

Send Your Text

POST up to 50,000 characters per request with your API key and api_type "pii_detection". Optionally scope the scan with entities, exclude_entities, and threshold.

2

AI Analyzes Context

Transformer NER models scan the content in 60+ languages, identifying 150+ types of PII, PHI, PCI data, and secrets with contextual awareness that minimizes false positives.

3

Get Structured Entities

Receive every detection as {type, text, start, end, confidence} — ready to highlight in a UI, feed to a DLP policy, block a request, or log for audit.

4

Mask If You Want

Set mask_mode to replace, redact, or hash and the same response includes a masked copy of your text — detection and remediation in a single round trip.

Entity Coverage

Detect 150+ Sensitive Data Types

From universal PII like names and emails to industry-specific identifiers like medical record numbers, IBANs, and cloud credentials — every category of sensitive data is covered.

Comprehensive Entity Recognition

Personal identifiers: PERSON_NAME, EMAIL_ADDRESS, PHONE_NUMBER, ADDRESS, DATE_OF_BIRTH, SSN, NATIONAL_ID, PASSPORT_NUMBER, DRIVERS_LICENSE_NUMBER, IP_ADDRESS, DEVICE_ID, and GPS_COORDINATES. See our guides on detecting Social Security numbers and detecting email addresses.

Financial & PCI data: CREDIT_CARD_NUMBER, CVV_NUMBER, FINANCIAL_ACCOUNT_NUMBER, IBAN_CODE, SWIFT_BIC, ROUTING_NUMBER, and TAX_ID — the identifiers covered in credit card detection.

Health & credentials: MEDICAL_RECORD_NUMBER, HEALTH_INSURANCE_ID, DIAGNOSIS, PRESCRIPTION, plus secrets like API_KEY, PASSWORD, AWS_CREDENTIALS, SSH_KEY, and DATABASE_CONNECTION_STRING.

View All Entity Types

Developer-Friendly by Design

Built by developers, for developers. A single RESTful endpoint, predictable JSON in and out, clear error codes, and copy-paste examples in Python, JavaScript, PHP, Java, and Go. Most teams ship their first integration in under an hour with the getting started guide.

Flexible deployment: use our cloud API for instant scalability, or deploy on-premise when data can't leave your infrastructure. Synchronous calls for real-time guardrails, batch processing for large corpora.

Enterprise features: API key management, usage analytics, per-entity configuration, custom instructions, GDPR-native controls, and dedicated support with custom SLAs on enterprise plans — see pricing.

API Documentation
Learn

Guides & Resources

Practical, engineering-focused guides on detecting specific identifiers, meeting regulations, and wiring PII detection into your stack.

What Is PII Detection?

The complete guide: definitions, detection techniques, entity taxonomies, accuracy metrics, and how detection fits into privacy engineering.

Read the guide

How to Detect SSNs

Why Social Security numbers slip past regex, how contextual AI catches formatted and unformatted SSNs, and how to validate results.

Detect SSNs

HIPAA PHI Detection

Map the 18 HIPAA identifiers to entity types and build Safe Harbor de-identification workflows on top of detection output.

HIPAA guide

LLM Guardrails

Add a PII detection layer around your LLM apps: screen prompts, filter completions, and keep personal data out of context windows.

Guardrails guide

PII Detection for DLP

Use detection results as the decision engine for data loss prevention: classify, alert, quarantine, or mask before data leaves your perimeter.

DLP guide

How to Detect Email Addresses

Detect emails in free text, obfuscated forms, and multilingual content — with offsets and confidence scores ready for masking.

Detect emails

Start Detecting PII in Minutes

Paste text into the live demo and watch entities light up with types, offsets, and confidence scores — or create a free API key and integrate today. No credit card required.