Word Counter avatar

Word Counter

Pricing

Pay per event

Go to Apify Store
Word Counter

Word Counter

This actor counts words, characters, sentences, and paragraphs in web page content. It intelligently detects the main content area (article, main, or body) and removes navigation, scripts, and other non-content elements. It also estimates reading time (200 WPM) and speaking time (130 WPM).

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Count words, characters, sentences, and paragraphs on web pages with reading and speaking time estimates.

What does Word Counter do?

This actor counts words, characters, sentences, and paragraphs in web page content. It intelligently detects the main content area (article, main, or body) and removes navigation, scripts, and other non-content elements. It also estimates reading time (200 WPM) and speaking time (130 WPM). Process a single page or hundreds of URLs in one run to audit content length across your entire site.

Use cases

  • Content strategists -- measure content length across your site to identify thin pages that need expansion
  • SEO specialists -- check if pages meet recommended word counts for target keywords and competitive benchmarks
  • Editorial teams -- validate that articles meet minimum length requirements before publishing
  • Competitive analysts -- measure competitor content depth and compare article lengths across sites
  • Podcast/video producers -- estimate speaking time for scripts and articles that will be converted to audio or video

Why use Word Counter?

  • Smart content detection -- automatically identifies the main content area (article, main, body) and strips navigation, ads, and scripts
  • Comprehensive metrics -- returns word count, character count (with and without spaces), sentence count, paragraph count, heading count, image count, and link count
  • Reading and speaking time -- estimates reading time at 200 WPM and speaking time at 130 WPM
  • Batch processing -- analyze hundreds of URLs at once instead of pasting text into online tools one page at a time
  • Structured JSON output -- every result is machine-readable for easy filtering, sorting, and reporting
  • Pay-per-event pricing -- costs just $0.001 per URL analyzed with no monthly subscription

Input parameters

ParameterTypeRequiredDefaultDescription
urlsstring[]Yes--List of web page URLs to count words on

Example input

{
"urls": [
"https://en.wikipedia.org/wiki/Web_scraping",
"https://example.com"
]
}

Output example

{
"url": "https://en.wikipedia.org/wiki/Web_scraping",
"title": "Web scraping - Wikipedia",
"wordCount": 4523,
"characterCount": 28450,
"characterCountNoSpaces": 24100,
"sentenceCount": 210,
"paragraphCount": 45,
"avgWordsPerSentence": 21.5,
"readingTimeMinutes": 22.6,
"speakingTimeMinutes": 34.8,
"headingCount": 18,
"imageCount": 2,
"linkCount": 156,
"contentArea": "article",
"error": null,
"analyzedAt": "2026-03-01T12:00:00.000Z"
}

Output fields

FieldTypeDescription
urlstringThe analyzed page URL
titlestringThe page title
wordCountnumberTotal words in the main content area
characterCountnumberTotal characters including spaces
characterCountNoSpacesnumberTotal characters excluding spaces
sentenceCountnumberTotal sentences detected
paragraphCountnumberTotal paragraphs detected
avgWordsPerSentencenumberAverage words per sentence
readingTimeMinutesnumberEstimated reading time at 200 WPM
speakingTimeMinutesnumberEstimated speaking time at 130 WPM
headingCountnumberNumber of headings (H1-H6) found
imageCountnumberNumber of images found in the content area
linkCountnumberNumber of links found in the content area
contentAreastringHTML element used as content boundary (article, main, or body)
errorstringError message if analysis failed, null otherwise
analyzedAtstringISO timestamp of the analysis

How much does it cost?

Word Counter uses Apify's pay-per-event pricing model. You only pay for what you use.

EventPriceDescription
Start$0.035One-time per run
URL analyzed$0.001Per page analyzed

Example costs:

  • 10 pages: $0.035 + 10 x $0.001 = $0.045
  • 100 pages: $0.035 + 100 x $0.001 = $0.135
  • 1,000 pages: $0.035 + 1,000 x $0.001 = $1.035

Using the Apify API

You can start Word Counter programmatically from your own applications using the Apify API. The following examples show how to run the actor and retrieve results in both Node.js and Python.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/word-counter').call({
urls: ['https://en.wikipedia.org/wiki/Web_scraping'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/word-counter').call(run_input={
'urls': ['https://en.wikipedia.org/wiki/Web_scraping'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Integrations

Word Counter works with all major automation platforms available on Apify. Export results to Google Sheets to build a content length dashboard and sort pages by word count. Use Zapier or Make to trigger word count checks whenever new content is published in your CMS. Send alerts to Slack when articles fall below your minimum word count threshold. Pipe results into n8n workflows for custom analysis, or set up webhooks to get notified as soon as a run finishes. Chain it with Content Readability Checker to get both length and readability metrics in a single audit.

Tips and best practices

  • Focus on content pages, not homepages -- word count metrics are most meaningful on articles, blog posts, and product pages, not navigation-heavy homepages
  • Export to Google Sheets and sort by wordCount to quickly identify thin content pages that need expansion
  • Compare contentArea values -- if the actor falls back to "body" instead of "article" or "main", the page may lack proper semantic HTML, which could inflate word counts with nav/footer text
  • Combine with Content Readability Checker to get both word count and readability scores for a complete content quality audit
  • Schedule weekly runs on your blog or content hub to track content production velocity over time

FAQ

How does the actor detect the main content area? It looks for semantic HTML elements in order: <article>, <main>, then falls back to <body>. It strips navigation, footer, sidebar, script, and style elements before counting.

Does it count words in navigation menus and footers? No. The actor filters out non-content elements before counting. The contentArea field in the output tells you which HTML element was used as the content boundary.

Can I use this to count words on pages that require login? No. The actor uses plain HTTP requests and cannot handle authentication. It works best on publicly accessible content pages.