Know what personal data is in the text before your agent passes it on.
Agents read support tickets, forms, transcripts, CSV exports and tool output, then log them, store them or send them to another model. The PII detector scans any text (or a public URL) for emails, phone numbers, payment cards, bank and government identifiers, dates of birth and addresses on the network, returns each one masked with its position, and can hand back a redacted copy where the same person stays [EMAIL_1] throughout.
What you get back
- found, count and the highest severity (high: cards, IBANs, government IDs, passports; medium: emails, phones, dates of birth; low: IP and wallet addresses)
- findings[]: type, category (contact, financial, government-id, personal, network), confidence, masked value, placeholder, line and column, detail (card brand, IBAN country, phone country, private IP)
- byType and byCategory counts for a quick picture
- redacted: the same text with every value replaced by a stable placeholder (optional); amounts, dates and version numbers are left alone
- Checksums where they exist: Luhn for cards, mod-97 for IBANs, Verhoeff for Aadhaar; context words such as SSN, PAN or phone lift confidence
Call it from your code or agent
Same input and the same JSON answer everywhere. You're only charged when the call succeeds. Want to see the output first?
Your key gives 20 free calls a day on this tool, then uses prepaid credit. No key yet? Send X-Exepal-Trial: 1 instead, or get one free at exepal.com/key.
curl -X POST https://api.exepal.com/v1/scan/pii \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_KEY" \
-d '{"text":"Call Sita on +977-9841234567 or sita@example.org, card 4111 1111 1111 1111","redact":true}'Your key gives 20 free calls a day on this tool, then uses prepaid credit. No key yet? Send X-Exepal-Trial: 1 instead, or get one free at exepal.com/key.
const res = await fetch("https://api.exepal.com/v1/scan/pii", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer YOUR_KEY" },
body: JSON.stringify({
"text": "Call Sita on +977-9841234567 or sita@example.org, card 4111 1111 1111 1111",
"redact": true
}),
});
const data = await res.json();Your key gives 20 free calls a day on this tool, then uses prepaid credit. No key yet? Send X-Exepal-Trial: 1 instead, or get one free at exepal.com/key.
import requests
r = requests.post(
"https://api.exepal.com/v1/scan/pii",
headers={"Authorization": "Bearer YOUR_KEY"},
json={
"text": "Call Sita on +977-9841234567 or sita@example.org, card 4111 1111 1111 1111",
"redact": True
},
timeout=120,
)
print(r.json())Add Exepal once and your assistant can call scan_pii by itself. More clients on the integrate page.
# Claude Code
claude mcp add --transport http exepal "https://api.exepal.com/mcp?key=YOUR_KEY"
# Cursor, Windsurf, Claude Desktop and most clients (mcp.json)
{
"mcpServers": {
"exepal": { "url": "https://api.exepal.com/mcp?key=YOUR_KEY" }
}
}No key at all: an agent with a wallet pays per call in USDC on Base. npm i @x402/fetch @x402/evm viem. How x402 works.
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const pay = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(privateKeyToAccount(process.env.WALLET_KEY)) }],
});
const res = await pay("https://api.exepal.com/v1/scan/pii", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"text": "Call Sita on +977-9841234567 or sita@example.org, card 4111 1111 1111 1111",
"redact": true
}),
});Questions
- Do you store what I send?
- No. The text is scanned in memory and the response carries masked values and placeholders only. Nothing is logged except the call's price and outcome.
- What is detected, and what is not?
- Emails, phone numbers (international, Indian, Nepali and local formats), payment cards, IBANs, Aadhaar, Indian PAN, US SSN, UK National Insurance numbers, Nepal citizenship numbers, passport numbers, dates of birth, IPv4/IPv6 and crypto wallet addresses. Names and street addresses are not detected: without a language model they cannot be told apart from ordinary words, and guessing produces noise.
- How does this compare with cloud DLP APIs?
- Google Cloud DLP and Amazon Comprehend PII start around $1 per 1,000 units and need an account and an SDK. This is one HTTP call from any language for $0.002, with no account, paid per call. It covers the identifiers an agent is likely to meet, including South Asian ones the big providers skip.