Tools › Entity types

Health data

Redact medications from text, JSON, and CSV

Medication names reveal a condition by inference, so redacting a diagnosis while leaving the prescription visible defeats the purpose.

Try it on the live API No signup. 2,000 characters, 20 runs per 10 minutes.
Output appears here.

How Redactly detects medications

  • Detected by the model rather than a drug dictionary, so brand and generic names are both covered.
  • Spans are extended across contiguous word characters, which fixes the common failure where only part of a drug name is tagged.
  • Dosages are left in place unless they are separately detected as an amount.

Why redact medications?

A prescription names the condition indirectly and is often easier to detect than the diagnosis itself.

Example request

curl -X POST https://api.bitbanger.in/v1/redact \
  -H "X-API-Key: rdct_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"text": "Current prescription: atorvastatin 20mg nightly.", "style": "replace"}'

Every hit in the response carries entity, text, start, and end. The offsets index into the text you sent, so you can apply the redactions to your own copy of the document. The full response schema is in the API reference.

Questions

Does Redactly redact medications automatically?

Yes. Send text to the API and every detected type is redacted, including medications. To redact only this type, pass the value healthcare.medication in the entities filter. No training or configuration is required.

What happens to medications after redaction?

With style set to replace, each match becomes [healthcare.medication] — the entity type in square brackets. Setting style to mask replaces every character with a block character, and remove deletes the span entirely.

Related entity types

Redact medications in production

Get an API key and send your first request in a minute. Plans start at $24/month.

See pricing