Text Analytics

Text Analytics API

Content

Analyze text for detailed statistics including word count, character analysis, top letters, vowel counts, and frequency analysis.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

100 requests per minute

Endpoints

1 endpoint available

Overview

The Text Analytics API provides comprehensive text analysis capabilities, returning detailed statistics and linguistic metrics for any input text. Perfect for content analysis, SEO optimization, and research applications.

What You Get

The API returns a rich set of metrics including:

  • Basic Counts - Words, characters, sentences, paragraphs
  • Letter Analysis - Total letters, vowels, consonants
  • Averages - Average word length
  • Frequency Analysis - Top 5 most used letters and words with counts

Use Cases

  • Content optimization for SEO - analyze keyword density and content length
  • Academic research - linguistic analysis of text corpora
  • Writing tools - provide real-time feedback to writers
  • Quality assurance - validate content meets length requirements

Endpoints

POST
/v1/tools/text-analytics
Analyze text and return comprehensive statistics

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
text
string
Required
The text to analyze

Response Example

{
  "success": true,
  "stats": {
    "wordCount": 156,
    "charCount": 892,
    "letterCount": 743,
    "vowelCount": 245,
    "consonantCount": 498,
    "sentenceCount": 12,
    "paragraphCount": 3,
    "avgWordLength": 4.76
  },
  "frequency": {
    "topLetters": [
      {
        "letter": "e",
        "count": 89
      },
      {
        "letter": "t",
        "count": 67
      },
      {
        "letter": "a",
        "count": 54
      },
      {
        "letter": "o",
        "count": 48
      },
      {
        "letter": "n",
        "count": 45
      }
    ],
    "topWords": [
      {
        "word": "the",
        "count": 12
      },
      {
        "word": "and",
        "count": 8
      },
      {
        "word": "to",
        "count": 7
      },
      {
        "word": "of",
        "count": 6
      },
      {
        "word": "a",
        "count": 5
      }
    ]
  }
}

Error Codes

400
Invalid request body or empty text
401
Missing or invalid API key
429
Rate limit exceeded
500
Internal server error

Code Examples

curl -X POST https://api.opentools.ca/v1/tools/text-analytics \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Your text content here. Add more sentences for better analysis."}'

Ready to get started?

Create an API key to start using the Text Analytics API.