webfilteringdatabase.com
Home Find Your Solution
Features
Domain Categorization API Real-Time Classification 59 Filtering Categories Offline Database (100M) ML Classification Content Classification
Industries
K-12 Schools Corporate Healthcare Government ISPs
Tools
Domain Lookup Bulk Categorization Category Explorer
Resources
Pricing API Documentation Login / Sign Up
Developer Documentation

API Documentation

Everything you need to integrate Anonymization API into your applications. Comprehensive guides, detailed endpoint references, code examples, and best practices for protecting sensitive data at scale.

v2.0
API Version
REST
Architecture
99.99%
Uptime SLA
Navigation

Documentation Overview

Find exactly what you need. Our documentation is organized to help both newcomers and experienced developers.

Security

Authentication

All API requests require authentication using an API key. Your key should be kept secret and never exposed in client-side code.

API Key Authentication

Authentication with the Anonymization API is done via API keys passed in the request header. Every account can create multiple API keys for different environments or applications, and keys can be revoked at any time without affecting other keys.

Header Format: Include your API key in the Authorization header using the Bearer token format. Never embed your API key directly in URLs or client-side code where it could be exposed.

Environment Variables: We recommend storing your API key in an environment variable rather than hardcoding it. This makes it easy to use different keys for development, staging, and production without code changes.

Key Rotation: Regularly rotate your API keys as a security best practice. You can create a new key, update your applications, then delete the old key without any service interruption.

HTTP Header
Authorization: Bearer your_api_key_here
Content-Type: application/json
API Reference

Core Endpoints

Our RESTful API provides endpoints for text anonymization, entity detection, batch processing, and more. All endpoints accept and return JSON.

POST /v2/anonymize

The primary endpoint for anonymizing text. Detects sensitive entities and applies the specified anonymization technique (redact, mask, pseudonymize, or generalize). Supports plain text, JSON, and structured data formats.

Request Parameters

Parameter Type Required Description
text string Required The text content to anonymize. Maximum 100KB per request.
mode string Optional Anonymization mode: "redact", "mask", "pseudonymize", "generalize". Default: "redact"
entity_types array Optional Array of entity types to detect. Default: all supported types.
language string Optional ISO 639-1 language code. Default: auto-detect.
return_entities boolean Optional Include detected entities in response. Default: true

Example Request

cURL
curl -X POST https://api.anonymizationapi.com/v2/anonymize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Contact John Smith at [email protected] or 555-123-4567",
    "mode": "redact",
    "entity_types": ["PERSON", "EMAIL", "PHONE"]
  }'

Example Response

JSON
{
  "anonymized_text": "Contact [PERSON] at [EMAIL] or [PHONE]",
  "entities": [
    {
      "type": "PERSON",
      "text": "John Smith",
      "start": 8,
      "end": 18,
      "confidence": 0.98
    },
    {
      "type": "EMAIL",
      "text": "[email protected]",
      "start": 22,
      "end": 42,
      "confidence": 0.99
    },
    {
      "type": "PHONE",
      "text": "555-123-4567",
      "start": 46,
      "end": 58,
      "confidence": 0.97
    }
  ],
  "processing_time_ms": 47,
  "model_version": "2.1.0"
}
POST /v2/detect

Detect sensitive entities in text without modifying the content. Useful for analysis, auditing, or when you want to handle anonymization yourself. Returns detailed information about each detected entity including position, type, and classification detail.

Parameter Type Required Description
text string Required The text content to analyze for sensitive entities.
entity_types array Optional Specific entity types to detect. Default: all types.
min_confidence float Optional Minimum confidence threshold (0.0-1.0). Default: 0.7
POST /v2/batch

Process multiple texts in a single request for improved efficiency. Ideal for bulk processing scenarios. Accepts up to 100 texts per request and returns results in the same order. More cost-effective than individual requests for large volumes.

Parameter Type Required Description
items array Required Array of objects, each containing text and optional per-item settings.
default_mode string Optional Default anonymization mode for all items. Default: "redact"
Detection

Supported Entity Types

Our AI models detect over 70 types of sensitive data across personal identifiers, financial information, healthcare records, and more. Here are the most commonly used entity types.

PERSON
EMAIL
PHONE
SSN
CREDIT_CARD
ADDRESS
DATE_OF_BIRTH
PASSPORT
DRIVERS_LICENSE
BANK_ACCOUNT
MEDICAL_RECORD
IP_ADDRESS
View All 70+ Entity Types
Error Handling

HTTP Response Codes

The API uses standard HTTP response codes to indicate success or failure. All error responses include a JSON body with additional details.

200 Success. Request processed successfully.
201 Created. Resource created successfully (batch jobs).
400 Bad Request. Invalid parameters or malformed JSON.
401 Unauthorized. Missing or invalid API key.
403 Forbidden. API key lacks required permissions.
429 Rate Limited. Too many requests, slow down.
500 Server Error. Internal error, retry with backoff.
503 Service Unavailable. Temporary maintenance.
Error Response Example
{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "The 'text' parameter is required",
    "details": {
      "parameter": "text",
      "reason": "missing"
    }
  },
  "request_id": "req_abc123xyz"
}

Rate Limits & Quotas

Rate limits protect the API from abuse and ensure fair access for all users. Limits vary by plan and are applied per API key. When you exceed a limit, you'll receive a 429 response with a Retry-After header indicating when to retry.

Free Tier: 60 requests per minute, 1,000 requests per month. Ideal for testing and development.

Professional: 300 requests per minute, 50,000 requests per month. Suitable for production applications with moderate traffic.

Enterprise: Custom rate limits based on your needs. Contact us for dedicated infrastructure with no hard limits.

Monitoring Usage: Check the X-RateLimit-Remaining and X-RateLimit-Reset headers in every response to track your usage and avoid hitting limits.

View Pricing Plans
FAQ

API Questions

What is the maximum text size per request?
The maximum text size is 100KB per request for the /anonymize and /detect endpoints. For larger documents, use the batch endpoint or split your content into smaller chunks. The batch endpoint accepts up to 100 items per request with a total payload limit of 10MB.
Which languages are supported?
We support 50+ languages including English, Spanish, French, German, Portuguese, Italian, Dutch, Polish, Russian, Chinese, Japanese, Korean, Arabic, Hebrew, and more. The API auto-detects language by default, or you can specify the language explicitly for better accuracy.
How do I handle webhooks for async batch jobs?
For large batch jobs, you can provide a webhook URL in your request. We'll POST the results to your endpoint when processing is complete. The webhook payload includes the job ID, status, and either the results or a presigned URL to download them. Make sure your endpoint returns a 200 status within 30 seconds.
Can I create custom entity types?
Yes! Professional and Enterprise plans support custom entity definitions. You can define entities using regular expressions, provide examples for our ML models to learn from, or use a combination of both. Custom entities appear in results alongside built-in types and can have their own anonymization rules.
Is there a sandbox environment?
Yes, we provide a full sandbox environment at sandbox.api.anonymizationapi.com. It behaves identically to production but requests don't count against your quota. Use the sandbox for development, testing, and CI/CD pipelines. Your production API key works in sandbox mode.

Ready to Start Building?

Get your API key and start protecting sensitive data in minutes. Free tier available with 1,000 requests per month.