Skip to main content
GET/v1/consumer/similarity
Check whether a SHA-256 content hash already has public protections. Use this before protecting content to detect exact duplicates and avoid re-protecting content that someone else has already registered. Authentication is optional. When you include an API key, your own protections are excluded from the results so you only see matches from other users. Only protections with visibility: "public" are searched. Private protections are never returned.

Parameters

hash
string
required
SHA-256 hash of the content to check. Must match the hex-encoded hash format used when protecting content.

Responses

{
  "content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "exact_match": true,
  "matches": [
    {
      "attestation_id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "sunset-bigsur.jpg",
      "category": "photography",
      "similarity_score": 1.0,
      "protected_at": "2026-03-12T10:30:00Z",
      "owner_username": "jsmith"
    }
  ],
  "total": 1
}
curl "https://api.truthlocks.com/v1/consumer/similarity?hash=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" \
  -H "X-API-Key: tlk_your_key_here"

Response fields

FieldTypeDescription
content_hashstringThe hash you submitted, echoed back for confirmation.
exact_matchbooleantrue if at least one public protection exists for this hash.
matchesarrayUp to 10 matching protections, ordered by creation date.
matches[].attestation_idstringAttestation ID of the matching protection.
matches[].titlestringTitle of the matching protection.
matches[].categorystringContent category (e.g. photography, code, design).
matches[].similarity_scorenumberAlways 1.0 for exact hash matches.
matches[].protected_atstringISO 8601 timestamp when the content was protected.
matches[].owner_usernamestringPublic username of the protection owner, if set.
totalintegerTotal number of matches found.