{"uid":"cap_18FLgK9RfK1HS77zv3UFh","slug":"coco-text-count-api-30361c3c","name":"CoCo Text Count API","description":"Zach Riehn's lab: an about-me and portfolio, a news desk, The Atelier for AI experiments, Launch Lab for XRP research, and Fracture for games.","url":"https://cocoeatsai.com/area4/agent/tools/text-count?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"const":"http"},"method":{"enum":["GET"]},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"const":"json"},"example":{"type":"object","required":["characters"],"properties":{"characters":{"type":"number"}}}}}}},"responseSchema":{"type":"json","example":{"lines":1,"words":11,"digits":0,"spaces":10,"letters":39,"graphemes":51,"sentences":2,"bytes_utf8":51,"characters":51,"code_points":51,"characters_no_spaces":41},"exampleNote":"Computed offline with demonstration inputs; time/random values are illustrative."},"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_Gbg3E5VrOpNPVoxGQGjkE","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, sentences, bytes, digits, spaces, and other text metrics for a given input string.","exampleAgentPrompt":"Can you count the number of characters, words, and sentences in this paragraph: 'The quick brown fox jumps over the lazy dog. Pack my box with five dozen liquor jugs.'","exampleUseCases":[{"title":"Essay word count check","prompt":"How many words and characters are in this paragraph I wrote: 'Artificial intelligence is transforming the way we live and work. From healthcare to education, the impact is profound and far-reaching.'?"},{"title":"Social media post length validation","prompt":"Can you count the characters and spaces in this tweet draft so I know if it fits within 280 characters: 'Just launched my new app! Check it out at the link below and let me know what you think. Feedback is always welcome!'"},{"title":"Code comment line and sentence count","prompt":"Count the lines, sentences, and total bytes in this text block: 'Initialize the database connection. Set the timeout to thirty seconds. Handle exceptions gracefully.'"}],"resultDescription":"A JSON object with detailed text metrics including: characters, words, lines, sentences, letters, digits, spaces, graphemes, bytes_utf8, and code_points counts for the input text.","failureModes":["Missing or empty input text returns error or zero counts","Non-UTF-8 encoded input may cause byte count discrepancies","Very long strings may exceed request limits","GET method with no query params schema defined may require custom parameter passing"],"whenToPreferThis":"Choose this endpoint when you need granular, multi-dimensional text statistics in a single call — especially when you need both Unicode-aware metrics (graphemes, code points) and byte-level counts simultaneously. Useful for validating text against character limits, analyzing content length, or preparing text for further processing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-19T12:43:29.042Z","isFirstParty":false,"canonicalSlug":"coco-text-count-api-30361c3c"}