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

AI-powered text analysis for modern applications

Text Analysis API

Comprehensive text analysis API that combines advanced pattern detection with cutting-edge NLP analysis. Extract insights from any text content with support for multiple input formats and real-time processing.

Powered by state-of-the-art AI technology, our API delivers accurate results for pattern recognition, sentiment analysis, and entity extraction across multiple languages and content types.

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

At a glance
Accuracy Rate
98.5%
Languages Supported
50+
Pattern Types
15+

Key features

  • Multi-pattern detection in single request
  • Real-time sentiment & emotion analysis
  • Named entity recognition (NER)
  • Topic modeling & keyword extraction
  • Content moderation & safety scoring
  • Multi-format input support

Built for

  • Content management systems
  • Social media monitoring
  • Customer feedback analysis
  • Document processing pipelines
  • Compliance & risk assessment
  • Research & data mining

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": "Apple Inc. announced new products in California yesterday.",
"analysis": ["patterns", "entities", "sentiment", "language"]
Response · JSON
200 OK
{
  "success": true,
  "language": { "detected": "en", "confidence": 0.99 },
  "sentiment": { "score": 0.65, "label": "positive" },
  "entities": [
    { "type": "ORG", "value": "Apple Inc.", "start": 0, "end": 10 },
    { "type": "LOCATION", "value": "California", "start": 39, "end": 49 },
    { "type": "DATE", "value": "yesterday", "start": 50, "end": 59 }
  ],
  "patterns": { "emails": [], "urls": [], "dates": ["yesterday"] }
}

Documentation

Text Analysis API Documentation

Learn how to use the Text Analysis API to analyze and extract insights from 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": "Apple Inc. announced new products in California yesterday.",
  "analysis": ["patterns", "entities", "sentiment", "language"]
}
response · json
{
  "success": true,
  "language": { "detected": "en", "confidence": 0.99 },
  "sentiment": { "score": 0.65, "label": "positive" },
  "entities": [
    { "type": "ORG", "value": "Apple Inc.", "start": 0, "end": 10 },
    { "type": "LOCATION", "value": "California", "start": 39, "end": 49 },
    { "type": "DATE", "value": "yesterday", "start": 50, "end": 59 }
  ],
  "patterns": { "emails": [], "urls": [], "dates": ["yesterday"] }
}

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: 'Apple Inc. announced new products in California yesterday.',
    analysis: ['patterns', 'entities', 'sentiment', 'language']
  }
};

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

Analysis Types

The API supports the following types of analysis:

patterns Detect common text patterns
entities Named entity recognition
sentiment Text sentiment analysis
language Language detection
topics Topic extraction
keywords Keyword extraction
summary Text summarization
moderation Content moderation
custom Custom analysis rules

Pricing

Text Analysis 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 Analysis 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 detects over 15 distinct pattern types including email addresses, phone numbers (domestic and international formats), URLs, credit card numbers with Luhn validation, social security numbers, dates in multiple formats, IPv4/IPv6 addresses, and postal codes. Beyond regex-based pattern matching, the API uses transformer-based NLP models for named entity recognition (NER), identifying people, organizations, locations, monetary values, and temporal expressions. Each detected pattern includes character offsets, confidence scores, and contextual metadata, enabling precise extraction from unstructured text for compliance scanning, data loss prevention, and content enrichment workflows.

The API supports direct text input via JSON payloads as well as file uploads in PDF, DOCX, TXT, HTML, and RTF formats. You can also analyze content directly from URLs, where the API fetches the page, strips boilerplate navigation and ads using readability algorithms, and processes the main content body. For PDF documents, the API handles both digitally-created PDFs and scanned documents through integrated OCR. DOCX processing preserves structural elements like headings, lists, and tables. The maximum file size is 10MB, and the API automatically detects character encoding for TXT files, supporting UTF-8, Latin-1, and other common encodings.

The sentiment analysis engine uses a fine-tuned transformer model trained on millions of labeled text samples across multiple domains including product reviews, social media posts, news articles, and customer support transcripts. It returns a normalized sentiment score between -1.0 (strongly negative) and 1.0 (strongly positive), along with a categorical label (positive, negative, neutral, or mixed). The API also provides aspect-based sentiment analysis, which identifies specific topics or entities within the text and assigns individual sentiment scores to each. For example, a restaurant review mentioning both food and service would receive separate sentiment scores for each aspect, enabling granular opinion mining.

The Text Analysis API supports over 50 languages for language detection with confidence scoring, and provides full NLP analysis (sentiment, entities, topics, keywords) for 12 primary languages: English, Spanish, French, German, Portuguese, Italian, Dutch, Russian, Chinese (Simplified and Traditional), Japanese, and Korean. Language detection works on text as short as 20 characters and can identify mixed-language documents, reporting the percentage breakdown of each detected language. For non-primary languages, the API still provides pattern detection, language identification, and basic entity extraction. The sentiment model supports cross-lingual transfer learning, delivering reliable results even for languages outside the primary set.

Yes, the API is designed for efficient batch analysis within a single request. You pass an array of analysis types in the request body, such as ["patterns", "entities", "sentiment", "language", "topics", "keywords", "summary", "moderation"]. Each analysis module runs in parallel on our infrastructure, so requesting multiple types adds minimal latency compared to a single analysis. The response includes a dedicated section for each requested type. You can also define custom analysis rules using the "custom" type, which accepts regex patterns, dictionaries, or classification labels. This approach eliminates the need for multiple API calls and reduces overall processing time by up to 80% compared to sequential single-type requests.

The content moderation module evaluates text against multiple safety categories including hate speech, harassment, violence, sexual content, self-harm, and spam. Each category receives an individual risk score from 0.0 to 1.0, along with an overall safety rating and a recommended action (allow, flag, or block). The model is trained on diverse datasets and regularly updated to address emerging patterns of harmful content. It handles obfuscated text, intentional misspellings, and coded language that simple keyword filters would miss. The moderation engine also provides explanation snippets that highlight the specific passages triggering each flag, making it suitable for human-in-the-loop review workflows. Configurable threshold settings allow you to adjust sensitivity levels for different deployment contexts.