Search documents and content
curl --request POST \
--url https://sacra.com/api/v1/search/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"limit": 10,
"offset": 0,
"date_gte": "<string>",
"date_lte": "<string>"
}
'import requests
url = "https://sacra.com/api/v1/search/"
payload = {
"query": "<string>",
"limit": 10,
"offset": 0,
"date_gte": "<string>",
"date_lte": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
limit: 10,
offset: 0,
date_gte: '<string>',
date_lte: '<string>'
})
};
fetch('https://sacra.com/api/v1/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://sacra.com/api/v1/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' => '<string>',
'limit' => 10,
'offset' => 0,
'date_gte' => '<string>',
'date_lte' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://sacra.com/api/v1/search/"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"offset\": 0,\n \"date_gte\": \"<string>\",\n \"date_lte\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://sacra.com/api/v1/search/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"offset\": 0,\n \"date_gte\": \"<string>\",\n \"date_lte\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sacra.com/api/v1/search/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"offset\": 0,\n \"date_gte\": \"<string>\",\n \"date_lte\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"query": "kraken revenue",
"total_results": 125,
"page": 0,
"per_page": 10,
"results": [
{
"document_id": "kraken-at-1-5b-up-128-yoy",
"type": "document",
"title": "Kraken at $1.5B up 128% YoY",
"excerpt": "After the crypto decline in 2022-2023, Kraken posted a Sacra-estimated $1.5B in revenue for 2024...",
"url": "/research/kraken-at-1-5b-up-128-yoy",
"date": "2025-03-06T00:00:00-05:00",
"highlight": {
"title": "<em>Kraken</em> at $1.5B up 128% YoY",
"content": "After the crypto decline, <em>Kraken</em> posted a Sacra-estimated $1.5B in <em>revenue</em>..."
}
},
{
"document_id": "kraken",
"type": "company",
"title": "Kraken",
"excerpt": "",
"url": "/kraken",
"date": "2026-02-09T00:00:00-05:00",
"highlight": {
"title": "<em>Kraken</em>"
}
}
]
}"Invalid JSON in request body.""Overall search processing error: connection timeout"Documents
Search documents and content
Performs a full-text search across document and explore indices, returning a unified, paginated list of results.
How pagination works:
- Results from the document index are returned first
- Once exhausted, results from the explore index follow
- Use
offsetandlimitto page through the combined set
Date filters are supported via date_gte and date_lte.
POST
/
api
/
v1
/
search
/
Search documents and content
curl --request POST \
--url https://sacra.com/api/v1/search/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"limit": 10,
"offset": 0,
"date_gte": "<string>",
"date_lte": "<string>"
}
'import requests
url = "https://sacra.com/api/v1/search/"
payload = {
"query": "<string>",
"limit": 10,
"offset": 0,
"date_gte": "<string>",
"date_lte": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
limit: 10,
offset: 0,
date_gte: '<string>',
date_lte: '<string>'
})
};
fetch('https://sacra.com/api/v1/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://sacra.com/api/v1/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' => '<string>',
'limit' => 10,
'offset' => 0,
'date_gte' => '<string>',
'date_lte' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://sacra.com/api/v1/search/"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"offset\": 0,\n \"date_gte\": \"<string>\",\n \"date_lte\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://sacra.com/api/v1/search/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"offset\": 0,\n \"date_gte\": \"<string>\",\n \"date_lte\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sacra.com/api/v1/search/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"limit\": 10,\n \"offset\": 0,\n \"date_gte\": \"<string>\",\n \"date_lte\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"query": "kraken revenue",
"total_results": 125,
"page": 0,
"per_page": 10,
"results": [
{
"document_id": "kraken-at-1-5b-up-128-yoy",
"type": "document",
"title": "Kraken at $1.5B up 128% YoY",
"excerpt": "After the crypto decline in 2022-2023, Kraken posted a Sacra-estimated $1.5B in revenue for 2024...",
"url": "/research/kraken-at-1-5b-up-128-yoy",
"date": "2025-03-06T00:00:00-05:00",
"highlight": {
"title": "<em>Kraken</em> at $1.5B up 128% YoY",
"content": "After the crypto decline, <em>Kraken</em> posted a Sacra-estimated $1.5B in <em>revenue</em>..."
}
},
{
"document_id": "kraken",
"type": "company",
"title": "Kraken",
"excerpt": "",
"url": "/kraken",
"date": "2026-02-09T00:00:00-05:00",
"highlight": {
"title": "<em>Kraken</em>"
}
}
]
}"Invalid JSON in request body.""Overall search processing error: connection timeout"Authorizations
Authenticate using one of two formats:
- Organization/user token:
Token <your-token> - Stytch JWT:
Bearer <your-jwt>
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
The search term or question.
Maximum results per page (default 10, max 50).
Number of results to skip for pagination.
Inclusive ISO date/datetime lower bound for result dates (e.g. 2025-01-01).
Inclusive ISO date/datetime upper bound for result dates (e.g. 2025-12-31).
⌘I