About this endpoint
What it does
Analyzes the submitted text and returns readability metrics, text statistics, keyword counts, and estimated reading/speaking time. You can also provide a words-per-minute value to adjust the reading time estimate.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| text | String | Yes | The text to analyze. |
| wpm | Integer | No | Reading speed for the time estimate. Default: 200. |
Response
Returns a JSON object with counts, averages, readability, top_keywords, and time_estimates fields. counts, averages, readability, and time_estimates are objects; top_keywords is an array of objects. Success status code: 200.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| counts | Object | No | Text statistics.<br>Includes words, sentences, syllables, characters, unique_words, and characters_no_spaces as integer fields. |
| counts.words | Integer | No | Number of words. |
| counts.sentences | Integer | No | Number of sentences. |
| counts.syllables | Integer | No | Number of syllables. |
| counts.characters | Integer | No | Number of characters. |
| counts.unique_words | Integer | No | Number of unique words. |
| counts.characters_no_spaces | Integer | No | Number of characters excluding spaces. |
| averages | Object | No | Averages derived from the submitted text.<br>Includes syllables_per_word, words_per_sentence, and characters_per_word as number fields. |
| averages.syllables_per_word | Number | No | Syllables per word. |
| averages.words_per_sentence | Number | No | Words per sentence. |
| averages.characters_per_word | Number | No | Characters per word. |
| readability | Object | No | Readability metrics.<br>Includes interpretation, flesch_reading_ease, and flesch_kincaid_grade. |
| readability.interpretation | String | No | Readability interpretation. |
| readability.flesch_reading_ease | Number | No | Flesch Reading Ease score. |
| readability.flesch_kincaid_grade | Number | No | Flesch-Kincaid grade level. |
| top_keywords | Object Array | No | Array of keyword objects.<br>Each item includes word and count. |
| top_keywords[].word | String | No | Keyword text. |
| top_keywords[].count | Integer | No | Number of occurrences for the keyword. |
| time_estimates | Object | No | Estimated times based on the analyzed text.<br>Includes reading_seconds and speaking_seconds as number fields. |
| time_estimates.reading_seconds | Number | No | Estimated reading time in seconds. |
| time_estimates.speaking_seconds | Number | No | Estimated speaking time in seconds. |