Reference
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
text |
string | yes | Plain text, up to 64 KB. Query string or request body. |
lang |
string | no | en, ru or uk. Detected from the script when omitted. |
top |
int | no | How many words and phrases to return, 1 to 50. Default: 10. |
min_word_length |
int | no | Shorter words are ignored in the ranking. Default: 3. |
Example request
curl -s "https://api2.globus.studio/v2/text-stats?text=GLOBUS-API"
Editors and content teams ask a small set of questions before publishing: how long is this, how fast does it read, and which words repeat. This endpoint answers them without sending the text anywhere else, which matters for a draft that is not public yet.
Counts and reading time
The response returns characters with and without spaces, words, unique words, content words, sentences, paragraphs, average word length and average sentence length. Reading time is calculated at 200 words per minute and never drops below one minute for non-empty text.
curl -s -X POST "https://api2.globus.studio/v2/text-stats" -H "Content-Type: application/json" -d '{"text":"Your article text","lang":"en","top":20}'
Words, phrases and density
Stop words are removed for English, Russian and Ukrainian, then the top words are ranked with a count and a density percentage. The same ranking runs over two-word and three-word phrases built from content words, so a phrase is broken by a stop word instead of straddling it.
Language is detected from the script when the parameter is missing: a text with at least 30 percent Cyrillic is Russian, and the presence of Ukrainian letters switches it to Ukrainian.
Limits
The text limit is 64 KB per request. Nothing is stored and nothing is cached. The endpoint sits in the cheapest rate tier at 180 requests per minute.
Related
The full parameter table, every error code and a live request are on the documentation page. It opens in the same language as this page and needs no account.
A longer walkthrough, with the checks that matter and the limits worth planning for: Reading time, word density and the numbers editors ask for.