Scanning Text
Learn how to use Quba's Scan API to detect sensitive entities in text with confidence scores.
Overview
The Scan API detects sensitive entities in text and returns their positions, types, and confidence scores. Use this to identify personal, confidential, or regulated information.
Detect sensitive entities in text:
const scanResponse = await api.scanText({
text: "Patient John Smith (ID: 12345) was treated at Dubai Hospital",
language: "en",
entities: ["person", "id", "location"],
confidence_threshold: 0.5,
})Parameters:
| Parameter | Type | Description |
|---|---|---|
text | string | Input text to scan |
language | string | Language code (default: "en") |
entities | string[] | Entity types to detect |
confidence_threshold | number | Minimum confidence score (0-1) |
Anonymize API
Transform sensitive data in text:
const anonResponse = await api.anonymizeText({
text: "Contact John Doe at john.doe@example.com",
transformations: [
{
id: "replace",
targets: [{ id: "entity", entity_type: "person" }],
replacement: "[REDACTED]",
},
{
id: "replace",
targets: [{ id: "entity", entity_type: "email" }],
replacement: "[EMAIL]",
},
],
})Getting Started
Developer documentation for Quba's Sensitive Data Protection (SDP) API - detect and anonymize sensitive information in text.
Anonymization
Learn how to use Quba's Anonymization API to transform sensitive data in text using various techniques like replacement, masking, hashing, and encryption.