# Readability Analyzer (`muhammetakkurtt/readability-analyzer`) Actor

Instantly analyze readability in text and files (.txt, .pdf, .docx). This advanced tool scores your content with multiple metrics like Flesch-Kincaid, highlights hard-to-read sentences, and provides full text statistics. Perfect for SEO, content marketing and effective communication.

- **URL**: https://apify.com/muhammetakkurtt/readability-analyzer.md
- **Developed by:** [Muhammet Akkurt](https://apify.com/muhammetakkurtt) (community)
- **Categories:** AI, SEO tools, Other
- **Stats:** 12 total users, 1 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.03 / 1,000 words analyzed for readabilities

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Readability Analyzer

The Readability Analyzer is a powerful Apify actor designed to assess the readability of texts. Using various standard scoring formulas, it analyzes provided texts or files and provides a detailed report indicating how easy the content is to read and understand.

### Why Use the Readability Analyzer?

This tool offers a fast and reliable solution for improving your content's clarity. It helps you tailor your writing to your target audience and ensures your message is effectively communicated.

- **Clarity**: Measures text complexity using multiple established readability formulas.
- **Flexibility**: Supports both plain text and various file formats.
- **Large Text Support**: Automatically splits texts longer than 10,000 words into chunks for analysis. This ensures that even very large documents can be processed smoothly.
- **Easy Integration**: Can be easily run on the Apify platform, and the results can be exported in different formats (JSON, CSV, Excel).

### Features

- Analyzes readability by text or file upload.
- Supported file formats: `.txt`, `.md`, `.html`, `.pdf`, `.docx`.
- Markdown files are rendered before extraction so tables and inline HTML survive conversion to plain text.
- Text-based PDFs are supported. Scanned or image-only PDFs are rejected because OCR is not enabled in this actor.
- Provides a detailed report with various readability scores (Flesch Reading Ease, Flesch-Kincaid Grade Level, Gunning Fog Index, and more).
- Automatically splits large texts into parts and analyzes each one.
- Includes proxy support and a retry mechanism for more reliable results.
- Stores the results in a structured format in the Apify dataset.

### Use Cases

- **Content Creation**: For writers, bloggers, and marketers to ensure their content is clear, engaging, and easy to understand for their target audience.
- **Education**: For teachers and educators to assess the complexity of educational materials and ensure they are appropriate for the students' reading level.
- **Technical Writing**: For technical writers to simplify complex information and make manuals or documentation more user-friendly.
- **UX/UI Design**: To ensure that the text used in interfaces is concise and easy for users to comprehend.

### Usage

1.  Run this actor in the Apify console.
2.  Provide the necessary inputs:
    -   `textContent`: Enter the text you want to analyze for readability (or upload a file below).
    -   `fileUpload`: Upload a file for readability analysis (`.txt`, `.md`, `.html`, `.pdf`, `.docx`). If you upload a file, the text field above is ignored. Scanned or image-only PDFs require OCR and are not processed by this actor.
    -   `proxyConfiguration`: It is recommended to use a proxy for faster and more reliable results.

#### Example Input
```json
{
  "textContent": "Barack H. Obama is the 44th President of the United States. His story is the American story — values from the heartland, a middle-class upbringing in a strong family, hard work and education as the means of getting ahead, and the conviction that a life so blessed should be lived in service to others.",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}
````

### Output

The collected data is saved to the Apify dataset. The output data includes the following fields:

The `results` object is broken down as follows:

#### Readability Scores (`results.readability`)

A collection of various readability metrics:

- `fleschReadingEase`: Flesch Reading Ease score.
- `fleschGradeLevel`: Flesch-Kincaid Grade Level.
- `gunningFoxIndex`: Gunning Fog Index.
- `smogIndex`: SMOG Index.
- `powersSumnerKearl`: Powers-Sumner-Kearl Grade.
- `forcastGradeLevel`: FORCAST Grade Level.
- `colemanLiauIndex`: Coleman-Liau Index.
- `automatedReadabilityIndex`: Automated Readability Index (ARI).
- `daleChallReadabilityGrade`: Dale-Chall Readability Grade.
- `spacheReadabilityGrade`: Spache Readability Grade.
- `linsearWriteGrade`: Linsear Write Grade.

#### Sentence-level Analysis (`results.sentences`)

An array of objects, where each object provides details about a specific sentence:

- `phrase`: The original sentence from the text.
- `cleanPhrase`: A cleaned version of the sentence used for analysis.
- `isVeryHard`: A boolean indicating if the sentence is considered very difficult to read.
- `isHard`: A boolean indicating if the sentence is considered difficult to read.
- `wordsOver13Chars`: A list of words in the sentence with more than 13 characters.
- `wordsOver4Syllables`: A list of words in the sentence with more than 4 syllables.
- `adverbs`: A list of adverbs found in the sentence.

#### Text Statistics (`results.textStats`)

An object containing overall statistics for the analyzed text:

- `letterCount`: Total number of letters.
- `sentenceCount`: Total number of sentences.
- `uniqueWordCount`: Number of unique words.
- `syllableCount`: Total number of syllables.
- `averageSyllablesPerWord`: Average syllables per word.
- `wordsWithThreeSyllables`: Number of words with three or more syllables.
- `percentWordsWithThreeSyllables`: The percentage of words with three or more syllables.
- `longestSentence`: The longest sentence in the text.
- `paragraphCount`: Total number of paragraphs.
- `averageSpeakingTime`: Estimated time to speak the text.
- `averageReadingTime`: Estimated time to read the text.
- `averageWritingTime`: Estimated time to write the text.

### Example Output

```json
{
    "phrases": [
        "Barack H.",
        "Obama is the 44th President of the United States.",
        "His story is the American story — values from the heartland, a middle-class upbringing in a strong family, hard work and education as the means of getting ahead, and the conviction that a life so blessed should be lived in service to others."
    ],
    "results": {
        "readability": {
            "fleschReadingEase": 61.7,
            "fleschGradeLevel": 9.1,
            "gunningFoxIndex": 10.9,
            "smogIndex": 12,
            "powersSumnerKearl": 2.9,
            "forcastGradeLevel": 16.4,
            "colemanLiauIndex": 10.1,
            "automatedReadabilityIndex": 8.3,
            "daleChallReadabilityGrade": 4.7,
            "spacheReadabilityGrade": 4.4,
            "linsearWriteGrade": 11.4
        },
        "sentences": [
            {
                "phrase": "Barack H.",
                "cleanPhrase": "Barack H ",
                "isVeryHard": false,
                "isHard": false,
                "wordsOver13Chars": [],
                "wordsOver4Syllables": [],
                "adverbs": []
            },
            {
                "phrase": "Obama is the 44th President of the United States.",
                "cleanPhrase": "Obama is the 44th President of the United States ",
                "isVeryHard": false,
                "isHard": false,
                "wordsOver13Chars": [],
                "wordsOver4Syllables": [],
                "adverbs": []
            },
            {
                "phrase": "His story is the American story — values from the heartland, a middle-class upbringing in a strong family, hard work and education as the means of getting ahead, and the conviction that a life so blessed should be lived in service to others.",
                "cleanPhrase": "His story is the American story   values from the heartland  a middle class upbringing in a strong family  hard work and education as the means of getting ahead  and the conviction that a life so blessed should be lived in service to others ",
                "isVeryHard": true,
                "isHard": false,
                "wordsOver13Chars": [],
                "wordsOver4Syllables": [],
                "adverbs": [
                    "hard"
                ]
            }
        ],
        "textStats": {
            "letterCount": 238,
            "sentenceCount": 3,
            "uniqueWordCount": 42,
            "syllableCount": 80,
            "totalSyllables": 81,
            "averageSyllablesPerWord": 1.5,
            "wordsWithThreeSyllables": 7,
            "percentWordsWithThreeSyllables": 12.96,
            "longestSentence": "his story is the American story values from the heartland a middle class upbringing in a strong family hard work and education as the means of getting ahead and the conviction that a life so blessed should be lived in service to others. ",
            "paragraphCount": 1,
            "averageSpeakingTime": 0.4,
            "averageReadingTime": 0.2,
            "averageWritingTime": 1.4
        }
    }
}
```

This example output shows the detailed statistical data resulting from the analysis of the submitted text. The output is a list containing a similar object for each piece of text analyzed.

### Notes

- The collected data is stored in Apify's default data store.

# Actor input Schema

## `textContent` (type: `string`):

Enter the text you want to analyze for readability (or upload a file below). Texts longer than 10,000 words will be automatically processed in chunks.

## `fileUpload` (type: `string`):

Upload a file to analyze for readability (.txt, .md, .html, .pdf, .docx). If you upload a file, the text area above will be ignored. Texts longer than 10,000 words will be automatically processed in chunks. Markdown is rendered before extraction, and scanned or image-only PDFs are not supported without OCR.

## `proxyConfiguration` (type: `object`):

Using a proxy is recommended for faster and more reliable results

## Actor input object example

```json
{
  "textContent": "Barack H. Obama is the 44th President of the United States. His story is the American story — values from the heartland, a middle-class upbringing in a strong family, hard work and education as the means of getting ahead, and the conviction that a life so blessed should be lived in service to others.",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}
```

# Actor output Schema

## `readabilityAnalysisResults` (type: `string`):

Dataset items produced by the actor, including phrases, readability formula scores, per-sentence flags, and aggregate text statistics.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammetakkurtt/readability-analyzer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("muhammetakkurtt/readability-analyzer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call muhammetakkurtt/readability-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=muhammetakkurtt/readability-analyzer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Readability Analyzer",
        "description": "Instantly analyze readability in text and files (.txt, .pdf, .docx). This advanced tool scores your content with multiple metrics like Flesch-Kincaid, highlights hard-to-read sentences, and provides full text statistics. Perfect for SEO, content marketing and effective communication.",
        "version": "0.0",
        "x-build-id": "jLIWEZLDREg9Vyxqs"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/muhammetakkurtt~readability-analyzer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-muhammetakkurtt-readability-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/muhammetakkurtt~readability-analyzer/runs": {
            "post": {
                "operationId": "runs-sync-muhammetakkurtt-readability-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/muhammetakkurtt~readability-analyzer/run-sync": {
            "post": {
                "operationId": "run-sync-muhammetakkurtt-readability-analyzer",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "textContent": {
                        "title": "Text to Analyze",
                        "type": "string",
                        "description": "Enter the text you want to analyze for readability (or upload a file below). Texts longer than 10,000 words will be automatically processed in chunks.",
                        "default": "Barack H. Obama is the 44th President of the United States. His story is the American story — values from the heartland, a middle-class upbringing in a strong family, hard work and education as the means of getting ahead, and the conviction that a life so blessed should be lived in service to others."
                    },
                    "fileUpload": {
                        "title": "Upload a File for Analysis",
                        "type": "string",
                        "description": "Upload a file to analyze for readability (.txt, .md, .html, .pdf, .docx). If you upload a file, the text area above will be ignored. Texts longer than 10,000 words will be automatically processed in chunks. Markdown is rendered before extraction, and scanned or image-only PDFs are not supported without OCR."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Using a proxy is recommended for faster and more reliable results",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": []
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
