{"uid":"cap_TcT_mPbdv8kIbR6H27mdm","slug":"one-engine-text-token-line-counter-f8441216","name":"ONE Engine Text Token Line Counter","description":"Low-cost pay-per-call utility APIs for autonomous agents using x402 on Base.","url":"https://one-search.one-engine.workers.dev/v3/text-token/lines/t7?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["text"],"properties":{"text":{"type":"string","description":"Text up to 50000 characters"}}},"responseSchema":{"type":"object","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0065","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.0065/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0065","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0065","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_1qY_sNaeNmPKZx_rsb6yJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0065","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, returning a line-based token analysis for up to 50,000 characters.","exampleAgentPrompt":"Count the number of lines in this block of text for me: 'Line one\nLine two\nLine three\nLine four\nLine five' — I need to know exactly how many lines it contains.","exampleUseCases":[{"title":"Code file line count check","prompt":"Take this Python script I'm pasting and tell me exactly how many lines of code it has — here it is: 'def foo():\n    return 1\n\ndef bar():\n    return 2\n'"},{"title":"Log file line analysis","prompt":"I have this server log excerpt and I need to know how many lines (entries) it contains so I can estimate the total log size: '2024-01-01 ERROR timeout\n2024-01-01 INFO ok\n2024-01-02 WARN slow\n'"},{"title":"Document section line counting","prompt":"Count how many lines are in this draft paragraph I wrote — I need to keep it under 10 lines for formatting reasons: 'This is line one.\nThis is line two.\nThis is line three.\n'"}],"resultDescription":"Returns a JSON object containing the line count and/or line-based token breakdown derived from the submitted text, indicating how many lines the input contains.","failureModes":["Text exceeding 50,000 characters may be rejected or truncated","Empty text input may return zero or an error","Payment failure via x402 will block the request","Malformed JSON body returns a 4xx error","Network timeout on the Cloudflare Worker may return a 5xx"],"whenToPreferThis":"Choose this endpoint when you need a cheap, pay-per-call line-counting or line-tokenization operation on text up to 50,000 characters, especially within an autonomous agent pipeline that uses x402 micropayments on Base for cost control. Ideal for lightweight text structure analysis without requiring a full NLP service.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:39:34.722Z","isFirstParty":false,"canonicalSlug":"one-engine-text-token-line-counter-cd6c9c98"}