curl --request POST \
--url https://api.verbex.ai/api/v1/vector/search \
--header 'Content-Type: application/json' \
--data '
{
"query": "how long do refunds take",
"knowledge_base_id": "1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01",
"top_k": 5
}
'import requests
url = "https://api.verbex.ai/api/v1/vector/search"
payload = {
"query": "how long do refunds take",
"knowledge_base_id": "1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01",
"top_k": 5
}
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: 'how long do refunds take',
knowledge_base_id: '1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01',
top_k: 5
})
};
fetch('https://api.verbex.ai/api/v1/vector/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.verbex.ai/api/v1/vector/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' => 'how long do refunds take',
'knowledge_base_id' => '1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01',
'top_k' => 5
]),
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.verbex.ai/api/v1/vector/search"
payload := strings.NewReader("{\n \"query\": \"how long do refunds take\",\n \"knowledge_base_id\": \"1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01\",\n \"top_k\": 5\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.verbex.ai/api/v1/vector/search")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"how long do refunds take\",\n \"knowledge_base_id\": \"1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01\",\n \"top_k\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbex.ai/api/v1/vector/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\": \"how long do refunds take\",\n \"knowledge_base_id\": \"1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01\",\n \"top_k\": 5\n}"
response = http.request(request)
puts response.read_body{
"query": "<string>",
"results": []
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Semantic Search
Searches a knowledge base and returns ranked chunks.
The knowledge base is identified by knowledge_base_id in the body rather than in the path. Results are ranked purely on similarity.
Only material whose ingestion has reached ‘completed’ is searchable. If a recently uploaded document does not appear, check its status before assuming a ranking problem, and use the document chunks endpoint to see what was actually indexed.
curl --request POST \
--url https://api.verbex.ai/api/v1/vector/search \
--header 'Content-Type: application/json' \
--data '
{
"query": "how long do refunds take",
"knowledge_base_id": "1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01",
"top_k": 5
}
'import requests
url = "https://api.verbex.ai/api/v1/vector/search"
payload = {
"query": "how long do refunds take",
"knowledge_base_id": "1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01",
"top_k": 5
}
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: 'how long do refunds take',
knowledge_base_id: '1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01',
top_k: 5
})
};
fetch('https://api.verbex.ai/api/v1/vector/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.verbex.ai/api/v1/vector/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' => 'how long do refunds take',
'knowledge_base_id' => '1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01',
'top_k' => 5
]),
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.verbex.ai/api/v1/vector/search"
payload := strings.NewReader("{\n \"query\": \"how long do refunds take\",\n \"knowledge_base_id\": \"1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01\",\n \"top_k\": 5\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.verbex.ai/api/v1/vector/search")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"how long do refunds take\",\n \"knowledge_base_id\": \"1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01\",\n \"top_k\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.verbex.ai/api/v1/vector/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\": \"how long do refunds take\",\n \"knowledge_base_id\": \"1f0a7c3e-9b2d-4c11-8f5a-2e6d9c4b7a01\",\n \"top_k\": 5\n}"
response = http.request(request)
puts response.read_body{
"query": "<string>",
"results": []
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Body
Request body for semantic search.
Optional metadata filter, passed straight through to the vector backend. Omit it entirely unless you are genuinely filtering: whatever you send becomes a real metadata condition, so leaving an interactive-playground placeholder such as {"additionalProp1": {}} in place will make the search error or silently return nothing. Knowledge-base scoping is applied automatically either way and cannot be bypassed through this field. Only the $eq operator is portable across the supported backends. For example, to match only chunks tagged with a given department, send {"department": {"$eq": "billing"}}.

