# Website Word Count (`coder_luffy/website-word-count`) Actor

Analyze word count and content depth of any web page. Get word count, sentence count, paragraph count, heading count, and SEO content assessment for one or multiple URLs in a single run.

- **URL**: https://apify.com/coder\_luffy/website-word-count.md
- **Developed by:** [Luffy](https://apify.com/coder_luffy) (community)
- **Categories:** SEO tools, Integrations
- **Stats:** 8 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Website Word Count

Analyze the word count and textual content of any web page. Get instant SEO content assessments with detailed statistics — word count, sentence count, paragraph count, heading count, and more. Supports analyzing one or multiple URLs in a single run.

### What is Website Word Count?

Numerous studies have shown that there is a relationship between the amount of content on a page (typically measured in word count) and its ranking potential — generally, longer content will rank higher. Obviously content also needs to be topically relevant, keyword-rich, and highly readable for the visitor.

Website Word Count extracts all visible (selectable) text from any web page — ignoring scripts, styles, navigation, and hidden elements — and gives you a complete content breakdown with an actionable SEO assessment.

### Use cases

- **SEO content audits** — quickly check whether your pages have enough content to compete in search results
- **Competitor analysis** — compare word counts across competitor pages to benchmark your content strategy
- **Content migration** — verify word counts before and after a site migration to ensure no content was lost
- **Bulk page analysis** — analyze hundreds of URLs at once by passing them as a list
- **Editorial workflow** — validate that published pages meet your minimum content guidelines

### Input

| Field | Type | Description |
|-------|------|-------------|
| `urls` | array of strings | List of website URLs to analyze |
| `url` | string | A single URL to analyze (alternative to `urls`) |
| `minWordCount` | integer | Minimum recommended word count for SEO (default: `500`) |
| `includeMetaData` | boolean | Whether to include meta title and description (default: `true`) |

#### Input example

```json
{
    "urls": [
        "https://example.com/",
        "https://example.com/about",
        "https://example.com/blog/post-1"
    ],
    "minWordCount": 500,
    "includeMetaData": true
}
```

### Output

The Actor stores results in a dataset. Each URL produces one result object:

```json
{
    "url": "https://example.com/",
    "wordCount": 1391,
    "status": "good",
    "assessment": "Your page has a good level of textual content, which will assist in its ranking potential.",
    "recommendation": "Your page has 1391 words, which meets the recommended minimum of 500 words. Well-written, keyword-rich content at this length gives your page solid ranking potential.",
    "characterCount": 8350,
    "sentenceCount": 95,
    "paragraphCount": 42,
    "headingCount": 12,
    "avgWordsPerSentence": 14.6,
    "metaTitle": "Example - Homepage",
    "metaDescription": "Welcome to Example, the leading platform for...",
    "analyzedAt": "2026-02-25T10:30:00.000000+00:00"
}
```

#### Status values

| Status | Word Count | Meaning |
|--------|-----------|---------|
| `good` | >= minimum | Page has a good level of textual content for ranking potential |
| `warning` | 50–99% of minimum | Page could benefit from more content |
| `poor` | < 50% of minimum | Page has very little content and may struggle to rank |
| `error` | — | The page could not be fetched or analyzed |

### How it works

1. Accepts one or multiple URLs as input
2. Fetches each page's HTML content with a realistic browser User-Agent
3. Parses the HTML and strips non-visible elements (scripts, styles, hidden content, comments, nav, footer)
4. Extracts all visible, selectable text — the same text a user could highlight on the page
5. Counts words, characters, sentences, paragraphs, and headings
6. Generates an SEO assessment based on the configurable word count threshold
7. Optionally extracts the page's meta title and meta description
8. Stores all results in the dataset for export in JSON, CSV, Excel, or other formats

### Integrations

Website Word Count can be connected with almost any cloud service or web app via [integrations on the Apify platform](https://apify.com/integrations). You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and many more. Or you can use [webhooks](https://docs.apify.com/integrations/webhooks) to take actions whenever an Actor run is finished.

# Actor input Schema

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

List of website URLs to analyze for word count. Each URL will be visited and its visible text content will be counted.

## `url` (type: `string`):

A single URL to analyze. Use this or 'urls' field. If both are provided, this URL is added to the list.

## `minWordCount` (type: `integer`):

The minimum word count threshold for SEO recommendations. Pages below this count will receive a warning.

## `includeMetaData` (type: `boolean`):

Whether to extract and include meta title and description in the results.

## Actor input object example

```json
{
  "urls": [
    "https://www.apify.com/"
  ],
  "minWordCount": 500,
  "includeMetaData": true
}
```

# 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": [
        "https://www.apify.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("coder_luffy/website-word-count").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": ["https://www.apify.com/"] }

# Run the Actor and wait for it to finish
run = client.actor("coder_luffy/website-word-count").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": [
    "https://www.apify.com/"
  ]
}' |
apify call coder_luffy/website-word-count --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,coder_luffy/website-word-count"
        }
    }
}

```

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/9mgxoIPCFKAu5KbFN/builds/RSLBgablGZaE78xrU/openapi.json
