Detect and redact personally identifiable information from text. $0.02 per request.
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.
| Method | POST |
|---|---|
| Path | /redact |
| Content-Type | application/json |
| field | required | description |
|---|---|---|
text | yes | The text to redact, max 50,000 characters |
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."}'
{
"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 return a non-200 status with { "error": { "code": "...", "message": "..." } }. Common codes: missing_text, text_too_large, invalid_request.
This endpoint is paid per-request via the x402 protocol (HTTP 402 + USDC). Unpaid requests receive a 402 response with payment instructions.
Paste some text below and submit — you'll be prompted to connect a wallet and pay $0.02, then see the result.