Text tools

Redact Indian personal identifiers

Masks Aadhaar numbers (Verhoeff-checked), PAN, GSTIN (checksum-checked), card numbers (Luhn-checked), Indian mobile numbers, email addresses, UPI IDs, vehicle numbers, voter IDs, passport numbers and IP addresses. Returns where each was found, never the values. With names=true a model also masks people's names: IndicNER for Indian scripts, bert-base-NER for English. Street addresses are not detected.

get/v1/text/redact

Request

  • Base URL: https://api.dharun.dev
  • URL: https://api.dharun.dev/v1/text/redact
  • Auth: none declared

Query parameters

textstring

The text (or POST it).

typesstring

Comma-separated kinds to redact; default all. Kinds: email, upi, gstin, card, aadhaar, pan, phone, vehicle, voter_id, passport, ip.

style'label' | 'partial'

label replaces with [PAN]; partial keeps the last digits, as on a bank statement. Default label.

names'true' | 'false'

true also finds people's names with a model (slower; text up to 20,000 characters). Default false.

Response

Success

dataunknown required

Changes

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