{"uid":"cap_wPXUKp5B0WfgcJgWElxti","slug":"agent402-tools-dedupe-lines-7779f08d","name":"agent402.tools Dedupe Lines","description":"Remove duplicate lines, preserving first-seen order. Returns the deduped text and how many were removed.","url":"https://agent402.tools/api/dedupe-lines","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"ci":{"type":"boolean","description":"Case-insensitive"},"text":{"type":"string"}}},"responseSchema":{"type":"json","example":{"kept":3,"result":"a\nb\nc","removed":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_2R5PXkuX_GMwOQ3CdD7vR","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":"Removes duplicate lines from text, preserving first-seen order, and returns the deduplicated text along with the count of removed lines.","exampleAgentPrompt":"Can you remove all duplicate lines from this list, case-insensitively, and tell me how many were removed? Here's the text: 'apple\\nBanana\\napple\\ncherry\\nbanana\\napple'","exampleUseCases":null,"resultDescription":"Returns the deduplicated text with duplicate lines removed (preserving the first occurrence), plus a count of how many duplicate lines were removed.","failureModes":["Missing or empty text field returns an error","Extremely large text inputs may be rejected or time out","Non-string text value causes a schema validation error","Network or payment failure (x402) prevents the call from completing"],"whenToPreferThis":"Choose this endpoint when you need to quickly deduplicate a block of multi-line text while preserving the original first-seen order. It's ideal for cleaning lists, log outputs, config files, or any newline-delimited data where exact or case-insensitive duplicate removal is needed without sorting or reordering.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:03.138Z","isFirstParty":false}