{"uid":"cap_NZKLvlpZKo9rm4Q1ryzPO","slug":"halowerk-text-statistics-d8a360d3","name":"HALOWERK Text Statistics","description":"Counts word-like Intl.Segmenter segments, code points, UTF-16 units, UTF-8 bytes and CRLF/CR/LF lines for supplied text. Returns the selected segmentation locale.","url":"https://agent.halowerk.com/v1/text-statistics?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","maxLength":32000},"locale":{"enum":["en","de","fr","es","zh","ja"],"default":"en"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_oHvoCYbb6mk1EKpXl3JfJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Counts word segments, code points, UTF-16 units, UTF-8 bytes, and line counts for a given text, using a locale-aware Intl.Segmenter.","exampleAgentPrompt":"Can you count the words, UTF-8 bytes, code points, and lines in this text using the Japanese locale: '日本語のテキストサンプルです。改行があります。'?","exampleUseCases":[{"title":"Enforce token limits before LLM submission","prompt":"Before I send this article to the language model, can you tell me the UTF-8 byte count and word count for it using the English locale? I need to make sure it's within limits."},{"title":"Validate character count for social media post","prompt":"I'm writing a post in French — can you count the words and code points in this text so I can check I'm within the character limit? Text: 'Bonjour le monde, voici un exemple de texte en français!'"},{"title":"Audit multilingual document line counts","prompt":"I have this block of Chinese text and I need to know how many lines it has and how many UTF-16 units it uses — please analyze it with the Chinese locale."}],"resultDescription":"Returns counts for word-like Intl.Segmenter segments, Unicode code points, UTF-16 code units, UTF-8 bytes, and CRLF/CR/LF line counts for the supplied text, along with the locale used for segmentation.","failureModes":["Text exceeds 32,000 character limit — returns a validation error","Invalid or unsupported locale value — returns an error (only en, de, fr, es, zh, ja accepted)","Missing required 'text' field — returns a schema validation error","Payment failure or insufficient USDC balance — returns 402 Payment Required"],"whenToPreferThis":"Use this endpoint when you need accurate, locale-aware word counts (using Intl.Segmenter rather than naive whitespace splitting) alongside multi-encoding byte and code point metrics in a single call. It is especially valuable for multilingual text (CJK, accented Latin scripts) where word boundaries are non-trivial, or when you need both byte-level and character-level measurements simultaneously. Prefer it over client-side counting when you need consistent, server-authoritative text statistics.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T18:30:36.438Z","isFirstParty":false,"canonicalSlug":"halowerk-text-statistics-d8a360d3"}