PII Redactor

Detect and redact personally identifiable information from text. $0.02 per request.

What it does

Send text — a document, a support ticket, a log line, a form submission — and get back the same text with names, emails, phone numbers, addresses, government IDs, and other sensitive identifiers replaced with type labels, plus a structured list of what was found.

Endpoint

MethodPOST
Path/redact
Content-Typeapplication/json

Fields

fieldrequireddescription
textyesThe text to redact, max 50,000 characters

Example

curl -X POST https://pii-redactor.pdfextractapi.workers.dev/redact \
  -H "Content-Type: application/json" \
  -d '{"text": "Contact John Smith at john@example.com or 555-123-4567."}'

Example response

{
  "redacted_text": "Contact [NAME] at [EMAIL] or [PHONE].",
  "has_pii": true,
  "entities": [
    { "type": "NAME", "value": "John Smith" },
    { "type": "EMAIL", "value": "john@example.com" },
    { "type": "PHONE", "value": "555-123-4567" }
  ]
}

Errors

Errors return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: missing_text, text_too_large, invalid_request.

Payment

This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.

Try it in your browser

Paste some text below and submit — you'll be prompted to connect a wallet and pay $0.02, then see the result.