Search document chunks
curl --request POST \
--url https://rest-api.captide.co/api/v2/rag/chunks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"documentIds": "<string>"
}
'import requests
url = "https://rest-api.captide.co/api/v2/rag/chunks"
payload = {
"query": "<string>",
"documentIds": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', documentIds: '<string>'})
};
fetch('https://rest-api.captide.co/api/v2/rag/chunks', 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://rest-api.captide.co/api/v2/rag/chunks",
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>',
'documentIds' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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://rest-api.captide.co/api/v2/rag/chunks"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"documentIds\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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://rest-api.captide.co/api/v2/rag/chunks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"documentIds\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest-api.captide.co/api/v2/rag/chunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"documentIds\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"relevantChunks": [
{
"content": "please join us at our upcoming Investor Day on October 6 in New York City. I want to thank our employees, customers and\npartners for their continued support. With that, operator, you may now open the call for questions. …",
"pageNumber": 5,
"documentMetadata": {
"id": "a0dcd3e7-7985-4fbc-9c77-371b4232e242",
"title": "Zscaler, Inc. Earnings Call Transcript Q4 2026 (2026-09-03)",
"documentCategory": "earnings-call-transcript",
"date": "2026-09-03",
"fiscalQuarter": 4,
"fiscalYear": 2026,
"companyName": "Zscaler, Inc.",
"companyTickers": [
"ZS"
]
}
}
]
}Agentic RAG
Chunk Retrieval
Find the passages in corporate disclosures that answer a natural-language question, without generating an answer.
Captide works out which companies and documents the question is about, then returns the most relevant chunks of text, each with its page number and source document. Use it to give your own LLM grounded context, or to combine Captide content with other sources.
To search specific documents only, pass their IDs in documentIds.
POST
/
api
/
v2
/
rag
/
chunks
Search document chunks
curl --request POST \
--url https://rest-api.captide.co/api/v2/rag/chunks \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>",
"documentIds": "<string>"
}
'import requests
url = "https://rest-api.captide.co/api/v2/rag/chunks"
payload = {
"query": "<string>",
"documentIds": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', documentIds: '<string>'})
};
fetch('https://rest-api.captide.co/api/v2/rag/chunks', 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://rest-api.captide.co/api/v2/rag/chunks",
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>',
'documentIds' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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://rest-api.captide.co/api/v2/rag/chunks"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"documentIds\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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://rest-api.captide.co/api/v2/rag/chunks")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"documentIds\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest-api.captide.co/api/v2/rag/chunks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"documentIds\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"relevantChunks": [
{
"content": "please join us at our upcoming Investor Day on October 6 in New York City. I want to thank our employees, customers and\npartners for their continued support. With that, operator, you may now open the call for questions. …",
"pageNumber": 5,
"documentMetadata": {
"id": "a0dcd3e7-7985-4fbc-9c77-371b4232e242",
"title": "Zscaler, Inc. Earnings Call Transcript Q4 2026 (2026-09-03)",
"documentCategory": "earnings-call-transcript",
"date": "2026-09-03",
"fiscalQuarter": 4,
"fiscalYear": 2026,
"companyName": "Zscaler, Inc.",
"companyTickers": [
"ZS"
]
}
}
]
}Body
application/json
Was this page helpful?