How to count words and score readability of a text with an API

Updated 2026-11-10

Use when an agent needs word, sentence and character counts, reading time or readability of a text.

From an MCP client, add https://tanod.dev/mcp and call text_stats; its free daily calls are applied automatically, no key or signup.

POST text to /v1/text/stats. It returns counts (characters, words, unique words, sentences, paragraphs), average lengths, reading and speaking time, and for English several readability scores.

Request

text is up to 200,000 characters. lang is an ISO 639 code; readability scores are computed for English only (the default), and any other language gets counts only.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/text/stats \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"text": "The quick brown fox jumps over the lazy dog. It was not amused! Readability formulas estimate how hard text is to read."}'

Response

Response (example from the API spec, trimmed)
{
  "lang": "en",
  "counts": {
    "characters": 119,
    "characters_no_spaces": 98,
    "letters": 95,
    "words": 22,
    "unique_words": 21,
    "sentences": 3,
    "paragraphs": 1,
    "avg_word_length": 4.32,
    "avg_sentence_words": 7.33
  },
  "reading_time_seconds": 6,
  "speaking_time_seconds": 8,
  "syllables": {
    "total": 33,
    "per_word": 1.5,
    "polysyllabic_words": 3
  },
  "readability": {
    "flesch_reading_ease": 72.49,
    "flesch_reading_ease_label": "fairly easy",
    "flesch_kincaid_grade": 4.97,
    "gunning_fog": 8.39,
    "smog_index": 8.84,
    "coleman_liau_index": 5.55,
    "automated_readability_index": 2.58
  },
  "note": "Grade-level scores are US school grades and are estimates (heuri…",
  "source": {
    "library": "own implementation (standard library)",
    "license": "n/a"
  }
}

Limits and caveats

Syllables are counted heuristically, so the grade levels (US school grades) can be off by a fraction of a grade. Dale-Chall is not offered.

Word counts undercount languages written without spaces between words, such as Chinese and Japanese.

Text without any words is a 422 no_words and is not charged. The text is never echoed back. Tanod does not log or store it.

Doing this by hand? Use the free word counter in your browser.

Price and free allowance

USD 0.001 per call, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum with x402. 10 free calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared with FX rates, QR codes, geocoding, public holidays and the other utility endpoints (phone, validation, text, hash, convert and similar). MCP tool: text_stats at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/text?via=text-statistics-api as a custom connector (steps), then ask in plain words, for example "How many words and how long a read is this text?" The free daily allowance is applied automatically over MCP. Beyond it a call needs an x402 payment, which these clients can make.

Related guides: How to detect the language of a text with an API, How to compare two texts and get a diff with an API, How to generate a URL slug from a title with an API. Back to tanod.dev or the guide index. Results are automated and heuristic.