{"uid":"cap_njAheYPhybibzqlFGnreV","slug":"one-engine-text-line-count-5716effa","name":"ONE Engine Text Line Count","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v1/text/line-count?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string"}}},"responseSchema":{"type":"json","example":{"lines":3}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0009","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.0009/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0009","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0009","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_XkDORQnB46TmA8CVfL7ec","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0009","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Counts the number of lines in a given text string and returns the line count as an integer.","exampleAgentPrompt":"How many lines are in this text: 'Hello world\nThis is line two\nAnd this is line three'?","exampleUseCases":[{"title":"Validate log file line count","prompt":"Count how many lines are in this server log snippet so I can check if it matches the expected 500-line output: [log text here]."},{"title":"Check poem or lyric length","prompt":"I just wrote this poem — can you tell me how many lines it has? [poem text]"},{"title":"Enforce text input limits","prompt":"Can you count the number of lines in this user-submitted form response to make sure it doesn't exceed 10 lines? Here's the text: [form response]."}],"resultDescription":"Returns a JSON object with a single field 'lines' containing an integer representing the total number of lines in the provided text string.","failureModes":["Empty or missing 'text' field may return an error or a line count of 0","Very large text payloads may be rejected or time out","Non-string input types for 'text' may cause a validation error","Network issues with the Cloudflare Worker may result in 5xx errors"],"whenToPreferThis":"Choose this endpoint when you need a cheap, fast, pay-per-call line counting utility without setting up local text processing, especially in autonomous agent workflows using x402 micropayments on Base where spinning up custom code is not desirable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:43:53.186Z","isFirstParty":false,"canonicalSlug":"one-engine-text-line-count-5716effa"}