Aller au contenu
GET /v1/detect

Detect PII in text

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/redact-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/redact-api/v1/detect" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/redact-api/v1/detect", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/redact-api/v1/detect");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/redact-api/v1/detect",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "total": 2,
        "counts": {
            "email": 1,
            "phone": 1
        },
        "matches": [
            {
                "end": 28,
                "type": "email",
                "start": 8,
                "value": "[email protected]"
            },
            {
                "end": 54,
                "type": "phone",
                "start": 37,
                "value": "+1 (555) 123-4567"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-03T09:25:09.330Z",
        "request_id": "9e35543d-206a-46ca-9437-e393f806c55f"
    },
    "status": "ok",
    "message": "Detect PII in text",
    "success": true
}