๐Ÿ“Š

Text Statistics API

Analyze any text: word count, reading time, sentences, paragraphs, and more. Perfect for AI agents that need to measure content before processing.

API Docs $0.001 / request

About this tool

Get instant statistics for any text: word count, character count (with and without spaces), sentence count, paragraph count, unique word count, average word length, and estimated reading time. Runs entirely in JavaScript โ€” no external API calls, no latency overhead.

Quick Start

curl -X POST https://api.iteratools.com/text/stats \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "Artificial intelligence is transforming industries worldwide.\n\nMachine learning enables computers to learn from data without explicit programming. Deep learning uses neural networks with many layers to solve complex problems."}'

Response

{ "words": 33, "characters": 213, "characters_no_spaces": 181, "sentences": 3, "paragraphs": 2, "unique_words": 29, "avg_word_length": 5.5, "reading_time_seconds": 10, "reading_time_label": "<1 min read" }

Response Fields

  • words โ€” Total word count (split by whitespace)
  • characters โ€” Total character count including spaces
  • characters_no_spaces โ€” Character count excluding spaces
  • sentences โ€” Sentence count (split by . ! ?)
  • paragraphs โ€” Paragraph count (split by double newline)
  • unique_words โ€” Count of distinct words (case-insensitive)
  • avg_word_length โ€” Average characters per word
  • reading_time_seconds โ€” Estimated reading time at 200 WPM
  • reading_time_label โ€” Human-readable label (e.g. ~3 min read)

Use Cases

  • Validate content length before sending to LLMs (token estimation)
  • Add "X min read" labels to articles and blog posts
  • Measure content complexity and vocabulary diversity
  • Pre-process text before summarization or translation
  • Build writing analytics dashboards

Longer Text Example

curl -X POST https://api.iteratools.com/text/stats \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "Your long article text here..."}'
{ "words": 650, "characters": 4120, "characters_no_spaces": 3470, "sentences": 42, "paragraphs": 8, "unique_words": 380, "avg_word_length": 5.3, "reading_time_seconds": 195, "reading_time_label": "~4 min read" }

Pricing & Limits

  • $0.001 per request via x402 micropayment on Base (USDC)
  • Max text size: 50KB
  • Timeout: 5 seconds
  • No external API calls โ€” instant response
Full Documentation Browse All Tools