{"uid":"cap_ORq2oRbB2pPX9ZADF1Go-","slug":"one-engine-remove-empty-lines-197ab990","name":"ONE Engine – Remove Empty Lines","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/remove-empty-lines?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string"}}},"responseSchema":{"type":"json","example":{"text":"a\nb\nc","lines":3}},"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_vlTVytxIKWEJreUSA8XAe","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":"Strips all empty lines from a block of text and returns the cleaned text along with the resulting line count.","exampleAgentPrompt":"Can you clean up this block of text by removing all the empty lines from it: 'Hello\n\nWorld\n\nThis is a test\n\n'?","exampleUseCases":[{"title":"Clean up pasted document text","prompt":"I just pasted some text from a Word doc and it has a ton of blank lines scattered throughout — can you strip all the empty lines out of it so it reads cleanly?"},{"title":"Compact log file output","prompt":"Here's a chunk of log output with a bunch of empty lines mixed in: 'INFO: start\n\nWARN: retrying\n\nERROR: failed\n\n' — remove all the blank lines and tell me how many lines are left."},{"title":"Normalize user-submitted form text","prompt":"A user submitted this bio with lots of random blank lines in it. Can you remove all the empty lines so I can store a clean version?"}],"resultDescription":"Returns a JSON object with 'text' (the input string with all empty lines removed, lines joined) and 'lines' (integer count of remaining non-empty lines).","failureModes":["Missing or non-string 'text' field returns a validation error","Extremely large payloads may be rejected due to Cloudflare Worker size limits","Payment failure via x402 will result in a 402 response before processing","Network timeout if the worker is cold-starting under load"],"whenToPreferThis":"Choose this endpoint when you need a fast, cheap, single-purpose utility to remove empty lines from text programmatically within an agent workflow, especially when you also want the resulting line count returned. At $0.001 per call it is cost-effective for high-frequency text normalization tasks. Prefer it over general-purpose LLM calls for this deterministic operation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T12:44:34.759Z","isFirstParty":false,"canonicalSlug":"one-engine-remove-empty-lines-197ab990"}