Text Anonymization API

Overview

AI-powered API for anonymizing sensitive information in text, files, and web content.

The Text Anonymization API provides a secure and efficient way to identify and redact sensitive information from various content sources. Using advanced AI technology, the API can detect and anonymize a wide range of entity types including personal information, dates, locations, financial data, and more.

Key features:

  • Anonymize plain text with customizable entity redaction
  • Process content from uploaded files (PDF, TXT, HTML)
  • Anonymize content from web URLs
  • Flexible input/output formats with JSON responses
  • Secure API with authentication

Ideal for:

  • Privacy compliance (GDPR, CCPA, HIPAA)
  • Document sanitization
  • Customer data protection
  • Personal information redaction in legal documents
  • Research data anonymization

Pricing Plans

Choose the right plan for your text anonymization needs with flexible pricing options

Basic

Free

Perfect for small projects and testing

  • 10 requests per month
Get Started
RECOMMENDED

Pro

$9.99 /month

For growing businesses

  • 100 requests per month
Get Started

Ultra

$79.99 /month

For scaling operations

  • 1,000 requests per month
Get Started

Mega

$499.99 /month

For enterprise needs

  • 10,000 requests per month
Get Started

API Documentation

The Text Anonymization API provides a secure and efficient way to identify and redact sensitive information from text, files, and web content.

Base URL

https://text-anonymization-api.p.rapidapi.com

All API requests should be made to this endpoint using HTTPS.

Authentication

All API requests require the use of an API key, which should be provided in the request headers:

{
  'x-rapidapi-host': 'text-anonymization-api.p.rapidapi.com',
  'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY'
}

Endpoints

1. Anonymize Text

Endpoint: POST /v1/anonymize/text

Description: Anonymizes sensitive information in the provided text.

Content Types
  • application/json
  • text/plain
  • multipart/form-data
Request Example (JSON)
curl --request POST \
  --url https://text-anonymization-api.p.rapidapi.com/v1/anonymize/text \
  --header 'content-type: application/json' \
  --header 'x-rapidapi-host: text-anonymization-api.p.rapidapi.com' \
  --header 'x-rapidapi-key: RAPIDAPI_KEY' \
  --data '{
  "text": "My name is John Doe and I live at 123 Main St, New York, NY 10001. My credit card number is 4111-1111-1111-1111 and my email is [email protected]",
  "entities": ["PERSON", "STREET_ADDRESS", "CREDIT_CARD", "EMAIL_ADDRESS"]
}'
Request Example (Plain Text)
curl --request POST \
  --url https://text-anonymization-api.p.rapidapi.com/v1/anonymize/text \
  --header 'content-type: text/plain' \
  --header 'x-rapidapi-host: text-anonymization-api.p.rapidapi.com' \
  --header 'x-rapidapi-key: RAPIDAPI_KEY' \
  --data 'My name is John Doe and I live at 123 Main St, New York, NY 10001. My credit card number is 4111-1111-1111-1111 and my email is [email protected]'
Request Example (Form Data)
curl --request POST \
  --url https://text-anonymization-api.p.rapidapi.com/v1/anonymize/text \
  --header 'content-type: multipart/form-data' \
  --header 'x-rapidapi-host: text-anonymization-api.p.rapidapi.com' \
  --header 'x-rapidapi-key: RAPIDAPI_KEY' \
  --form 'text=My name is John Doe and I live at 123 Main St, New York, NY 10001. My credit card number is 4111-1111-1111-1111 and my email is [email protected]'
Response Example
{
  "success": true,
  "anonymized_at": "2025-05-04T08:32:45Z",
  "anonymized_text": "My name is [PERSON] and I live at [STREET_ADDRESS], New York, NY 10001. My credit card number is [CREDIT_CARD] and my email is [EMAIL_ADDRESS]"
}

2. Anonymize File

Endpoint: POST /v1/anonymize/upload

Description: Uploads a file and anonymizes sensitive information in its content. Supports PDF, plain text, and HTML files.

Content Type
  • multipart/form-data
Request Example
curl --request POST \
  --url https://text-anonymization-api.p.rapidapi.com/v1/anonymize/upload \
  --header 'content-type: multipart/form-data' \
  --header 'x-rapidapi-host: text-anonymization-api.p.rapidapi.com' \
  --header 'x-rapidapi-key: RAPIDAPI_KEY' \
  --form 'file=@/path/to/document.pdf'
