{"uid":"cap_Bym9_22VNaAa5yDDZK34V","slug":"text-similarity-scorer-17429ef5","name":"Text Similarity Scorer","description":"Compute similarity between two texts. Returns Jaccard, Dice, cosine and overlap scores for two strings. Use to deduplicate documents, match names or titles, and detect near-identical text.","url":"https://api.kakerapetit.dev/v1/text/similarity","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text_a":{"type":"string","description":"First text to compare."},"text_b":{"type":"string","description":"Second text to compare."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xwI6Mo672XC55fnaUd7BH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes Jaccard, Dice, cosine, and overlap similarity scores between two input strings for deduplication, name matching, and near-duplicate detection.","exampleAgentPrompt":"Can you tell me how similar these two product titles are — 'Apple iPhone 14 Pro Max 256GB Deep Purple' and 'iPhone 14 Pro Max 256GB Deep Purple Unlocked' — and give me the Jaccard, Dice, cosine, and overlap scores?","exampleUseCases":[{"title":"Deduplicating customer records by name","prompt":"I have two customer names that might be the same person: 'Jonathan P. Smith' and 'Jon Smith'. Can you compare them and give me similarity scores so I know if they're duplicates?"},{"title":"Detecting near-identical product descriptions","prompt":"Check how similar these two product descriptions are for me: 'Wireless noise-cancelling over-ear headphones with 30h battery' and 'Over-ear wireless headphones, noise cancellation, 30-hour battery life' — I want all four similarity scores."},{"title":"Plagiarism check between two submissions","prompt":"Can you compare these two essay excerpts and tell me how similar they are? First: 'The industrial revolution transformed society by mechanizing labor.' Second: 'Society was transformed by the industrial revolution through the mechanization of labor.' Give me the Jaccard, Dice, cosine, and overlap scores."}],"resultDescription":"Returns four numeric similarity scores between 0 and 1 for the two input strings: Jaccard (intersection over union of token sets), Dice (harmonic overlap of token sets), cosine (vector angle similarity), and overlap (intersection over the smaller set). Higher values indicate greater similarity.","failureModes":["Missing text_a or text_b field returns a 400 validation error","Empty string inputs may produce undefined or zero scores","Very long strings may increase latency or hit payload limits","Non-UTF-8 or binary input may cause parsing errors","Payment failure (402) if USDC balance is insufficient"],"whenToPreferThis":"Choose this endpoint when you need multi-metric text similarity in a single call — especially when you want complementary perspectives (set-based Jaccard/Dice, vector-based cosine, and overlap) rather than a single score. Ideal for lightweight deduplication, fuzzy name matching, and near-duplicate detection on short-to-medium texts without needing a full embedding model pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:39:15.027Z","isFirstParty":false}