Raw Search
curl --request POST \
--url https://cloud.onyx.app/api/search/raw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"sources": [],
"document_sets": [
"<string>"
],
"tags": [
{
"tag_key": "<string>",
"tag_value": "<string>"
}
],
"time_cutoff": "2023-11-07T05:31:56Z",
"persona_id": 123,
"context_chunks": 5
}
'import requests
url = "https://cloud.onyx.app/api/search/raw"
payload = {
"query": "<string>",
"sources": [],
"document_sets": ["<string>"],
"tags": [
{
"tag_key": "<string>",
"tag_value": "<string>"
}
],
"time_cutoff": "2023-11-07T05:31:56Z",
"persona_id": 123,
"context_chunks": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
sources: [],
document_sets: ['<string>'],
tags: [{tag_key: '<string>', tag_value: '<string>'}],
time_cutoff: '2023-11-07T05:31:56Z',
persona_id: 123,
context_chunks: 5
})
};
fetch('https://cloud.onyx.app/api/search/raw', 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://cloud.onyx.app/api/search/raw",
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' => '<string>',
'sources' => [
],
'document_sets' => [
'<string>'
],
'tags' => [
[
'tag_key' => '<string>',
'tag_value' => '<string>'
]
],
'time_cutoff' => '2023-11-07T05:31:56Z',
'persona_id' => 123,
'context_chunks' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://cloud.onyx.app/api/search/raw"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"sources\": [],\n \"document_sets\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"tag_key\": \"<string>\",\n \"tag_value\": \"<string>\"\n }\n ],\n \"time_cutoff\": \"2023-11-07T05:31:56Z\",\n \"persona_id\": 123,\n \"context_chunks\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://cloud.onyx.app/api/search/raw")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"sources\": [],\n \"document_sets\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"tag_key\": \"<string>\",\n \"tag_value\": \"<string>\"\n }\n ],\n \"time_cutoff\": \"2023-11-07T05:31:56Z\",\n \"persona_id\": 123,\n \"context_chunks\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.onyx.app/api/search/raw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"sources\": [],\n \"document_sets\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"tag_key\": \"<string>\",\n \"tag_value\": \"<string>\"\n }\n ],\n \"time_cutoff\": \"2023-11-07T05:31:56Z\",\n \"persona_id\": 123,\n \"context_chunks\": 5\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"citation_id": 123,
"title": "<string>",
"content": "<string>",
"link": "<string>",
"source_type": "<string>",
"updated_at": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Search
Raw Search
Search the Onyx index with no LLM calls and get back document sections.
Runs hybrid retrieval on the query as written, with no query expansion,
filter detection, federated Slack search or LLM document selection. Returns
up to 10 sections in retrieval order, each with up to context_chunks
neighboring chunks on each side. Results are always filtered by the calling
user’s document permissions.
POST
/
search
/
raw
Raw Search
curl --request POST \
--url https://cloud.onyx.app/api/search/raw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"sources": [],
"document_sets": [
"<string>"
],
"tags": [
{
"tag_key": "<string>",
"tag_value": "<string>"
}
],
"time_cutoff": "2023-11-07T05:31:56Z",
"persona_id": 123,
"context_chunks": 5
}
'import requests
url = "https://cloud.onyx.app/api/search/raw"
payload = {
"query": "<string>",
"sources": [],
"document_sets": ["<string>"],
"tags": [
{
"tag_key": "<string>",
"tag_value": "<string>"
}
],
"time_cutoff": "2023-11-07T05:31:56Z",
"persona_id": 123,
"context_chunks": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
sources: [],
document_sets: ['<string>'],
tags: [{tag_key: '<string>', tag_value: '<string>'}],
time_cutoff: '2023-11-07T05:31:56Z',
persona_id: 123,
context_chunks: 5
})
};
fetch('https://cloud.onyx.app/api/search/raw', 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://cloud.onyx.app/api/search/raw",
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' => '<string>',
'sources' => [
],
'document_sets' => [
'<string>'
],
'tags' => [
[
'tag_key' => '<string>',
'tag_value' => '<string>'
]
],
'time_cutoff' => '2023-11-07T05:31:56Z',
'persona_id' => 123,
'context_chunks' => 5
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://cloud.onyx.app/api/search/raw"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"sources\": [],\n \"document_sets\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"tag_key\": \"<string>\",\n \"tag_value\": \"<string>\"\n }\n ],\n \"time_cutoff\": \"2023-11-07T05:31:56Z\",\n \"persona_id\": 123,\n \"context_chunks\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://cloud.onyx.app/api/search/raw")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"sources\": [],\n \"document_sets\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"tag_key\": \"<string>\",\n \"tag_value\": \"<string>\"\n }\n ],\n \"time_cutoff\": \"2023-11-07T05:31:56Z\",\n \"persona_id\": 123,\n \"context_chunks\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.onyx.app/api/search/raw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"sources\": [],\n \"document_sets\": [\n \"<string>\"\n ],\n \"tags\": [\n {\n \"tag_key\": \"<string>\",\n \"tag_value\": \"<string>\"\n }\n ],\n \"time_cutoff\": \"2023-11-07T05:31:56Z\",\n \"persona_id\": 123,\n \"context_chunks\": 5\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"citation_id": 123,
"title": "<string>",
"content": "<string>",
"link": "<string>",
"source_type": "<string>",
"updated_at": "<string>"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Required permission: Search — Read (
read:search), which basic includes, so any signed-in user has it.
A limited Personal Access Token needs the Search — Read scope.This endpoint returns Onyx’s retrieval results with no LLM calls,
for callers that rank or read the results themselves.
It runs the query as written and returns up to 10 sections in retrieval order.
For query expansion and LLM document selection, use Search instead.
Results are always filtered by the calling user’s document permissions,
so the same query run by two users can return different documents. A search needs a vector database:
deployments running with
DISABLE_VECTOR_DB set (Onyx Lite) answer with 501.Body
application/json
Available options:
ingestion_api, slack, web, google_drive, gmail, github, gitbook, gitlab, guru, bookstack, outline, confluence, jira, slab, productboard, file, coda, canvas, notion, zulip, linear, hubspot, document360, gong, google_sites, zendesk, loopio, box, dropbox, sharepoint, onedrive, teams, outlook, salesforce, discourse, axero, clickup, mediawiki, wikipedia, asana, s3, r2, google_cloud_storage, oci_storage, xenforo, not_applicable, discord, freshdesk, fireflies, zoom, egnyte, airtable, highspot, drupal_wiki, imap, bitbucket, testrail, braintrust, lumapps, youtrack, azure_datalake, mock_connector, user_file, craft_file Was this page helpful?