Skip to content
moxon home

Readability Analysis

The /read endpoint analyzes a text and returns its word, sentence and syllable counts, its Flesch readability scores and an estimated reading time.

posthttps://api.moxon.dev/v6/read

How it works?

English uses the original Flesch coefficients, which also give a Flesch-Kincaid grade level. French uses the Kandel & Moles adaptation, which has no grade-level counterpart, so fleschKincaidGrade is null.

Syllables are estimated with a per-language heuristic: groups of vowels, minus the silent trailing e (e or es in French), with a minimum of one syllable per word. Sentences are split on ., !, ? and …, and a text without any of them counts as a single sentence. Reading time is based on 200 words per minute.

Try itpost/v6/read

Parameters

The request body must be JSON:

  • textstringrequired

    Text to analyze, 50000 characters maximum

  • lang"en" | "fr"optional

    Language of the text: en or fr. Default: en

Response Fields

  • langstring

    Language used for the analysis

  • wordsnumber

    Number of words — tokens containing at least one letter or digit

  • sentencesnumber

    Number of sentences, always at least 1

  • syllablesnumber

    Estimated total number of syllables

  • fleschReadingEasenumber

    Flesch reading ease, rounded to 2 decimals — the higher, the easier to read

  • fleschKincaidGradenumber|null

    Flesch-Kincaid grade level, rounded to 2 decimals — null when lang is fr

  • readingTimestring

    Estimated reading time, in seconds below a minute (e.g. 45s, 3min)

Code Examples

Error Handling

If parameters are missing or invalid, the API will return an error:

  • 400Please provide a textThe text parameter is missing, empty, or contains no word
  • 400Text must be 50000 characters or fewerThe text exceeds the maximum length
  • 400Language must be one of: en, frThe lang value is neither en nor fr