text

Use this when scrubbing test/dev text: replaces each occurrence of the given terms with block characters (████).

Use this when scrubbing test/dev text: replaces each occurrence of the given terms with block characters (████). Provide text plus terms (a comma-separated string or an array of strings). By default it matches whole words only using Unicode boundaries (so "ann" will not match inside "annual") and is case-insensitive; set caseSensitive to match exactly, wholeWords: false to match substrings, or fixedWidth: true to hide each term's length behind a constant-width bar. Returns the redacted text and a replacement count, and never echoes the original terms. Deterministic: same input, same output. Truly sensitive text is better redacted client-side at clean.tools/text-redact/. Example: {text: "Contact Jane Doe", terms: "Jane Doe"} -> redacted "Contact ████████", redactedCount 1.

post/v1/redact_text

Request

  • Base URL: https://api.clean.tools
  • URL: https://api.clean.tools/v1/redact_text
  • Auth: none declared

Request body

textstring required

The text to redact terms from.

wholeWordsboolean

When true (default), only match terms as whole words using Unicode word boundaries (so "ann" will not match inside "annual").

caseSensitiveboolean

When true, match terms case-sensitively. Defaults to false (case-insensitive).

fixedWidthboolean

When true, replace every matched term with a constant-width block bar so the redacted length does not leak the original term length. Defaults to false (block length equals term length).

Response

Structured tool result.

toolstring

Changes

No recorded changes to this operation across all 1 revision of this API.