About this endpoint
What it does
Uploads a document file and returns readability metrics for the extracted text. The request accepts a binary file and an optional language setting; the response contains a data object with text statistics and one readability formula result.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | Document file to analyse. Binary upload; 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. Inside data, stats contains document text metrics, and the readability result is provided as either flesh_kincaid_reading_ease or wiener_sachtextformel depending on the response variant.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object | No | Wrapper object containing the analysis result. |
| data.stats | Object | No | Text statistics for the analysed document. |
| 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 analysis result for the Flesh-Kincaid Reading Ease variant. Includes class, label, level, score, and class_label. |
| data.flesh_kincaid_reading_ease.class | String | No | Readability class label. |
| data.flesh_kincaid_reading_ease.label | Boolean | 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 class description. |
| data.wiener_sachtextformel | Object | No | Readability analysis result for the Wiener Sachtextformel variant. Includes class, label, level, score, and class_label. |
| data.wiener_sachtextformel.class | String | No | Readability class label. |
| data.wiener_sachtextformel.label | Boolean | 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 class description. |