POST
security
pii_detect
1 creditDetect PII (emails, phones, SSNs, credit cards, personnummer) in text
Endpoint
POST /api/v1/tools/security/pii_detect
Body Parameters
text
string
required
Example
input
Request
{
"text": "Contact john@example.com or call 555-123-4567"
}
output
Response
{
"count": 2,
"findings": [
{
"end": 24,
"type": "email",
"start": 8,
"value": "john@example.com"
},
{
"end": 45,
"type": "phone",
"start": 33,
"value": "555-123-4567"
}
],
"types_found": [
"email",
"phone"
]
}
Response Format
HTTP/1.1 200 OK
SUCCESS
{
"success": true,
"data": {
"count": 2,
"findings": [
{
"end": 24,
"type": "email",
"start": 8,
"value": "john@example.com"
},
{
"end": 45,
"type": "phone",
"start": 33,
"value": "555-123-4567"
}
],
"types_found": [
"email",
"phone"
]
},
"meta": {
"tool": "pii_detect",
"credits_consumed": 1
}
}
HTTP/1.1 422 Unprocessable Entity
ERROR
{
"success": false,
"data": null,
"error": {
"code": "validation_error",
"message": "The given data was invalid."
}
}
Sign in to try this tool directly from the docs.
Code Examples
Request Example
lightbulb
Developer Tip
Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.