curl --request POST \
--url https://hiimpria.ai/api/user/files/search-content \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"query": "quantum gravity",
"selectedUploadIds": [
"<string>"
],
"minScore": 0.1,
"limit": 50
}
'import requests
url = "https://hiimpria.ai/api/user/files/search-content"
payload = {
"query": "quantum gravity",
"selectedUploadIds": ["<string>"],
"minScore": 0.1,
"limit": 50
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'quantum gravity',
selectedUploadIds: ['<string>'],
minScore: 0.1,
limit: 50
})
};
fetch('https://hiimpria.ai/api/user/files/search-content', 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://hiimpria.ai/api/user/files/search-content",
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' => 'quantum gravity',
'selectedUploadIds' => [
'<string>'
],
'minScore' => 0.1,
'limit' => 50
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://hiimpria.ai/api/user/files/search-content"
payload := strings.NewReader("{\n \"query\": \"quantum gravity\",\n \"selectedUploadIds\": [\n \"<string>\"\n ],\n \"minScore\": 0.1,\n \"limit\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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://hiimpria.ai/api/user/files/search-content")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"quantum gravity\",\n \"selectedUploadIds\": [\n \"<string>\"\n ],\n \"minScore\": 0.1,\n \"limit\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/files/search-content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"quantum gravity\",\n \"selectedUploadIds\": [\n \"<string>\"\n ],\n \"minScore\": 0.1,\n \"limit\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"query": "quantum gravity",
"results": [
{
"uploadId": "<string>",
"chunkId": "<string>",
"chunkIndex": 123,
"snippet": "<string>",
"content": "<string>",
"matchedEntities": [
"<string>"
],
"trace": [
{
"list": "dense",
"rank": 123
}
],
"score": 123,
"source": "rag",
"upload": {
"_id": "<string>",
"originalname": "<string>",
"filesize": 123,
"mimetype": "<string>",
"file_title": "<string>",
"institution": "<string>",
"account_shared": true,
"is_private": true,
"confidential": true
}
}
],
"totalScanned": 123,
"uploadCount": 123,
"tookMs": 123,
"searchPerf": {
"legs": {
"dense": {
"count": 123,
"ms": 123,
"enabled": true
},
"graph": {
"count": 123,
"ms": 123,
"enabled": true
},
"lexical": {
"count": 123,
"ms": 123,
"enabled": true
}
},
"fused": 123,
"totalMs": 123,
"k": 123
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Too many content searches. Try again in a moment."
}Search file content via RAG-KAG and return scored snippets
Scored-chunk content search across the user’s eligible IP Vault
(personal + current institution + account-shared siblings). Returns
~200-char snippets centered on matched tokens, with a relevance score
per chunk and a rag | kag | fused source label. Confidential
institution files surface a 🔒 placeholder snippet rather than raw
chunk text. selectedUploadIds is optional — when provided, it
intersects with the user’s scope; foreign or malformed ids are
silently dropped (never 403). Rate-limited per user (default 20/min).
Results now include KAG graph matches when KAG is enabled for a vault in
scope, and each result carries the full content plus KAG evidence
(matchedEntities, trace) for inline expansion.
curl --request POST \
--url https://hiimpria.ai/api/user/files/search-content \
--header 'Content-Type: application/json' \
--header 'x-access-token: <api-key>' \
--data '
{
"query": "quantum gravity",
"selectedUploadIds": [
"<string>"
],
"minScore": 0.1,
"limit": 50
}
'import requests
url = "https://hiimpria.ai/api/user/files/search-content"
payload = {
"query": "quantum gravity",
"selectedUploadIds": ["<string>"],
"minScore": 0.1,
"limit": 50
}
headers = {
"x-access-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'quantum gravity',
selectedUploadIds: ['<string>'],
minScore: 0.1,
limit: 50
})
};
fetch('https://hiimpria.ai/api/user/files/search-content', 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://hiimpria.ai/api/user/files/search-content",
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' => 'quantum gravity',
'selectedUploadIds' => [
'<string>'
],
'minScore' => 0.1,
'limit' => 50
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-access-token: <api-key>"
],
]);
$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://hiimpria.ai/api/user/files/search-content"
payload := strings.NewReader("{\n \"query\": \"quantum gravity\",\n \"selectedUploadIds\": [\n \"<string>\"\n ],\n \"minScore\": 0.1,\n \"limit\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-access-token", "<api-key>")
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://hiimpria.ai/api/user/files/search-content")
.header("x-access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"quantum gravity\",\n \"selectedUploadIds\": [\n \"<string>\"\n ],\n \"minScore\": 0.1,\n \"limit\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/user/files/search-content")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"quantum gravity\",\n \"selectedUploadIds\": [\n \"<string>\"\n ],\n \"minScore\": 0.1,\n \"limit\": 50\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"query": "quantum gravity",
"results": [
{
"uploadId": "<string>",
"chunkId": "<string>",
"chunkIndex": 123,
"snippet": "<string>",
"content": "<string>",
"matchedEntities": [
"<string>"
],
"trace": [
{
"list": "dense",
"rank": 123
}
],
"score": 123,
"source": "rag",
"upload": {
"_id": "<string>",
"originalname": "<string>",
"filesize": 123,
"mimetype": "<string>",
"file_title": "<string>",
"institution": "<string>",
"account_shared": true,
"is_private": true,
"confidential": true
}
}
],
"totalScanned": 123,
"uploadCount": 123,
"tookMs": 123,
"searchPerf": {
"legs": {
"dense": {
"count": 123,
"ms": 123,
"enabled": true
},
"graph": {
"count": 123,
"ms": 123,
"enabled": true
},
"lexical": {
"count": 123,
"ms": 123,
"enabled": true
}
},
"fused": 123,
"totalMs": 123,
"k": 123
}
}{
"success": false,
"message": "<string>"
}{
"success": false,
"message": "Authentication Required"
}{
"success": false,
"message": "Too many content searches. Try again in a moment."
}Body
Response
Content-search results
Was this page helpful?