Encontrar correspondências exatas de hash público
curl --request GET \
--url https://api.truthlocks.com/v1/consumer/similarity \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.truthlocks.com/v1/consumer/similarity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/similarity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/consumer/similarity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"content_hash": "<string>",
"exact_match": true,
"total": 123,
"matches": [
{
"attestation_id": "<string>",
"title": "<string>",
"category": "<string>",
"similarity_score": 1,
"protected_at": "2023-11-07T05:31:56Z"
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Consumidor (B2C)
Verificação de similaridade de conteúdo
Verifique se um hash de conteúdo já possui proteções públicas existentes.
GET
/
v1
/
consumer
/
similarity
Encontrar correspondências exatas de hash público
curl --request GET \
--url https://api.truthlocks.com/v1/consumer/similarity \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.truthlocks.com/v1/consumer/similarity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/similarity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/consumer/similarity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"content_hash": "<string>",
"exact_match": true,
"total": 123,
"matches": [
{
"attestation_id": "<string>",
"title": "<string>",
"category": "<string>",
"similarity_score": 1,
"protected_at": "2023-11-07T05:31:56Z"
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}GET
Verifique se um hash de conteúdo SHA-256 já possui proteções públicas. Isso detecta correspondências exatas de hash público; não realiza análise de similaridade perceptual ou semântica nem estabelece propriedade de direitos autorais.
Envie uma sessão autenticada usando a autorização mostrada em Try It. As proteções pertencentes ao seu espaço de trabalho são excluídas. O parâmetro de consulta /v1/consumer/similarityhash obrigatório é o resumo SHA-256 que você deseja comparar.
Apenas as proteções com visibility: "public" são pesquisadas. As proteções privadas nunca são devolvidas.
Respostas
Campos de resposta
| Campo | Tipo | Descrição |
|---|---|---|
content_hash | string | O hash que você enviou, repetido para confirmação. |
exact_match | boolean | true se existir pelo menos uma proteção pública para este hash. |
matches | array | Até 10 proteções correspondentes, ordenadas por data de criação. |
matches[].attestation_id | string | ID de atestado da proteção correspondente. |
matches[].title | string | Título da proteção correspondente. |
matches[].category | string | Categoria de conteúdo (por exemplo, photography, code, design). |
matches[].similarity_score | number | Sempre 1.0 para correspondências exatas de hash. |
matches[].protected_at | string | Carimbo de data/hora ISO 8601 de quando o conteúdo foi protegido. |
total | integer | Número de correspondências retornadas, não um total ilimitado. |

