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

Supported Entity Types

The complete reference of the 150+ PII, PHI, PCI, credential, location, device, and demographic entity types the PII Detection API can find, classify, and locate in your text — each returned with the matched value, character offsets, and a confidence score.

150+
Entity Types
9
Categories
60+
Languages
4
Regulations Covered
 How this reference works: every entity name below is a value you can pass in the entities array of a request to detect only those types, or in exclude_entities to skip them. Omit both to detect everything. Each detection in the response includes type, text (the exact match), start/end character offsets, and a confidence score between 0 and 1. Try any of them live in the interactive demo.
Personal Identifiers

The core of PII: values that name or directly describe a specific person. These are detected contextually by the transformer NER model, so "John Smith" in a signature is found even when no label like "Name:" precedes it.

Entity TypeExampleDescription
PERSON_NAMEJohn Smith, Dr. Jane WilsonFull or partial person names: first, middle, last names, initials, nicknames, and names with honorifics, in any of the 60+ supported languages.
DATE_OF_BIRTH03/15/1985, March 15, 1985Birth dates in numeric or written formats. A key identifier under GDPR and one of the 18 HIPAA identifiers.
AGE40 years old, born in 1985Explicit ages and age-revealing phrases that can identify a person in combination with other data.
EMPLOYMENTSenior DBA at Acme CorpJob titles combined with employers, employee IDs, and other workplace identifiers.
Detect only personal identifiers — cURL
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": "Signed by John Smith, born 03/15/1985.",
    "entities": ["PERSON_NAME", "DATE_OF_BIRTH", "AGE"]
  }'
Contact Information

Ways to reach a person. Contact data appears in nearly every support ticket, CRM export, and email thread, and it is the most common category found in application logs.

Entity TypeExampleDescription
EMAIL_ADDRESS[email protected]Email addresses in any format, including obfuscated variants like "john [at] example.com".
PHONE_NUMBER+1 (555) 123-4567Phone and fax numbers in international and national formats for every country — see language & country coverage.
URLhttps://linkedin.com/in/jsmithURLs, including personal profile links and links containing identifying query parameters.
Detect contact data — Python
resp = requests.post(
    "https://piidetectionapi.com/api/moderate.php",
    json={
        "api_key": "YOUR_API_KEY",
        "api_type": "pii_detection",
        "text": ticket_body,
        "entities": ["EMAIL_ADDRESS", "PHONE_NUMBER", "URL"],
    },
    timeout=30,
)
Government-Issued IDs

Official identification numbers. These carry the highest re-identification risk and are regulated identifiers under GDPR, CCPA, and HIPAA. The model recognizes country-specific formats (SSN, NINO, Steuer-ID, Aadhaar, and many more).

Entity TypeExampleDescription
SSN123-45-6789US Social Security Numbers, with or without dashes, including SSNs written in prose.
NATIONAL_IDQQ123456C (UK NINO)National identity numbers in country-specific formats worldwide.
TAX_ID98-7654321 (EIN)Tax identification numbers: EIN, VAT IDs, and national tax references.
PASSPORT_NUMBER545402246Passport numbers from any issuing country, usually detected via surrounding context.
DRIVERS_LICENSE_NUMBERD6101-40706-60905Driver's license numbers across jurisdictions, including US state-specific formats.
Detect government IDs — JavaScript (Node fetch)
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: document_text,
    entities: ["SSN", "NATIONAL_ID", "TAX_ID", "PASSPORT_NUMBER", "DRIVERS_LICENSE_NUMBER"],
  }),
});
const data = await resp.json();
Financial & PCI Data

Cardholder data and banking identifiers regulated by PCI DSS. Finding stray card numbers in tickets, chat logs, and databases is a core cardholder-data-discovery requirement — see the PCI DSS discovery guide.

Entity TypeExampleDescription
CREDIT_CARD_NUMBER4111-1111-1111-1111Credit and debit card PANs (Visa, Mastercard, Amex, Discover, and more), spaced, dashed, or contiguous.
CREDIT_CARD_EXPIRATION_DATE12/27Card expiration dates when they appear in a payment context.
CVV_NUMBER123Card verification codes (CVV/CVC/CID). Storing these post-authorization is prohibited by PCI DSS.
FINANCIAL_ACCOUNT_NUMBER8901234567Bank and brokerage account numbers, detected via context to avoid flagging arbitrary digits.
IBAN_CODEDE89 3704 0044 0532 0130 00International Bank Account Numbers with country-specific lengths and checksum structure.
SWIFT_BICCOBADEFFXXXSWIFT/BIC bank identifier codes (8 or 11 characters).
ROUTING_NUMBER021000021US ABA routing numbers used for wires and ACH transfers.
PCI sweep with a high confidence threshold — cURL
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": "Card 4111 1111 1111 1111 exp 12/27 CVV 123, IBAN DE89370400440532013000",
    "entities": ["CREDIT_CARD_NUMBER", "CVV_NUMBER", "IBAN_CODE", "ROUTING_NUMBER"],
    "threshold": 0.8
  }'