Response Example
{
  "success": true,
  "anonymized_at": "2025-05-04T08:33:15Z",
  "anonymized_text": "This document contains information about [PERSON] who works at [ORGANIZATION]. The document was created on [DATE] and references project number [NUMBER]."
}

Error Responses

400 Bad Request
{
  "error": "No text provided"
}
401 Unauthorized
{
  "error": "Unauthorized"
}
500 Internal Server Error
{
  "error": "An error occurred during text anonymization"
}

Entity Types

The API can detect and anonymize the following entity types:

REDACTED - Default redaction for unspecified sensitive information
DATE - Calendar dates
TIME - Time expressions
DATETIME - Combined date and time
EMAIL_ADDRESS - Email addresses
URL - Web URLs
IBAN_CODE - International Bank Account Numbers
CREDIT_CARD - Credit card numbers
CRYPTO - Cryptocurrency addresses
IP_ADDRESS - IP addresses
NRP - National registration numbers
LOCATION - General locations
STREET_ADDRESS - Street addresses
ZIP_CODE - Postal/ZIP codes
COUNTRY - Country names
PROVINCE - Provinces/states
PERSON - Personal names
PHONE_NUMBER - Phone numbers
ORGANIZATION - Organization names
NUMBER - Numeric values
API_KEY - API keys
API_SECRET - API secrets
HASH - Hash values
GEO - Geographic information
GEO_COORD - Geographic coordinates
GPS - GPS coordinates
GOOGLE_MAPS_URL - Google Maps URLs

Frequently Asked Questions

What types of sensitive information can the API anonymize?

The Text Anonymization API can identify and redact a wide range of sensitive information, including personal names, addresses, email addresses, phone numbers, credit card numbers, dates, organizations, locations, and more. The API uses advanced AI technology to detect various entity types in multiple formats and contexts. You can specify which entity types to anonymize or let the API automatically detect and redact all sensitive information.

What file formats are supported for anonymization?

The API supports multiple file formats including PDF, plain text (TXT), and HTML files through the file upload endpoint. Additionally, the API can process raw text input directly through the text anonymization endpoint, which accepts plain text, JSON, or form data. This flexibility allows you to anonymize content from various sources and formats to meet your specific needs.

How accurate is the text anonymization?

The Text Anonymization API uses advanced AI and machine learning algorithms to achieve high accuracy in detecting and redacting sensitive information. However, accuracy can vary depending on the complexity and context of the text. The API continuously improves through machine learning to handle more complex patterns and edge cases. For optimal results, we recommend providing specific entity types to target for anonymization when your use case has clear requirements.

Is the anonymization process compliant with privacy regulations?

Yes, the Text Anonymization API is designed to help organizations comply with privacy regulations such as GDPR, CCPA, and HIPAA by identifying and redacting personally identifiable information (PII) and other sensitive data. The API itself processes data securely and doesn't store the content after processing. However, organizations should consult with their legal and compliance teams to ensure their specific implementation meets all relevant regulatory requirements.

What are the usage limits for the Text Anonymization API?

The API offers several pricing tiers with different usage limits. The Basic free plan includes 10 requests per month. The Pro plan ($9.99/month) provides 100 requests per month, the Ultra plan ($79.99/month) allows 1,000 requests per month, and the Mega plan ($499.99/month) supports up to 10,000 requests per month. Choose the plan that best fits your expected usage volume. If you need higher limits or custom pricing, contact the API provider for enterprise solutions.

Integrations Coming Soon

Connect our powerful APIs with your favorite platforms for seamless workflow automation

Zapier

Connect with 3,000+ apps

Pipedream

Create custom integration workflows

Make

Build visual automation flows

Tray.io

Enterprise automation platform

What Our Customers Say

"The Text Anonymization API has been crucial for our GDPR compliance efforts. The entity detection is incredibly accurate and saves us hours of manual redaction work."

Thomas Weber

CTO, PrivacyShield

"We integrated the API into our document management system to automatically sanitize all incoming files. It's been flawless and our legal team is thrilled with the results."

Rebecca Chen

IT Director, LegalDocs Inc.

"As a healthcare provider, patient data security is our top priority. This API helps us ensure our research data is properly anonymized before sharing with our partners."

Dr. James Wilson

Data Privacy Officer, HealthTech Solutions