Every editorial brief carries a few numbers: how long the piece is, how long it takes to read, and which words repeat too often. A writing tool shows some of them. A team that publishes through a CMS and a translation pipeline needs the same numbers from a place that stays consistent across languages.
The text statistics endpoint counts characters, words, sentences and paragraphs, estimates reading time, and ranks words and phrases with a density percentage. It reads English, Russian and Ukrainian, and it works on a draft that has not been published anywhere.
curl -X POST "https://api2.globus.studio/v2/text-stats" -H "Content-Type: application/json" -d '{"text":"Your article text","lang":"en","top":20}'
Counts that stay consistent
The response separates characters with and without spaces, words, unique words and content words. Content words exclude stop words and numbers, which is the number editors actually use when they ask how dense a text is.
Average word length and average sentence length are calculated from the same token stream. A sentence count comes from terminal punctuation followed by a space or the end of the text, so a decimal number does not split a sentence.
Reading time is calculated at 200 words per minute and never drops below one minute for a non-empty text. That is a reading speed for prose, not a promise about how long a visitor stays on the page.
Words, phrases and density
The ranking runs over content words only. Each entry carries the word, its count and a density percentage based on all words in the text. Phrases of two and three words are built from the same stream, and a stop word breaks a phrase instead of straddling it.
That last rule matters for the result. A trigram assembled across a stop word usually reads like a fragment and adds noise to a keyword report. Breaking it keeps the list closer to what an editor would pick by hand.
Language detection
When the language is not passed, the endpoint looks at the script. A text with at least 30 percent Cyrillic is Russian, and the presence of Ukrainian letters switches the result to Ukrainian. The stop list follows the detected language.
Detection is a convenience for a mixed publishing queue. Pass lang explicitly when the answer feeds a report, because a short text with a few borrowed words can point at the wrong language.
Limits
The text limit is 64 KB per request, which is roughly a long magazine article. Nothing is stored, nothing is cached, and the endpoint makes no outbound request.
The rate limit is the highest tier at 180 requests per minute, so a batch of drafts can be processed from a script without special handling.
Where it fits
Use the numbers in a pre-publication checklist: length against the brief, reading time against the audience, and a density list for the words that appear ten times without reason. The same call works for a translation review, where the word count of the translated text is compared with the source before anyone reads it.
Paragraph count is a rough measure of structure. A text of 900 words in one paragraph reads differently from the same words in six, and the reading time does not change. Pair the count with the average sentence length: a high average and a low paragraph count usually mean a wall of text that needs editing before publication.
A density above four percent for one word usually points at repetition rather than at a topic, and the list is short enough to check by eye.
The catalogue page has the parameter table and a live example: text statistics API.