Medical & PHI Data

Protected Health Information under HIPAA. Beyond record numbers, the model detects free-text clinical content — diagnoses, prescriptions, treatments — that regex approaches cannot find. See the HIPAA 18-identifiers guide.

Entity TypeExampleDescription
MEDICAL_RECORD_NUMBERMRN 445-92-1187Medical record numbers assigned by hospitals and clinics.
HEALTH_INSURANCE_IDBCBS-882910334Health plan beneficiary and member ID numbers.
DIAGNOSISType 2 Diabetes (E11.9)Medical diagnoses in free text, with or without ICD codes.
PRESCRIPTIONMetformin 500mg twice dailyMedication names, dosages, and prescription instructions.
TREATMENTchemotherapy, dialysisProcedures, therapies, and treatment plans.
MEDICAL_DATAlab result HbA1c 8.2%General clinical facts: symptoms, observations, lab values, visit dates in a medical context.
MEDICAL_TERMhypertensionMedical terminology that can reveal a person's health status.
BLOOD_TYPEO-Blood group information.
BIOMETRIC_DATAfingerprint template IDBiometric identifiers: fingerprint, facial, voiceprint, retinal, and genetic references.
PHI scan of a clinical note — Python
resp = requests.post(
    "https://piidetectionapi.com/api/moderate.php",
    json={
        "api_key": "YOUR_API_KEY",
        "api_type": "pii_detection",
        "text": discharge_summary,
        "entities": ["MEDICAL_RECORD_NUMBER", "HEALTH_INSURANCE_ID",
                     "DIAGNOSIS", "PRESCRIPTION", "PERSON_NAME", "DATE_OF_BIRTH"],
        "mask_mode": "replace",  # also get a de-identified copy back
    },
    timeout=30,
)
Credentials & Secrets

Not classic PII, but the most dangerous data to leak: keys and passwords pasted into tickets, prompts, or logs grant direct system access. Scanning for this category is central to LLM guardrails and log scanning.

Entity TypeExampleDescription
PASSWORDSup3rS3cret!Passwords appearing in prose, config fragments, or credential pairs.
API_KEYsk_live_51Hxk9aB2cD3e...API keys and secret keys from common providers and generic high-entropy keys.
AUTH_TOKENBearer eyJhbGciOiJI...Bearer tokens, JWTs, session and OAuth tokens.
AWS_CREDENTIALSAKIAIOSFODNN7EXAMPLEAWS access key IDs, secret access keys, and session tokens.
AZURE_AUTH_TOKENeyJ0eXAiOiJKV1Qi... (AAD)Azure AD tokens and service principal credentials.
GCP_CREDENTIALS"type": "service_account"...Google Cloud service account keys and API keys.
SSH_KEY / PRIVATE_KEY-----BEGIN RSA PRIVATE KEY-----SSH and cryptographic private key material (RSA, ECDSA, Ed25519, PEM blocks).
DATABASE_CONNECTION_STRINGpostgres://user:pass@host/dbConnection strings embedding usernames, passwords, and hosts.
Secret scan before sending a prompt to an LLM — JavaScript
const scan = 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: userPrompt,
    entities: ["API_KEY", "PASSWORD", "AWS_CREDENTIALS", "AUTH_TOKEN",
               "PRIVATE_KEY", "DATABASE_CONNECTION_STRING"],
  }),
}).then(r => r.json());
// block or mask before the prompt leaves your perimeter
if (scan.entities_detected > 0) { userPrompt = scan.anonymized_text; }
Location Data

Where a person lives, works, or currently is. Full street addresses are direct identifiers; even city plus ZIP can re-identify people in small populations, which is why geography is quasi-identifying data under GDPR and HIPAA.

