Overview
The piisafe.eu scanner API is a small HTTP interface for starting a website scan, polling its progress and fetching its findings. A scan session is a server-side record that exists in memory only: it holds the crawl queue, the findings so far and the counters the browser polls, and it is deleted 35 minutes after the scan ends. A finding is a single detected entity — its type, the page it was found on and its position in that page's text.
piisafe.eu integrates with the anonym.legal PII detection API to scan websites for exposed personal information:
- 58 entity types covering personal identifiers, financial data, contact details, health records and national IDs
- 24 compliance presets (GDPR, HIPAA, PCI-DSS, regional)
- 48 languages — 43 with a dedicated language model, 5 served by a fallback model
The API uses hybrid detection combining machine learning models with deterministic regex patterns for highly accurate PII identification across all 48 supported languages.
Detection API
anonym.legal
PII Detection & Anonymization
API Endpoints
Base URL: https://anonym.legal
| Endpoint | Method | Purpose |
|---|---|---|
/api/presidio/analyze |
POST | Detect PII entities in text |
/api/presidio/anonymize |
POST | Replace detected entities with placeholders |
/api/presidio/deanonymize |
POST | Restore original values from placeholders |
/api/mcp/image |
POST | Detect and redact PII in images |
/api/health |
GET | Service health check |
piisafe.eu never calls these endpoints directly from the browser. It proxies them through its own routes:
| piisafe.eu Route | Method | Purpose |
|---|---|---|
/api/anonym/test |
POST | Validate an API key |
/api/anonym/catalog |
GET | Entity, preset and language catalog |
/api/anonym/analyze |
POST | Analyze text for PII |
/api/anonym/anonymize |
POST | Anonymize text |
/api/anonym/deanonymize |
POST | De-anonymize text |
Detection Capabilities
| Entity Category | anonym.legal | Examples |
|---|---|---|
| Identifiers | ✓ | SSN, Tax ID, Passport, Driver License |
| Financial | ✓ | Credit Card, IBAN, SWIFT, Bank Account |
| Contact | ✓ | Email, Phone, Address, IP Address |
| Healthcare | ✓ | Medical Records, Insurance ID, Prescription |
| Regional Specific | ✓ (All 48 languages) | German Tax, French CNI, Italian CODICE |
Getting Started
Step 1: Get an API Key
- Visit
https://anonym.legal - Choose a pricing plan (API access starts at €3/month)
- Access "Settings" → "API Credentials"
- Your API key is auto-generated
- Copy the key to use in piisafe.eu
Step 2: Enter API Key in piisafe.eu
- Go to
https://piisafe.eu/scanner.html - Click "Scanner" in the navigation
- Enter your anonym.legal API key
- Click "Validate Key" to confirm
Step 3: Configure Detection Settings
After validation, choose:
- Compliance Preset: GDPR, HIPAA, PCI-DSS, CCPA, or custom
- Language: 48+ languages for region-specific patterns
- Entity Threshold: Confidence score (60-95%)
API Flow Diagram
Here's how piisafe.eu orchestrates the scanning process:
Supported Entity Types
anonym.legal detects and classifies 58 entity types, grouped into the following categories:
Core Entity Categories
- Universal: CREDIT_CARD, CRYPTO, DATE_TIME, EMAIL_ADDRESS, IBAN_CODE, IP_ADDRESS, LOCATION, NRP, PERSON, PHONE_NUMBER, URL
- Personal Identifiers: AGE
- Financial Data: SWIFT_CODE
- Health & Medical: ICD_CODE, MEDICAL_LICENSE, MEDICAL_RECORD_NUMBER
- Digital & Technical: MAC_ADDRESS
- Vehicle & Transport: VIN
- Organization: ORGANIZATION
- Education: STUDENT_ID
- Legal: BAR_NUMBER, CASE_NUMBER
- United Kingdom: UK_NHS, UK_DRIVER_LICENSE, UK_NINO, UK_PASSPORT
- United States: US_BANK_NUMBER, US_DRIVER_LICENSE, US_ITIN, US_PASSPORT, US_SSN
- European Union: BG_EGN, CZ_RODNE_CISLO, EE_ID_CARD, LV_ID_CARD, LV_PERSONAS_KODS, SK_RODNE_CISLO
- Asia-Pacific: AU_ABN, AU_ACN, AU_MEDICARE, AU_TFN, AU_PASSPORT, AU_DRIVER_LICENSE, IN_AADHAAR, IN_PAN, IN_PASSPORT, NZ_PASSPORT, NZ_IRD, NZ_NHI, NZ_DRIVER_LICENSE, SG_UEN, SG_PASSPORT
- Americas: CA_PASSPORT, CA_SIN, CA_DRIVER_LICENSE
- Africa & Middle East: IL_ID_NUMBER, TR_DRIVER_LICENSE, TR_KIMLIK_NO
Regional & Language-Specific Entities
48 languages are supported for text analysis. Dedicated national identifier types exist for 14 countries:
- United States: US_SSN, US_ITIN, US_PASSPORT, US_DRIVER_LICENSE, US_BANK_NUMBER
- United Kingdom: UK_NINO, UK_NHS, UK_PASSPORT, UK_DRIVER_LICENSE
- Australia: AU_TFN, AU_ABN, AU_ACN, AU_MEDICARE, AU_PASSPORT, AU_DRIVER_LICENSE
- New Zealand: NZ_PASSPORT, NZ_IRD, NZ_NHI, NZ_DRIVER_LICENSE
- India: IN_AADHAAR, IN_PAN, IN_PASSPORT
- Canada: CA_SIN, CA_PASSPORT, CA_DRIVER_LICENSE
- Turkey: TR_KIMLIK_NO, TR_DRIVER_LICENSE
- Latvia: LV_ID_CARD, LV_PERSONAS_KODS
- Bulgaria, Czechia, Slovakia, Estonia, Israel, Singapore: BG_EGN, CZ_RODNE_CISLO, SK_RODNE_CISLO, EE_ID_CARD, IL_ID_NUMBER, SG_UEN, SG_PASSPORT
- Content from any other country is covered by the universal types: names, e-mail addresses, phone numbers, IBANs, credit cards, locations and organisations
Chunking Strategy (Smart Splitting)
Since the API has a 50,000 character limit per request, piisafe.eu uses intelligent chunking to analyze pages of any size:
How Chunking Works
- Measure: Check extracted text length
- Split: If > 49,500 chars, split at word boundaries
- Process: Send each chunk to API sequentially
- Offset: Adjust entity positions to original text location
- Aggregate: Combine results across all chunks
Chunking Configuration
| Parameter | Value | Rationale |
|---|---|---|
| Max Characters | 50,000 | API hard limit |
| Safety Margin | 49,500 | Prevents boundary issues |
| Split Method | Word Boundary | Preserves sentence/word integrity |
| Processing | Sequential | Respects rate limits |
| Retry Logic | 3 attempts per chunk | Handles transient failures |
Example: 65KB Page Scanning
Cost Trade-off: A 65KB page requires 2 API calls instead of 1, doubling token usage for that page. However, this is better than partial scanning (23% data loss).
Rate Limits & Quotas
piisafe.eu Rate Limiting (Server-Side)
| Limit | Value | Applies To |
|---|---|---|
| API Requests | 30 per minute | /api/anonym/* general proxy |
| PII Scan Starts | 20 per hour | New PII scans |
| PII Scan Polling | 120 per minute | All /api/scanner/* routes |
| Dead-Link Scan Starts | 30 per hour | New dead-link scans |
| Dead-Link Scan Polling | 120 per minute | All /api/deadlinks/* routes |
| Max Pages/PII Scan | 1,000 | Per-scan cap |
| Max Pages/Dead-Link Scan | 500 | Per-scan cap |
| Session Timeout | 35 minutes | Abandoned scans |
| Request Body Size | 10MB max | POST payload sent to the API - this is not a cap on scan result size |
Starting a PII scan consumes both buckets: the request counts against the 20-per-hour start limit and against the shared 120-per-minute limit that covers every /api/scanner/* route. There is no separate cap on how many scans may run at the same time.
anonym.legal Limits
- €3/month entry tier (limited requests)
- Higher plans available (contact sales)
- Rate limits vary by tier
- Token quotas per plan - see the anonym.legal dashboard
Handling Rate Limit Errors
If you receive a 429 (Too Many Requests) error:
- Wait 15-30 seconds before retrying
- Reduce concurrent scan count
- Verify your anonym.legal subscription is active
- Contact anonym.legal support if the issue persists
Pricing & Costs
anonym.legal Pricing
| Plan | Cost | API Calls | Features |
|---|---|---|---|
| Starter | €3/month | 100/month | Individual use |
| Pro | €19/month | 1,000/month | Teams, higher limits |
| Enterprise | Custom | Custom | Unlimited, support, SLA |
Cost Estimation
Example: Scanning 10 websites (average 20 pages per site = 200 pages total)
With anonym.legal (Starter):
- €3/month base cost
- 100 API calls/month included
- Overflow calls billed separately (typically €0.01-0.05 per call)
- 200 pages may require additional tier or overflow costs
Error Handling & Troubleshooting
Common Error Codes
Network & Connectivity Issues
Timeout errors: If scan stalls after 30+ seconds, the API may be slow or unreachable:
- Check your internet connection
- Verify browser console for network errors (F12)
- Try a smaller scan (fewer pages)
- Check the API status at
https://anonym.legal/api/health
CORS (Cross-Origin) errors: If you see "CORS policy" error in console:
- This is expected for cross-domain API calls
- piisafe.eu uses CORS proxying on backend
- No action needed—should resolve automatically
- If persists, contact support
Debug Mode
Open browser DevTools (F12) to see detailed error logs:
For support, collect these details:
- Error message (exact text)
- URL being scanned
- Browser console screenshot
- Timestamp of error
Code Examples
Example 1: Validating API Key (JavaScript/Frontend)
Example 2: Sending Text for Analysis
Example 3: Chunking Text (50K Limit)
Example 4: Handling Real-Time Progress (Polling)
The status route answers with a single JSON document, not an event stream - poll it on an interval. This is what the scanner UI itself does.
Example 5: Exporting Results
Frequently Asked Questions
Getting API Keys
Q: Can I use the same API key across multiple devices?
A: Yes. API keys are account-based, not device-specific. Store securely and avoid sharing publicly.
Q: What if I lose my API key?
A: Regenerate it in your provider dashboard. Old key becomes invalid immediately. Update piisafe.eu with new key.
Q: Is there a free tier?
A: Not for API access. anonym.legal's free plan does not include API keys; API plans start at €3/month. Check the anonym.legal dashboard for current tiers.
Scanning & Detection
Q: What happens if a page has no PII?
A: Scan completes successfully with an "A" grade. Findings list is empty. API call still counts against quota.
Q: Can I scan password-protected websites?
A: No. piisafe.eu scans public HTML only. For protected content, export HTML manually, then upload as raw text.
Q: How accurate is PII detection?
A: The API uses an ML + regex hybrid model. Accuracy: 85-95% depending on entity type and regional variations. Some false positives/negatives possible. Manual review recommended.
Q: Does the chunking affect detection accuracy?
A: No. Chunking splits at word boundaries, preserving context. Results are identical to single-chunk processing.
Pricing & Costs
Q: What's the cheapest way to scan many pages?
A: anonym.legal Pro (€19/month) offers 1,000 API calls/month — the lowest cost per scan. For higher volumes, the Enterprise tier scales beyond that.
Q: Do chunked pages cost more?
A: Yes. A 100KB page = 2 API calls = 2× token cost. However, 100% of text is analyzed vs. partial scanning before.
Q: Can I buy capacity in advance?
A: anonym.legal is subscription-based — you can upgrade your tier at any time.
Data Privacy
Q: Does piisafe.eu store my API key?
A: No. Your key is saved in your browser's localStorage and passes through the piisafe.eu server to anonym.legal on each request — it is never stored or logged server-side.
Q: Does piisafe.eu store scan results?
A: No. Results are held in server memory only and are never written to a database, disk or log. Finished sessions are automatically deleted within 35 minutes; a service restart clears them immediately.
Q: Can I use piisafe.eu for client/customer websites?
A: Yes! Perfect for consultants, security teams, compliance officers. Audit trail kept locally. No data leaves your device.
Technical
Q: What browsers are supported?
A: Modern browsers (Chrome, Firefox, Safari, Edge 2020+). Requires JavaScript and fetch API support. Mobile browsers supported.
Q: Can I integrate piisafe.eu into my own app?
A: Yes! Clone the repo from GitHub, customize backend routes, integrate with your own infrastructure. Full source code available.
Q: What's the difference between piisafe.eu and the APIs directly?
A: piisafe.eu adds: automatic chunking, visual UI, real-time progress, multiple export formats, easy entity selection, preset compliance profiles.
Q: Can I scan multiple websites simultaneously?
A: Yes - there is no separate concurrent-scan cap. Each scan you start counts toward the 20-scans-per-hour limit, and heavy simultaneous polling can hit the shared 120-requests-per-minute status-poll limit, so running many at once may return a 429 sooner.