{"uid":"cap_KxEa0bzTGYLZRRIzNoL1e","slug":"httpay-text-diff-api-5a2fb467","name":"HTTPay Text Diff API","description":"307 pay-per-call APIs (287 native + Universal Gateway proxying 37 services) powered by x402 and USDC on Base. Token intelligence, DeFi yields, MEV risk, AI tools, web scraping. No API keys, no subscriptions — pay $0.001–$0.05 per call.","url":"https://httpay.xyz/api/text-diff","method":"POST","headers":{},"bodySchema":null,"responseSchema":{"type":"json","example":{"description":"Compute the diff between two text strings. POST JSON body: {text1, text2, type}. 'type' can be 'chars', 'words', or 'lines' (default: lines). Returns added/removed counts and a structured patch. Uses the 'diff' npm package."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nZwQ4pGkS-G-yPxp4VReM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the character, word, or line-level diff between two text strings, returning added/removed counts and a structured patch.","exampleAgentPrompt":"Compare these two paragraphs word by word and tell me what was added and removed: text1 is 'The quick brown fox jumps over the lazy dog' and text2 is 'The quick red fox leaps over the sleepy cat' — use words mode.","exampleUseCases":null,"resultDescription":"Returns a JSON object with counts of added and removed tokens (chars, words, or lines depending on the type parameter) and a structured patch array describing each change, produced by the npm diff library.","failureModes":["Missing text1 or text2 body fields — likely returns 400 or validation error","Invalid type value (not chars/words/lines) — may default to lines or return error","Payment not included or insufficient USDC — returns 402 Payment Required","Very large text inputs may time out or be rejected","Malformed JSON body — returns 400 Bad Request"],"whenToPreferThis":"Use this endpoint when you need a quick, pay-per-call text diff without managing API keys or subscriptions — ideal for agents that occasionally need to compare text snippets, detect changes between document versions, or compute edit distances without spinning up a dedicated diff service.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:57:08.704Z","isFirstParty":false}