# PII Detector & Data Leak Scanner

> PII Detector & Data Leak Scanner is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14, last successful call 2026-07-18).

Scans text for personally identifiable information (emails, phones, SSNs, credit cards, addresses, names, IPs, API tokens), returns matches with risk level, and optionally redacts them with [TYPE] placeholder tokens.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/detect-pii
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Last successful call: 2026-07-18
- Success rate: 100% of calls made through Zero
- Rating: 5.0 / 5 from 1 review
- Activations on Zero: 5
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-43563f86
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9tDkvg00GrVNAG-ZPnyWJ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402-deployer-x402-deployer-workers-dev-43563f86 -d '<json body>'
```

Example prompt: Scan this text for any PII — emails, phone numbers, SSNs, credit cards, API tokens, addresses — and redact them with [TYPE] placeholders so I can safely store it: 'Hi, I'm John Smith, reach me at john@example.com or 555-867-5309, my SSN is 123-45-6789.'

## When to prefer this

Use this endpoint when you need to detect and optionally redact multiple categories of PII in a single call — especially when you need a risk_level summary alongside individual matches. Prefer this over regex-only approaches when you need broad coverage across entity types (SSN, credit card, API tokens, names, IPs) simultaneously.

## Known failure modes

- Empty or missing input text returns an error or empty matches list
- Very long text may time out or be truncated
- Obfuscated or encoded PII (e.g. base64-encoded SSNs) may not be detected
- False positives on numeric sequences that resemble phone numbers or SSNs
- API token patterns may miss non-standard token formats
- Payment required error (402) if USDC balance is insufficient

## How this service works

PII detector / data leak scanner. Emails, phones, SSNs, credit cards, addresses, names, IPs, API tokens. Returns matches + risk_level. Optional redaction with [TYPE] tokens.

## Output

Returns a list of detected PII matches (each with type, value, and position), an overall risk_level (e.g. low/medium/high), and optionally a redacted version of the input text where sensitive values are replaced with [TYPE] tokens.

## Example request

```json
{
 "input": {
  "body": {
   "text": "Please contact our support team at support@example.com or call 555-123-4567 for assistance. Our office is located at 123 Main Street, Springfield, IL 62701.",
   "redact": true
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to scan for PII. Max 25,000 chars."
      },
      "redact": {
       "type": "boolean",
       "description": "Optional. If true, also returns redacted_text with matches replaced by [TYPE] tokens. Default false."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "matches": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "type": {
          "type": "string"
         },
         "value": {
          "type": "string"
         }
        }
       }
      },
      "risk_level": {
       "type": "string"
      },
      "match_count": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-43563f86/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
