{"uid":"cap_GQ2HwV90OnjI78luPO0y-","slug":"agent402-tools-text-counter-1d68afda","name":"agent402.tools Text Counter","description":"Count characters, words, lines, and (optionally) occurrences of a substring in text.","url":"https://agent402.tools/api/count","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"find":{"type":"string","description":"Optional substring to count"},"text":{"type":"string"}}},"responseSchema":{"type":"json","example":{"lines":1,"words":6,"characters":22,"occurrences":2}},"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_FVZS4k-ShnkuTsUZWYFmJ","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 characters, words, lines, and optionally occurrences of a specified substring in a given text.","exampleAgentPrompt":"Can you count the characters, words, and lines in this text, and also tell me how many times the word 'cloud' appears: 'The cloud is a powerful tool. Many companies rely on the cloud for storage. The cloud continues to grow.'","exampleUseCases":null,"resultDescription":"Returns a breakdown of the text including total character count, word count, line count, and if a 'find' substring was provided, the number of times that substring appears in the text.","failureModes":["Missing 'text' field in request body returns a validation error","Empty string input may return zero counts for all metrics","Very large text inputs may time out or exceed payload limits","Malformed JSON body returns a 400 error"],"whenToPreferThis":"Use this endpoint when you need a quick, reliable computation of basic text statistics — character count, word count, line count — and optionally a substring frequency count, without needing NLP, sentiment, or semantic analysis. Ideal for content editors, writing assistants, or any agent verifying text length or keyword density.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:03.348Z","isFirstParty":false}