Detection Engines

Local Mode vs Cloud API

Blindfold has two PII detection engines. Local Mode runs offline in your process using regex and checksum validation. Cloud API adds NLP-powered detection for names, addresses, and unstructured text. Use one or both depending on your needs.

At a glance

FeatureLocal ModeCloud API
Detection engineRegex + checksum validationNLP (GLiNER) + regex
Entity types86 regex-based types60+ NLP types + all 86 regex types
Offline capableYes — no network neededNo — requires API call
API key requiredNoYes
Names & addressesNoYes — NLP-powered
Structured PIIEmails, SSNs, credit cards, IBANs, etc.All structured PII + unstructured
Languages30+ country-specific formats18+ languages with NLP
SpeedSub-millisecond~100-300ms per request
PricingFree foreverFree tier (500K chars/mo), then usage-based
Data residencyData never leaves your machineEU (Frankfurt) or US (Virginia)
Compliance policiesSupported (GDPR, HIPAA, PCI DSS)Supported (GDPR, HIPAA, PCI DSS)

How detection works

Local Mode — Regex + Checksum

Runs entirely in your process. Matches PII using regular expressions with checksum validation (e.g., Luhn for credit cards, MOD 11 for SSNs). Zero network calls, zero latency overhead.

  • Pattern matching for structured data formats
  • Checksum validation reduces false positives
  • Country-specific patterns (30+ countries)
  • Works offline in any environment

Cloud API — NLP (GLiNER)

Sends text to the Blindfold API where a GLiNER NLP model detects entities that regex cannot match — person names, organizations, physical addresses, medical records. Runs both engines in a single call.

  • Named entity recognition for unstructured text
  • Detects names, addresses, orgs, medical terms
  • Auto-detects 18+ languages
  • Regex results included automatically

What each mode detects

Local mode

Free, offline, no API key. 86 regex types with checksum validation.

Email addressesCredit cardsPhone numbersSSNsIBANsIP addressesURLsDates of birthPassport numbersDriver's licensesTax IDs / EINsVAT IDsZIP / Postal codes30+ country IDs

Cloud API

NLP-powered detection for names, addresses, orgs. 60+ additional types.

Person namesOrganizationsPhysical addressesMedical recordsDatesNationalitiesCustom entitiesAll local entities

When to use each

Use Local Mode when

  • You need offline or air-gapped PII detection
  • You are scanning structured data (CSVs, logs, configs)
  • You want zero-latency detection in CI/CD pipelines
  • Data cannot leave your machine or network
  • You want free PII detection with no usage limits
  • You are detecting structured PII (emails, SSNs, credit cards, IBANs)

Use Cloud API when

  • You need to detect names, addresses, or organizations
  • You are processing unstructured text (support tickets, LLM prompts)
  • You need multilingual detection across 18+ languages
  • Compliance policies (GDPR, HIPAA, PCI DSS) are required
  • You need audit logging and a dashboard
  • You want the highest detection accuracy possible

They work together

When you use the Cloud API, both engines run in a single call. The regex engine catches structured PII (emails, SSNs, credit cards) while the NLP model catches unstructured PII (names, addresses, organizations). You get the best of both worlds without any extra configuration. If you initialize the SDK without an API key, it falls back to local mode automatically.

Code examples

The same SDK handles both modes. Without an API key, detection runs locally. With an API key, detection uses the Cloud API.

Local mode (no API key)

from blindfold import Blindfold

# No API key — runs locally
bf = Blindfold()

result = bf.detect("Email me at john@acme.com, SSN 123-45-6789")
for entity in result.detected_entities:
    print(f"{entity.type}: {entity.text}")
# Email Address: john@acme.com
# SSN: 123-45-6789

Cloud API (with API key)

from blindfold import Blindfold

# With API key — uses Cloud API (NLP + regex)
bf = Blindfold(api_key="your-api-key")

result = bf.detect("Contact John Smith at 123 Main St, New York")
for entity in result.detected_entities:
    print(f"{entity.type}: {entity.text}")
# Person: John Smith
# Address: 123 Main St, New York

Get started free

Local mode is free forever. Cloud API includes 500K free characters per month.