# SimHash Content Fingerprinting & Near-Duplicate Detection

> SimHash Content Fingerprinting & Near-Duplicate Detection is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Computes a 64-bit SimHash fingerprint over token-level k-shingles (default k=3) for near-duplicate content detection, returning hex and decimal forms plus token and shingle counts.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/content-simhash
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-e2c60509
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Zu4lUqRNMYjyPTnSTTOAV

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 x402-deployer-x402-deployer-workers-dev-e2c60509 -d '<json body>'
```

Example prompt: Compute a SimHash fingerprint for this article text using k=3 shingles so I can check it against other documents for near-duplicates: 'Artificial intelligence is transforming the way we work, live, and communicate with each other every day.'

## When to prefer this

Use this endpoint when you need a fast, purely local (no external model calls) 64-bit fuzzy fingerprint for text similarity or deduplication. Prefer it over exact hash functions (MD5/SHA) when you want near-duplicate detection that tolerates minor edits, and over embedding-based similarity when you want a lightweight, deterministic, reproducible signal without LLM costs.

## Known failure modes

- Empty or missing text body — returns error indicating no content to hash
- Extremely short text with fewer tokens than k — may produce degenerate shingle set
- Invalid k value (non-integer or negative) — returns validation error
- Request timeout for very large documents
- Payment not included or insufficient — x402 payment required error

## How this service works

SimHash / 64-bit content fingerprint / near-duplicate detection / dedup hashing / locality-sensitive hash. Pure-local 64-bit SimHash over token-level k-shingles (default k=3) using FNV-1a. Two SimHashes are 'close' (small Hamming distance) iff the underlying texts share many shingles. Returns hex + decimal forms plus token + shingle counts. Useful for content dedup pipelines, plagiarism detection, and bot-content clustering.

## Output

Returns a 64-bit SimHash of the input text in both hex and decimal forms, along with the number of tokens and shingles processed. Two results with a small Hamming distance indicate the underlying texts share many shingles and are likely near-duplicates.

## Example request

```json
{
 "k": 3,
 "text": "Artificial intelligence is transforming the way we work, live, and communicate with each other every day."
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to hash. Up to 500,000 chars."
      },
      "shingle_size": {
       "type": "number",
       "description": "k-gram size for shingles. Range [1, 8]. Default 3."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "source": {
       "type": "string"
      },
      "hash_hex": {
       "type": "string"
      },
      "hash_int": {
       "type": "string"
      },
      "bit_count": {
       "type": "integer"
      },
      "text_chars": {
       "type": "integer"
      },
      "token_count": {
       "type": "integer"
      },
      "shingle_size": {
       "type": "integer"
      },
      "shingle_count": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-e2c60509/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-deployer.x402-deployer.workers.dev](https://www.zero.xyz/host/x402-deployer.x402-deployer.workers.dev/llms.txt)
