# Word Count Count Unicode characters, whitespace-delimited words, and lines in a text string. This is a paid API service exposed by Server402 for AI agents, MCP clients, OpenAPI importers, and applications. Call the endpoint once without payment to receive HTTP 402 payment instructions, complete payment, then retry with the returned payment token or x402 signature. ## Invocation - Service ID: `word-count` - Canonical service ID: `word-count` - Method: `POST` - Endpoint: `https://aivps.lat/api/tools/word-count` - Service page: https://aivps.lat/services/word-count - OpenAPI: https://aivps.lat/openapi.json - Catalog search: https://aivps.lat/api/catalog/search?q=word-count - MCP endpoint: https://aivps.lat/mcp - MCP tool: `word_count` ## Pricing And Payment - Price: USD 0.05 - Billing mode: `per_call` - Max calls per payment: `1` - Payment provider: `x402_facilitator` - Payment flow: call without payment, receive `402 Payment Required`, pay, then retry with `X-Payment-Token` or `PAYMENT-SIGNATURE`. - Payment hint: Create a payment with POST /api/payments using serviceId="word-count", then pass the returned token in X-Payment-Token or MCP paymentToken. ## Use Cases - Estimate text length before publishing - Measure prompt or document size - Analyze plain text statistics ## Keywords text, word count, character count, line count, statistics ## Input Schema ```json { "properties": { "text": { "type": "string" } }, "required": [ "text" ], "type": "object" } ``` ## Output Schema ```json { "properties": { "characters": { "type": "integer" }, "lines": { "type": "integer" }, "words": { "type": "integer" } }, "type": "object" } ``` ## Example Request ```json { "text": "hello paid api" } ``` ## Example Response ```json { "characters": 14, "lines": 1, "words": 3 } ```