Entity TypeExampleDescription
ADDRESS123 Main St, Apt 4B, Austin, TX 78701Full or partial street and mailing addresses, in local formats worldwide.
CITYSan FranciscoCity and town names when they refer to a person's location.
STATECalifornia, CAState, province, and region names or codes.
ZIP_CODE90210, SW1A 1AAPostal and ZIP codes, including alphanumeric formats such as UK postcodes.
COUNTRYUnited KingdomCountry names and ISO codes in a personal context.
GPS_COORDINATES37.7749, -122.4194Latitude/longitude pairs and geotags.
Detect location data but keep countries — cURL
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": "Ship to 123 Main St, Austin, TX 78701, USA",
    "entities": ["ADDRESS", "CITY", "ZIP_CODE", "GPS_COORDINATES"],
    "exclude_entities": ["COUNTRY"]
  }'
Device & Network Data

Online identifiers that GDPR explicitly counts as personal data. This category dominates application logs, analytics events, and security telemetry — the focus of log file PII scanning.

Entity TypeExampleDescription
IP_ADDRESS203.0.113.55, 2001:db8::1IPv4 and IPv6 addresses.
MAC_ADDRESS00:1A:2B:3C:4D:5EHardware MAC addresses.
DEVICE_ID550e8400-e29b-41d4-a716-...Device identifiers: UUID/UDID, advertising IDs, and vendor IDs.
IMEI353456789012345Mobile equipment identity numbers.
SERIAL_NUMBERSN-ABC123456Hardware and product serial numbers.
COOKIEsession_id=a1b2c3d4...Cookie values, session IDs, and tracking identifiers.
USER_AGENTMozilla/5.0 (Windows NT 10.0...)Browser user-agent strings usable for fingerprinting.
Scrub network identifiers from a log line — Python
resp = requests.post(
    "https://piidetectionapi.com/api/moderate.php",
    json={
        "api_key": "YOUR_API_KEY",
        "api_type": "pii_detection",
        "text": log_line,
        "entities": ["IP_ADDRESS", "MAC_ADDRESS", "DEVICE_ID", "COOKIE"],
        "mask_mode": "hash",  # consistent hashes keep logs joinable
    },
    timeout=30,
)
Demographic Data

Attributes about who a person is. Several of these are GDPR Article 9 "special category" data, subject to the strictest processing rules, and protected characteristics under anti-discrimination law — important for HR and recruiting workflows.

Entity TypeExampleDescription
GENDERfemale, non-binaryGender and sex identifiers.
ETHNIC_GROUPHispanic, Han ChineseRace, ethnicity, and national-origin references. GDPR special category.
RELIGIONCatholic, MuslimReligious or philosophical beliefs. GDPR special category.
POLITICAL_AFFILIATIONLabour memberPolitical opinions and party membership. GDPR special category.
SEXUAL_ORIENTATIONgay, bisexualSexual orientation information. GDPR special category.
MARITAL_STATUSmarried, divorcedMarital and family status.
Special-category audit of survey answers — cURL
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": "Respondent: 42, married, practicing Catholic, votes Green.",
    "entities": ["ETHNIC_GROUP", "RELIGION", "POLITICAL_AFFILIATION", "SEXUAL_ORIENTATION", "MARITAL_STATUS"]
  }'
Using Entity Types in Requests

1. Detect everything (default) — omit entities and exclude_entities; all 150+ types are scanned:

{
  "api_key": "YOUR_API_KEY",
  "api_type": "pii_detection",
  "text": "Contact John Doe at [email protected] or 555-123-4567."
}

2. Detect specific types only — pass an allowlist in entities:

{
  "api_key": "YOUR_API_KEY",
  "api_type": "pii_detection",
  "text": "...",
  "entities": ["PERSON_NAME", "EMAIL_ADDRESS", "SSN"]
}

3. Skip types you don't care about — pass a blocklist in exclude_entities:

{
  "api_key": "YOUR_API_KEY",
  "api_type": "pii_detection",
  "text": "...",
  "exclude_entities": ["URL", "COUNTRY", "MEDICAL_TERM"]
}

4. Tune precision vs. recall — raise threshold (default 0.5) to keep only high-confidence detections, and use custom_instruction for natural-language exceptions:

{
  "api_key": "YOUR_API_KEY",
  "api_type": "pii_detection",
  "text": "...",
  "threshold": 0.8,
  "custom_instruction": "Do not flag 'Acme Corp' or the product name 'ProductX'"
}
 Response fields to use: read detections from detected_entities (each with type, text, start, end, confidence); entities_detected gives the total count. If you set a mask_mode (replace, redact, or hash), the privacy-safe copy is returned in anonymized_text.

See These Entity Types Detected Live

Paste your own text into the interactive demo, or follow the tutorial to run your first detection request in minutes.

 Try the Live Demo  First Request Tutorial  API Documentation