New The MCP server is live: all 44 APIs in Claude, Cursor or any MCP client. Connect your agent

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 every API.

At a glance

Text Anonymization API

25 credits / call
Free calls / month
40
Entity Types
20+
Accuracy Rate
97.8%
Compliance
100%
Get your free API key

40 free calls on the free plan

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

MCP · for your agent

Hand the Text Anonymization API to your agent

Connect Claude, Cursor or any MCP client once, then ask in plain words. Your agent finds this API, reads its docs and makes the call: 25 credits per call, the same as REST, from your team's balance.

Redact tickets before sharing

“Redact names, emails, phone numbers and card numbers from these 50 support tickets before we send them to our outsourced support team.”

list_apis · get_api_docsfree

api_request POST /text-anonymization/v1/anonymize/text 25 cr

Each ticket with personal data replaced by typed placeholders, and a list of what was removed.

Scrub secrets from a log

“I need to paste this error log into a public GitHub issue. Strip API keys, IP addresses and emails first.”

list_apis · get_api_docsfree

api_request POST /text-anonymization/v1/anonymize/text 25 cr

The log with keys, secrets, IPs and emails masked, safe to post publicly.

Anonymize research interviews

“Anonymize the interview transcript at this link for our research repository: people, companies and places.”

list_apis · get_api_docsfree

api_request POST /text-anonymization/v1/anonymize/url 25 cr

The transcript with people, organizations and locations replaced, and counts per entity type.

$ claude mcp add --transport http apicodex https://mcp.apicodex.io

Illustrative asks; the calls and prices are real. Claude, Cursor, VS Code and Windsurf setup: mcp.apicodex.io

Try it

Build the request for your data

Edit the parameters below and see the exact request and curl command you'd send. No key required to preview.

POST /text-anonymization/v1/anonymize/text
Open in Playground
Request · HTTP
POST /text-anonymization/v1/anonymize/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: [email protected]",
  "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": "[email protected]", "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/text-anonymization

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 /text-anonymization/v1/anonymize/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: [email protected]",
  "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": "[email protected]", "start": 37, "end": 50 }
  ]
}

Code examples

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

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

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

Endpoints

POST /v1/anonymize/text

Send the text as JSON {"text": "..."}, as text/plain, or as a multipart text field.

POST /v1/anonymize/upload

Upload a PDF, HTML or plain-text file (multipart/form-data, field name: file).

curl -X POST "https://api.apicodex.io/text-anonymization/v1/anonymize/upload" -H "X-Api-Key: YOUR_API_KEY" -F "[email protected]"

POST /v1/anonymize/url

Fetch a public URL and process its text. JSON body: {"url": "https://..."}.

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

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

Cost estimator

requests per month → cheapest plan that covers it

Estimate your monthly cost

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

10,000

Recommended plan

Starter

$29.99 /month

Credits used
Credits included
Cost per 1K requests
Choose Starter

Free

Free
1,000 credits · ~40 requests/mo · 2 rps
  • All APIs included
  • No credit card required
  • Full documentation and examples
  • MCP server for your AI agents
  • Up to 5 active API keys
Start for free

Starter

Popular
$29.99 /month
50,000 credits · ~2,000 requests/mo · 10 rps
  • All APIs included
  • Email support
  • Usage dashboard and analytics
  • MCP server for your AI agents
  • Up to 5 active API keys
Start with Starter

Pro

$99.99 /month
250,000 credits · ~10,000 requests/mo · 25 rps
  • All APIs included
  • Priority support
  • MCP server for your AI agents
  • Up to 5 active API keys
Start with Pro

Need a different plan?

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

Contact us

FAQ

Frequently asked questions

Ready to integrate Text Anonymization?