{"uid":"cap__CIcEBjm4AF818Sz171lS","slug":"text-similarity-scorer-a2be0f0b","name":"Text Similarity Scorer","description":"Similarity of two texts by edit distance, word overlap (Jaccard) and cosine, with a same, similar or different verdict.","url":"https://text-metrics.x402tookit.com/text-similarity?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["a","b"],"properties":{"a":{"type":"string","description":"First text (up to 1500 characters)"},"b":{"type":"string","description":"Second text"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"lengths":{"type":["null","object"],"properties":{"a":{"type":["null","number"]},"b":{"type":["null","number"]}}},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"jaccardWords":{"type":["null","number"]},"editSimilarity":{"type":["null","number"]},"cosineWordCounts":{"type":["null","number"]},"levenshteinDistance":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_KhsBWQP8s47CbWiEyjKzz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two texts using edit distance, Jaccard word overlap, and cosine similarity, returning numeric scores and a same/similar/different verdict.","exampleAgentPrompt":"Can you compare these two paragraphs and tell me how similar they are — I want to know the Jaccard, cosine, and edit distance scores, and whether they count as the same, similar, or different: 'The cat sat on the mat.' vs 'A cat was sitting on a mat.'","exampleUseCases":[{"title":"Plagiarism check for student essays","prompt":"Check if this student submission is too similar to the original source text — compare 'Photosynthesis is the process by which plants use sunlight, water, and carbon dioxide to produce oxygen and energy in the form of sugar.' with 'Plants use sunlight, water, and CO2 to produce sugar and oxygen through photosynthesis.' and give me the similarity scores and a verdict."},{"title":"Deduplication of product descriptions","prompt":"I have two product descriptions I want to check for near-duplication — tell me if 'Premium leather wallet with RFID blocking and 6 card slots, available in black and brown.' and 'RFID-blocking premium leather wallet, 6 card slots, black or brown.' are the same, similar, or different, with all the similarity metrics."},{"title":"Monitoring paraphrased content changes","prompt":"I updated a marketing tagline and want to know how different it is from the old one — compare 'Empowering teams to do their best work, every day.' with 'Helping teams perform at their best, each and every day.' and show me the edit similarity, Jaccard overlap, cosine score, and verdict."}],"resultDescription":"Returns numeric similarity scores including Levenshtein edit similarity (0–1), Jaccard word overlap (0–1), cosine word-count similarity (0–1), the raw Levenshtein distance, character lengths of both inputs, a plain-English summary, a list of reasons supporting the verdict, and a final verdict string of 'same', 'similar', or 'different'. May also include a degraded flag and disclaimer if computation was limited.","failureModes":["Missing required query parameters 'a' or 'b' returns an error","Input text exceeding 1500 characters for field 'a' may be truncated or rejected","Empty string inputs may produce degenerate similarity scores","Very long texts for parameter 'b' may degrade performance or accuracy","Network or upstream service errors returning non-200 responses","Payment failure via x402 protocol preventing request from completing"],"whenToPreferThis":"Choose this endpoint when you need a multi-metric text similarity comparison that combines edit distance, word overlap, and cosine similarity in a single call with a human-readable verdict. It is ideal for duplicate detection, plagiarism checking, paraphrase detection, or content change monitoring where a nuanced score rather than a binary yes/no is needed. Prefer this over single-metric APIs when you want triangulated confidence across three distinct similarity methods.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T07:19:34.897Z","isFirstParty":false,"canonicalSlug":"text-similarity-scorer-a2be0f0b"}