Search claims
curl --request POST \
--url https://api.example.com/api/claims/search \
--header 'Content-Type: application/json' \
--data '
{
"query_text": "<string>",
"top_k": 123,
"min_similarity": 123
}
'import requests
url = "https://api.example.com/api/claims/search"
payload = {
"query_text": "<string>",
"top_k": 123,
"min_similarity": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({query_text: '<string>', top_k: 123, min_similarity: 123})
};
fetch('https://api.example.com/api/claims/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/claims/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query_text' => '<string>',
'top_k' => 123,
'min_similarity' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/claims/search"
payload := strings.NewReader("{\n \"query_text\": \"<string>\",\n \"top_k\": 123,\n \"min_similarity\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/claims/search")
.header("Content-Type", "application/json")
.body("{\n \"query_text\": \"<string>\",\n \"top_k\": 123,\n \"min_similarity\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/claims/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query_text\": \"<string>\",\n \"top_k\": 123,\n \"min_similarity\": 123\n}"
response = http.request(request)
puts response.read_bodyClaims & semantic memory
Search claims
Semantic search over extracted claims — find soft facts like user preferences and intent.
POST
/
api
/
claims
/
search
Search claims
curl --request POST \
--url https://api.example.com/api/claims/search \
--header 'Content-Type: application/json' \
--data '
{
"query_text": "<string>",
"top_k": 123,
"min_similarity": 123
}
'import requests
url = "https://api.example.com/api/claims/search"
payload = {
"query_text": "<string>",
"top_k": 123,
"min_similarity": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({query_text: '<string>', top_k: 123, min_similarity: 123})
};
fetch('https://api.example.com/api/claims/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/claims/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query_text' => '<string>',
'top_k' => 123,
'min_similarity' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/claims/search"
payload := strings.NewReader("{\n \"query_text\": \"<string>\",\n \"top_k\": 123,\n \"min_similarity\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/claims/search")
.header("Content-Type", "application/json")
.body("{\n \"query_text\": \"<string>\",\n \"top_k\": 123,\n \"min_similarity\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/claims/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query_text\": \"<string>\",\n \"top_k\": 123,\n \"min_similarity\": 123\n}"
response = http.request(request)
puts response.read_bodyUse this endpoint for fuzzy, concept-based queries like “What are the user’s favorite genres?” or “Has the user complained before?”
Request body
string
required
Natural language query. Keep it conversational — don’t include IDs.
integer
default:"10"
Number of results to return.
number
default:"0.7"
Minimum similarity threshold (
0.0–1.0).Example request
{
"query_text": "What are the user's favorite genres?",
"top_k": 3,
"min_similarity": 0.7
}
Response
Returns an array ofClaimResponse objects with the similarity field populated.
[
{
"claim_id": 42,
"claim_text": "User prefers Sci-Fi movies",
"confidence": 0.92,
"source_event_id": 123456789012345678901234567890,
"similarity": 0.89,
"evidence_spans": [
{
"start_offset": 15,
"end_offset": 45,
"text_snippet": "I really love Sci-Fi movies"
}
],
"support_count": 3,
"status": "Active",
"created_at": 1738425600000000000,
"last_accessed": 1738512000000000000
}
]
Keep the
query_text natural. Don’t include IDs in the string — filter the results in your application code instead.