{"uid":"cap_dH68nr0EukubWF5DTpBPi","slug":"vextorium-text-diff-api-efe9073e","name":"Vextorium Text Diff API","description":"Compare two texts by lines or words: similarity %, added and removed items, list of changes with positions, and a unified diff. For contract versions, prompts, configs or scraped pages.","url":"https://api.vextorium.com/diferencias-texto-pago?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"modo":{"enum":["lineas","palabras"],"type":"string"},"contexto":{"type":"integer","description":"Context lines in the unified diff (0-10)"},"original":{"type":"string"},"modificado":{"type":"string"}}},"responseSchema":{"type":"json","example":{"modo":"lineas","cambios":[{"tipo":"cambiado","antes":"Price: 10 EUR","despues":"Price: 12 EUR","posicion_nueva":1,"posicion_original":1},{"tipo":"cambiado","antes":"Warranty: 1 year","despues":"Warranty: 2 years","posicion_nueva":3,"posicion_original":3}],"anadidos":2,"quitados":2,"identicos":false,"parecido_pct":33.33,"diff_unificado":"--- original\n+++ modificado\n@@ -1,3 +1,3 @@\n-Price: 10 EUR\n+Price: 12 EUR\n Delivery: 3 days\n-Warranty: 1 year\n+Warranty: 2 years","elementos_original":3,"elementos_modificado":3}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.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_FlzhiHdcAk58flBlC1AcA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two text versions line-by-line or word-by-word, returning similarity percentage, added/removed counts, a list of changes with positions, and a unified diff.","exampleAgentPrompt":"Compare these two contract versions line by line and tell me the similarity percentage, what lines were added or removed, and show me the unified diff with 3 lines of context.","exampleUseCases":[{"title":"Contract version change audit","prompt":"I have two versions of a vendor contract — compare them line by line and tell me exactly what changed, where each change is, and how similar the two versions are overall."},{"title":"Prompt template diff review","prompt":"Here are my original and updated AI prompt templates — do a word-by-word comparison and show me what was added, what was removed, and the unified diff so I can review the edits."},{"title":"Scraped page change detection","prompt":"I scraped this webpage yesterday and again today — compare the two versions line by line and tell me what's different, including a similarity percentage and a unified diff with 2 lines of context."}],"resultDescription":"A JSON object containing: the comparison mode used (lines or words), whether the texts are identical, similarity percentage (parecido_pct), count of added and removed elements, total element counts for each text, a list of changes each with type (added/removed/changed), before/after values, and positions in both originals, plus a unified diff string.","failureModes":["Missing required fields (original or modificado) returns a validation error","Very large texts may time out or hit payload limits","Invalid mode enum value (not 'lineas' or 'palabras') causes schema rejection","Non-string body values cause type errors","contexto out of range 0-10 may cause unexpected behavior"],"whenToPreferThis":"Use this endpoint when you need a structured, machine-readable diff between two text versions — especially when you need both a human-readable unified diff AND programmatic change data (positions, counts, similarity score) in one call. Prefer it over generic diff tools when you need the similarity percentage and per-change position metadata, or when comparing contracts, prompts, configs, or scraped pages in an automated agent workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T07:12:48.664Z","isFirstParty":false,"canonicalSlug":"vextorium-text-diff-api-efe9073e"}