# Jaccard Similarity (Character Bigrams)

> Jaccard Similarity (Character Bigrams) is a paid API for AI agents from similarity.openverbs.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Computes the Jaccard similarity index between two strings based on the overlap of their character-bigram sets, returning a score between 0 and 1.

## Facts

- Endpoint: POST https://similarity.openverbs.com/v1/jaccard
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/jaccard-similarity-character-bigrams-492e8b06
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xxq4CxCvGRvAxCiwSVLbt

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability jaccard-similarity-character-bigrams-492e8b06 -d '<json body>'
```

Example prompt: What's the Jaccard character-bigram similarity between 'night' and 'knight'? I need the score between 0 and 1.

## When to prefer this

Choose the Jaccard bigram endpoint when you need a set-based similarity metric that is insensitive to word order and handles minor character-level differences well. It is ideal for near-duplicate detection, deduplication, and fuzzy entity matching where you care about shared character n-gram overlap rather than edit distance. Prefer this over Levenshtein when string length normalization matters less and over Dice when you want strict intersection-over-union semantics. It works well for short to medium-length strings like names, titles, and product labels.

## Known failure modes

- Missing required fields 'a' or 'b' returns a validation error
- Strings exceeding 20,000 characters are rejected
- Empty strings may produce undefined or 0 similarity due to empty bigram sets
- Non-string input types for 'a' or 'b' return schema validation errors
- Network or payment authorization failure returns 402 or 5xx status

## How this service works

Jaccard similarity index in [0,1] — the size of the intersection over the union of the two strings' character-bigram sets.

## Output

A JSON response containing the Jaccard similarity score as a float in the range [0, 1], where 0 means no shared character bigrams and 1 means identical bigram sets. The score is computed as the size of the character-bigram intersection divided by the size of the union of the two input strings' bigram sets.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "properties": {
      "a": {
       "type": "string",
       "maxLength": 20000,
       "description": "First string."
      },
      "b": {
       "type": "string",
       "maxLength": 20000,
       "description": "Second string."
      }
     },
     "required": [
      "a",
      "b"
     ],
     "additionalProperties": false
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/jaccard-similarity-character-bigrams-492e8b06/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from similarity.openverbs.com](https://www.zero.xyz/host/similarity.openverbs.com/llms.txt)
