# Readability Analyzer: Flesch, Fog, SMOG for pages and text (`examsens.ai/readability-analyzer`) Actor

Scores the readability of web pages or text you paste: Flesch reading ease, Flesch Kincaid grade, Gunning fog, SMOG, Coleman Liau and ARI, with word, sentence and syllable counts, reading time, the longest sentences and the hardest words.

- **URL**: https://apify.com/examsens.ai/readability-analyzer.md
- **Developed by:** [Ed Rayyis](https://apify.com/examsens.ai) (community)
- **Categories:** SEO tools, For creators
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $14.00 / 1,000 text analyzeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Readability Analyzer: Flesch, Fog, SMOG for pages and text

Give it page URLs, text you paste, or both, and it returns six readability scores for each one, the counts behind them, a reading time, and the sentences and words that make the text hard to read.

### What you get for each text or page

- Six scores: Flesch reading ease, Flesch Kincaid grade level, Gunning fog index, SMOG grade, Coleman Liau index and the automated readability index (ARI), plus the average of the five grade level scores.
- The counts behind them: words, sentences, syllables, characters, letters and digits, words of three or more syllables, complex words, average words per sentence and average syllables per word.
- Reading time in minutes and seconds, at 200 words per minute or the speed you set.
- Where to start editing: the longest sentences with their word counts, and the complex words used most often.
- Dictionary coverage: the share of words whose syllables came from the CMU Pronouncing Dictionary. The rest are counted by spelling rules.
- A SMOG check: `smogReliable` is false when the text has fewer than 30 sentences, the sample size the SMOG formula was built on.

### How the scores are worked out

- Flesch reading ease: 206.835 minus 1.015 × (words ÷ sentences) minus 84.6 × (syllables ÷ words)
- Flesch Kincaid grade: 0.39 × (words ÷ sentences) + 11.8 × (syllables ÷ words) minus 15.59
- Gunning fog: 0.4 × ((words ÷ sentences) + 100 × (complex words ÷ words))
- SMOG: 1.0430 × √(words of three or more syllables × 30 ÷ sentences) + 3.1291
- Coleman Liau: 0.0588 × letters per 100 words minus 0.296 × sentences per 100 words minus 15.8
- ARI: 4.71 × (letters and digits ÷ words) + 0.5 × (words ÷ sentences) minus 21.43

Complex words for the fog index have three or more syllables, not counting an -es, -ed or -ing ending as a syllable, and leave out hyphenated compounds and capitalized words inside a sentence (taken as proper nouns). Words are runs of letters, so a number on its own is not counted as a word.

Sentences end at a full stop, question mark or exclamation mark followed by a capital letter, a digit or the end of the line. Common abbreviations such as Dr., e.g. and p.m. do not end a sentence. In pasted text and in page text, every line break also ends a sentence, so headings and list items count as sentences. In a plain text file (a URL served as `text/plain`) only a blank line ends a paragraph, so lines wrapped at a fixed width are joined back up.

For a page, the main text is scored: menus, headers and footers are left out. Turn on "Include the text" to see exactly what was scored.

English text only.

### Input

- Page URLs, one text, more texts as a JSON list (strings, or objects with an `id` and a `text`), or any mix
- Reading speed (default 200 words per minute)
- Longest sentences and complex words to list (default 5)
- Include the text (default off)
- Pages at once (default 5) and page timeout (default 30 seconds)

### Output

Dataset: one item per text or page with `id`, `url`, `finalUrl` and `title` for pages, the six scores, `averageGrade`, the counts, `readingTimeMinutes`, `readingTimeSeconds`, `smogReliable`, `dictionaryCoverage`, `longestSentences`, `topComplexWords`, and `ok`.

A text or page that cannot be scored returns an item with `ok: false` and the reason, such as `HTTP 404`, a file that is not a page or text (an image, for example), or a text with no English words. The rest of the run carries on.

Export as JSON, CSV or Excel, or read it over the API.

### Pricing

Pay per event: one event per text or page scored. A text or page that fails is not charged. The run stops when it reaches the maximum charge you set.

### Scope and conduct

Only the URLs you list are fetched. Links are not followed. No login is used.

### Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.

# Actor input Schema

## `urls` (type: `array`):

Pages to score. The main text of each page is used; menus, headers and footers are left out.

## `text` (type: `string`):

One text to score. Each line break ends a sentence, so headings and list items without a full stop count as sentences.

## `texts` (type: `array`):

Several texts to score in one run, as a JSON list of strings, or of objects with an id and a text, such as \[{"id": "intro", "text": "..."}].

## `wordsPerMinute` (type: `integer`):

Used for the reading time.

## `topItems` (type: `integer`):

How many of the longest sentences and of the most frequent complex words to return for each text.

## `includeText` (type: `boolean`):

Add the scored text to each result, so you can see what was extracted from a page.

## `maxConcurrency` (type: `integer`):

How many pages to fetch in parallel.

## `timeoutSecs` (type: `integer`):

Give up on a page after this many seconds.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://en.wikipedia.org/wiki/Readability"
    }
  ],
  "wordsPerMinute": 200,
  "topItems": 5,
  "includeText": false,
  "maxConcurrency": 5,
  "timeoutSecs": 30
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "urls": [
        {
            "url": "https://en.wikipedia.org/wiki/Readability"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("examsens.ai/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 = { "urls": [{ "url": "https://en.wikipedia.org/wiki/Readability" }] }

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

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

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

```

## CLI example

```bash
echo '{
  "urls": [
    {
      "url": "https://en.wikipedia.org/wiki/Readability"
    }
  ]
}' |
apify call examsens.ai/readability-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,examsens.ai/readability-analyzer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HBMpbyR8Wnk7zQO5Y/builds/zUu28sWgQbdIlijXG/openapi.json
