SoonOne MCP server, all 49 APIs as agent tools. See how it works

AI-powered privacy protection and data anonymization

Text Anonymization API

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 with enterprise-grade security.

Free tier included, no credit card required. One key works across all 49 APIs.

At a glance
Entity Types
20+
Accuracy Rate
97.8%
Compliance
100%

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 enterprise-grade authentication

Built for

  • Privacy compliance (GDPR, CCPA, HIPAA)
  • Document sanitization for legal teams
  • Customer data protection systems
  • Research data anonymization
  • Healthcare records processing
  • Financial document redaction
  • HR document protection
  • Data sharing compliance

Try it

Build the request for your data

Edit the parameters below and see the exact curl command and JSON response you will get. No key required to preview.

POST/v1/text
Open in Playground
Request · HTTP
POST /parser/v1/text HTTP/1.1
Host: api.apicodex.io
Host: api.apicodex.io
Content-Type: application/json
X-Api-Key: YOUR_API_KEY
"text": "John Smith works at Acme Inc. Email: john@acme.com",
"entities": ["PERSON", "EMAIL", "ORG"]
Response · JSON
200 OK
{
  "success": true,
  "anonymized_text": "[PERSON] works at [ORG]. Email: [EMAIL]",
  "entities_found": [
    { "type": "PERSON", "value": "John Smith", "start": 0, "end": 10 },
    { "type": "ORG", "value": "Acme Inc", "start": 20, "end": 28 },
    { "type": "EMAIL", "value": "john@acme.com", "start": 37, "end": 50 }
  ]
}

Documentation

Text Anonymization API Documentation

Learn how to use the Text Anonymization API to protect sensitive information in your content. The API supports text input, file uploads, and URL-based content processing.

Base URL

url
https://api.apicodex.io/parser

Authentication

Authenticate every request with your API key: send it in an X-Api-Key header, or pass it as an ?apikey= query parameter.

headers
{
"X-Api-Key": "YOUR_API_KEY"
}

Request and response

Illustrative values. Confirm current endpoint behavior, quotas, and data freshness in the API documentation before production use.

request · http
POST /v1/text HTTP/1.1
Host: api.apicodex.io
Content-Type: application/json
X-Api-Key: YOUR_API_KEY

{
  "text": "John Smith works at Acme Inc. Email: john@acme.com",
  "entities": ["PERSON", "EMAIL", "ORG"]
}
response · json
{
  "success": true,
  "anonymized_text": "[PERSON] works at [ORG]. Email: [EMAIL]",
  "entities_found": [
    { "type": "PERSON", "value": "John Smith", "start": 0, "end": 10 },
    { "type": "ORG", "value": "Acme Inc", "start": 20, "end": 28 },
    { "type": "EMAIL", "value": "john@acme.com", "start": 37, "end": 50 }
  ]
}

Code examples

JavaScript/Node.js
const axios = require('axios');

const options = {
  method: 'POST',
  url: 'https://api.apicodex.io/parser/v1/text',
  headers: {
    'content-type': 'application/json',
    'X-Api-Key': 'YOUR_API_KEY'
  },
  data: {
    text: 'John Smith works at Acme Inc. Contact: john@acme.com',
    entities: ['PERSON', 'EMAIL', 'ORG']
  }
};

try {
  const response = await axios.request(options);
  console.log(response.data);
} catch (error) {
  console.error(error);
}

Entity Types

The API supports the following types of analysis:

PERSON Names and personal identifiers
EMAIL Email addresses
PHONE Phone numbers
ADDRESS Physical addresses
DATE Dates and timestamps
LOCATION Place names and coordinates
FINANCIAL Credit cards, bank accounts
ID ID numbers, passports, SSN
CUSTOM User-defined patterns

Pricing

Text Anonymization API Pricing

One key, one subscription, all 49 APIs. Start free and upgrade when you grow. No minimums, no lock-in.

This API costs 25 credits per request. Credits are shared across every API on your plan.

Estimate your monthly cost

Drag the slider to match your expected request volume. We will recommend the cheapest plan that covers it.

10,000

Recommended plan

Pro

$99.99 /month

Credits used250,000
Credits included250,000
Cost per 1K requests$9.999
Choose Pro

Free

Free
1,000 credits · ~40 requests/mo · 2 rps
  • All 49 APIs included
  • No credit card required
  • Full documentation and examples
Start for free

Starter

Popular
$29.99/month
50,000 credits · ~2,000 requests/mo · 10 rps
  • All 49 APIs included
  • Email support
  • Usage dashboard and analytics
Start with Starter

Pro

$99.99/month
250,000 credits · ~10,000 requests/mo · 25 rps
  • All 49 APIs included
  • Priority support
  • Up to 5 API keys
Start with Pro

Need a different plan?

Tell us about your API, volume, or support requirements.

Contact us

Coming soon · MCP

Use the Text Anonymization API from your AI agent

The API Codex MCP server will expose this API, and the other 39, to Claude, Cursor and any MCP client as tools. Same key, same credits, one config entry.

About the MCP server

FAQ

Frequently asked questions

The API can detect and anonymize a wide range of sensitive information including personal identifiers (names, emails, phone numbers), financial data (credit card numbers, bank accounts), locations (addresses, coordinates), dates, and custom entity types. The AI model is trained to recognize patterns and context to ensure comprehensive anonymization.

API Codex uses one credit-based subscription across all 40 APIs. The Free plan includes 1,000 credits per month, Starter ($29.99/month) includes 50,000 and Pro ($99.99/month) includes 250,000. Each anonymization request costs 25 credits, so that covers roughly 40 requests per month on Free, 2,000 on Starter and 10,000 on Pro. Only successful (2xx) responses consume credits. If you need higher limits, contact us for a custom plan.

Yes, the Text Anonymization API is designed to help organizations achieve GDPR, CCPA, and HIPAA compliance. The API processes data securely without storing sensitive information, and automatically redacts personal data to meet privacy regulations. All processing is done in memory with encrypted connections, and no source content or PII is retained after anonymization. This makes it ideal for organizations that need to share data while maintaining regulatory compliance.

Our AI uses advanced natural language processing to understand context and distinguish between PII and normal text. For example, 'John Smith' in a signature block is detected as a person's name, while 'John Smith Avenue' is recognized as a street address component. The model analyzes surrounding text, capitalization patterns, and linguistic structure to accurately identify entities based on their contextual usage rather than simple pattern matching.

Yes, the API supports custom entity detection beyond the standard PII categories. You can define custom patterns and entity types specific to your industry or use case. For example, you might want to anonymize employee IDs, project codes, internal department names, or proprietary terminology. Custom entity support is available on Pro plans and above, allowing you to tailor the anonymization process to your organization's specific privacy requirements.

The API supports multiple anonymization strategies. Redaction completely removes or masks sensitive data by replacing it with placeholders like [PERSON] or [EMAIL]. Pseudonymization replaces real values with consistent fake values, maintaining data structure and relationships for analytics while protecting privacy. For example, 'john@acme.com' might become '[EMAIL]' (redaction) or 'user123@example.com' (pseudonymization). You can specify your preferred approach based on whether you need to preserve data utility for analysis or completely eliminate sensitive information.