Text Analyzer

The Text Analyzer endpoint allows you to analyze any given text by providing insights such as word count, sentence count, character count, punctuation count, and the original text itself. This endpoint is ideal for applications requiring text processing, content analysis, or data extraction from textual data.

Endpoint

  • URL: https://api.erensko.xyz/v1/text-analyzer

  • Method: GET

  • Description: Analyzes a text and provides advanced information about it.

URL Parameters

Key
Value

text

The text you would like to analyze.

Headers

Key
Value

Authorization

Your own personal API key, create one by clicking here. This is required.

Request Example

GET https://api.erensko.xyz/v1/text-analyzer?text=Hello, world!

Response Example:

{
  "averageWordLength": 4.25,
  "characterCount": 26,
  "characterCountWithoutSpaces": 22,
  "digitsCount": 0,
  "letterCount": 22,
  "punctuationCount": 2,
  "sentenceCount": 1,
  "whitespaceCount": 4,
  "numberCount": 0,
  "nonAlphanumericCount": 2,
  "uniqueWordCount": 4,
  "longestWord": "Erensko",
  "longestWordLength": 7,
  "longestWordSyllableCount": 3,
  "shortestWord": "my",
  "shortestWordLength": 2,
  "lowercaseCount": 14,
  "uppercaseCount": 8,
  "averageCharactersPerWord": 4.33,
  "vowelCount": 9,
  "consonantCount": 13,
  "digitToWordRatio": 0,
  "repeatedWordCount": 0,
  "fleschKincaidReadabilityScore": "6.5",
  "hyphenatedWordCount": 0,
  "averageSyllablesPerWord": 1.75,
  "totalParagraphs": 1,
  "totalSyllables": 7,
  "averageSyllablesPerSentence": 7,
  "allCapsWordCount": 0,
  "wordCount": 6,
  "wordsArray": ["Hello", "my", "name", "is", "Erensko"],
  "wordFrequency": {
    "hello": 1,
    "my": 1,
    "name": 1,
    "is": 1,
    "erensko": 1
  },
  "convertedToUppercase": "HELLO, MY NAME IS ERENSKO.",
  "convertedToLowercase": "hello, my name is erensko.",
  "textWithoutNumbers": "Hello, my name is Erensko.",
  "textWithOnlyNumbers": ""
  "longestSentence": "Hello, my name is Erensko.",
  "shortestSentence": "Hello, my name is Erensko.",
  "letterFrequency": {
    "h": 1,
    "e": 3,
    "l": 2,
    "o": 2,
    "m": 1,
    "y": 1,
    "n": 1,
    "a": 1,
    "i": 1,
    "r": 1,
    "s": 1
  },
  "numberFrequency": {},
  "specialCharFrequency": {
    ",": 1,
    ".": 1
  },
  "averageSentenceLength": 6,
  "averageParagraphLength": 1,
  "longestParagraph": "Hello, my name is Erensko.",
  "shortestParagraph": "Hello, my name is Erensko.",
  "alliterationCount": 0,
  "assonanceCount": 0,
  "entropy": "3.88",
  "originalText": "Hello, my name is Erensko."
}

Error Responses

  • 400 Bad Request: Returned if the "text" parameter is missing or invalid.

  • 500 Internal Server Error: Returned if the API is currently down.

Usage Notes

  • Ensure that your text input is URL-encoded if it contains special characters.

Last updated