{"uid":"cap_jquawrC8DTI0hEXHkN9VQ","slug":"tradepilotusa-text-line-compare-902792f0","name":"TradepilotUSA Text Line Compare","description":"Compare two texts using deterministic longest-common-subsequence line matching. Returns unchanged, removed and added lines. Preserves whitespace within lines; normalizes CRLF/CR to LF. Maximum 200 lines and 20,000 characters per text; not a semantic comparison.","url":"https://www.tradepilotusa.com/api/agent-commerce/v1/services/text_line_compare/execute?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"after":{"type":"string","maxLength":20000},"before":{"type":"string","maxLength":20000}}},"responseSchema":{"type":"json","example":{"result":{"operations":[{"kind":"equal","text":"First"},{"kind":"delete","text":"Old"},{"kind":"insert","text":"New"},{"kind":"equal","text":"Last"}],"added_lines":1,"removed_lines":1,"line_endings_normalized":true},"utility":"text_line_compare","provenance":{"execution":"deterministic_local","model_used":false,"network_request_performed":false},"request_id":"example_text_line_compare"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PGaNh9LTuRPKGdRoTdmi1","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two text strings line by line and returns a diff showing inserted, deleted, and equal lines with line counts","exampleAgentPrompt":"Can you compare these two versions of my config file and tell me exactly which lines were added or removed? Here's the before text: 'server=localhost\\nport=8080\\ndebug=false' and the after text: 'server=localhost\\nport=9090\\ndebug=true\\nlog=verbose'.","exampleUseCases":[{"title":"Code review diff checker","prompt":"I just edited a function and want to know exactly which lines changed — here's the original: 'def greet():\\n    print(\"hello\")\\n    return None' and the new version: 'def greet(name):\\n    print(f\"hello {name}\")\\n    return name'. Can you show me a line-by-line diff?"},{"title":"Document revision tracking","prompt":"I have two drafts of a policy document and need to see which lines were added or removed between the first draft and the second draft so I can summarize the edits for my team."},{"title":"Config file change audit","prompt":"Before deploying, can you compare my old nginx config to the new one and tell me how many lines were added and how many were deleted, and list which specific lines changed?"}],"resultDescription":"Returns a JSON object containing an array of diff operations (each with a 'kind' of 'equal', 'insert', or 'delete' and the associated text), a count of added lines, a count of removed lines, and a flag indicating whether line endings were normalized. The computation is deterministic and local with no model or network calls.","failureModes":["Input text exceeds 20000 character limit per field — request will fail or truncate","Missing 'before' or 'after' fields in request body — may return an error or empty diff","Non-string input types — schema validation failure","Payment not included or insufficient USDC — 402 payment required response","Network timeout if payload is very large near the character limit"],"whenToPreferThis":"Choose this endpoint when you need a fast, deterministic, line-by-line text diff with explicit counts of added and removed lines. It is ideal for comparing configuration files, document revisions, or code snippets where you need structured diff output (equal/insert/delete operations) rather than a prose summary of changes. Prefer it over LLM-based comparison when you need exact, reproducible results with no hallucination risk, and over general-purpose diff libraries when you want a hosted API with structured JSON output and per-call pricing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T00:45:24.440Z","isFirstParty":false,"canonicalSlug":"tradepilotusa-text-line-compare-902792f0"}