ohmywrap
Get an API key

§ Find and remove

Detect PII API

The same scan as /text/redact, reporting instead of rewriting. You get a total, a per-detector tally, and byte offsets into your own copy of the text. The matched text is absent unless you ask for it: echoing personal information into a response body puts it straight into the caller’s logs, which is usually the opposite of why they called.

Endpoint
POST /text/detect
Inputs
Exactly 1 UTF-8 text file
Returns
application/json
Limits
2 MB per file, 4 MB per request, 1,000 custom terms.
Price
$0.001

§ 01 The request

One POST, and the file comes back.

POST /text/detect
curl -sS --fail-with-body \
  -H "Authorization: Bearer $OHMYWRAP_KEY" \
  -F "file=@notes.txt" \
  -F 'options={"detect":["email-address","credit-card"]}' \
  https://api.ohmywrap.com/text/detect

Options

Options accepted inside the options JSON object
OptionTypeDefaultWhat it does
detectstring[]the 13 defaultsWhich detectors to run. Omitting it means the defaults; sending [] means none of them, which is how you ask for `terms` and nothing else. `date`, `age`, `zip-code` and `url` exist but are off by default, because they fire constantly in ordinary prose.
termsstring[]An inline dictionary of exact phrases to treat as sensitive. Up to 1,000 terms of 256 bytes each. Every entry is another pass over the input, bought for the same single call.
caseSensitiveboolfalseApplies to `terms` only. The built-in detectors set their own case rules per pattern.
onlyValidCreditCardNumbersboolfalseRun a Luhn check before reporting a card. Trades a little recall for far fewer false positives on long digit runs.
includeMatchesboolfalseEcho the matched text alongside each finding. Sending it to /text/redact is 422 option_not_applicable.

Worth knowing

`start` and `end` are byte offsets, not rune indices, so `text[start:end]` is the match in your own copy. Use this to find out whether a document needs handling, not to certify that it does not.

Your first /text/detect call takes one line of curl.

Ten thousand calls cost ten dollars, the pack never expires, and nothing you send is kept.

10,000 calls for $10. No subscription, no expiry.