About this endpoint
What it does
Uploads a document file and returns readability statistics for the extracted text. The request body includes the file to analyse and an optional language selector; the response wraps the computed metrics under a data object.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | Document file to analyse. Supported formats: PDF, DOC, or DOCX. |
| language | ENUM | No | Language used for analysis. Allowed values: english, german. Default: english. |
Response
Returns a JSON object with a data object field. The data object contains stats plus one readability result object: flesh_kincaid_reading_ease or wiener_sachtextformel, depending on the response variant.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object | Yes | Wrapper for the readability analysis result. Contains stats and one readability metric object. |
| data.stats | Object | Yes | Aggregated text statistics. |
| data.stats.words | Integer | No | Number of words. |
| data.stats.sentences | Integer | No | Number of sentences. |
| data.stats.characters | Integer | No | Number of characters. |
| data.stats.paragraphs | Integer | No | Number of paragraphs. |
| data.stats.reading_time | Number | No | Estimated reading time in seconds. |
| data.stats.speaking_time | Number | No | Estimated speaking time in seconds. |
| data.stats.avg_word_length | Number | No | Average word length. |
| data.stats.avg_sentence_length | Number | No | Average sentence length. |
| data.stats.avg_paragraph_length | Number | No | Average paragraph length. |
| data.flesh_kincaid_reading_ease | Object | No | Readability result object for the Flesh-Kincaid Reading Ease variant. Contains class, label, level, score, and class_label. |
| data.flesh_kincaid_reading_ease.class | String | No | Readability class label. |
| data.flesh_kincaid_reading_ease.label | Object | No | Whether the text meets a standard readability threshold. |
| data.flesh_kincaid_reading_ease.level | Number | No | Readability level. |
| data.flesh_kincaid_reading_ease.score | Number | No | Readability score. |
| data.flesh_kincaid_reading_ease.class_label | String | No | Human-readable description of the readability class. |
| data.wiener_sachtextformel | Object | No | Readability result object for the Wiener Sachtextformel variant. Contains class, label, level, score, and class_label. |
| data.wiener_sachtextformel.class | String | No | Readability class label. |
| data.wiener_sachtextformel.label | Object | No | Whether the text meets a standard readability threshold. |
| data.wiener_sachtextformel.level | Number | No | Readability level. |
| data.wiener_sachtextformel.score | Number | No | Readability score. |
| data.wiener_sachtextformel.class_label | String | No | Human-readable description of the readability class. |