Query
curl --request POST \
--url https://api.opennous.cloud/v2/query \
--header 'Content-Type: application/json' \
--data '
{
"scope": {
"kind": "<string>",
"property": "<string>",
"source": "<string>",
"entity_id": "<string>",
"since_days": 123,
"limit": 123
},
"without": {},
"return": "<string>",
"question": "<string>",
"budget_tokens": 123
}
'import requests
url = "https://api.opennous.cloud/v2/query"
payload = {
"scope": {
"kind": "<string>",
"property": "<string>",
"source": "<string>",
"entity_id": "<string>",
"since_days": 123,
"limit": 123
},
"without": {},
"return": "<string>",
"question": "<string>",
"budget_tokens": 123
}
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({
scope: {
kind: '<string>',
property: '<string>',
source: '<string>',
entity_id: '<string>',
since_days: 123,
limit: 123
},
without: {},
return: '<string>',
question: '<string>',
budget_tokens: 123
})
};
fetch('https://api.opennous.cloud/v2/query', 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.opennous.cloud/v2/query",
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([
'scope' => [
'kind' => '<string>',
'property' => '<string>',
'source' => '<string>',
'entity_id' => '<string>',
'since_days' => 123,
'limit' => 123
],
'without' => [
],
'return' => '<string>',
'question' => '<string>',
'budget_tokens' => 123
]),
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.opennous.cloud/v2/query"
payload := strings.NewReader("{\n \"scope\": {\n \"kind\": \"<string>\",\n \"property\": \"<string>\",\n \"source\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"since_days\": 123,\n \"limit\": 123\n },\n \"without\": {},\n \"return\": \"<string>\",\n \"question\": \"<string>\",\n \"budget_tokens\": 123\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.opennous.cloud/v2/query")
.header("Content-Type", "application/json")
.body("{\n \"scope\": {\n \"kind\": \"<string>\",\n \"property\": \"<string>\",\n \"source\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"since_days\": 123,\n \"limit\": 123\n },\n \"without\": {},\n \"return\": \"<string>\",\n \"question\": \"<string>\",\n \"budget_tokens\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opennous.cloud/v2/query")
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 \"scope\": {\n \"kind\": \"<string>\",\n \"property\": \"<string>\",\n \"source\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"since_days\": 123,\n \"limit\": 123\n },\n \"without\": {},\n \"return\": \"<string>\",\n \"question\": \"<string>\",\n \"budget_tokens\": 123\n}"
response = http.request(request)
puts response.read_bodySearch
Query
Retrieve + summarise observations across many entities. Three powers — group by entity, subtract a set, roll up by value — answer ‘hottest leads’, ‘no reply in 5d’, ‘funnel by stage’ without new endpoints.
POST
/
v2
/
query
Query
curl --request POST \
--url https://api.opennous.cloud/v2/query \
--header 'Content-Type: application/json' \
--data '
{
"scope": {
"kind": "<string>",
"property": "<string>",
"source": "<string>",
"entity_id": "<string>",
"since_days": 123,
"limit": 123
},
"without": {},
"return": "<string>",
"question": "<string>",
"budget_tokens": 123
}
'import requests
url = "https://api.opennous.cloud/v2/query"
payload = {
"scope": {
"kind": "<string>",
"property": "<string>",
"source": "<string>",
"entity_id": "<string>",
"since_days": 123,
"limit": 123
},
"without": {},
"return": "<string>",
"question": "<string>",
"budget_tokens": 123
}
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({
scope: {
kind: '<string>',
property: '<string>',
source: '<string>',
entity_id: '<string>',
since_days: 123,
limit: 123
},
without: {},
return: '<string>',
question: '<string>',
budget_tokens: 123
})
};
fetch('https://api.opennous.cloud/v2/query', 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.opennous.cloud/v2/query",
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([
'scope' => [
'kind' => '<string>',
'property' => '<string>',
'source' => '<string>',
'entity_id' => '<string>',
'since_days' => 123,
'limit' => 123
],
'without' => [
],
'return' => '<string>',
'question' => '<string>',
'budget_tokens' => 123
]),
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.opennous.cloud/v2/query"
payload := strings.NewReader("{\n \"scope\": {\n \"kind\": \"<string>\",\n \"property\": \"<string>\",\n \"source\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"since_days\": 123,\n \"limit\": 123\n },\n \"without\": {},\n \"return\": \"<string>\",\n \"question\": \"<string>\",\n \"budget_tokens\": 123\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.opennous.cloud/v2/query")
.header("Content-Type", "application/json")
.body("{\n \"scope\": {\n \"kind\": \"<string>\",\n \"property\": \"<string>\",\n \"source\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"since_days\": 123,\n \"limit\": 123\n },\n \"without\": {},\n \"return\": \"<string>\",\n \"question\": \"<string>\",\n \"budget_tokens\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opennous.cloud/v2/query")
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 \"scope\": {\n \"kind\": \"<string>\",\n \"property\": \"<string>\",\n \"source\": \"<string>\",\n \"entity_id\": \"<string>\",\n \"since_days\": 123,\n \"limit\": 123\n },\n \"without\": {},\n \"return\": \"<string>\",\n \"question\": \"<string>\",\n \"budget_tokens\": 123\n}"
response = http.request(request)
puts response.read_bodyWhere
Top 10 entities by most-recent reply.
Entities with any activity in the last 30 days, minus those with any activity in the last 5 days.
Entities you sent to in the last 5 days, minus those who replied in the same window.
Read
/v2/context is one entity, query is many. Pull the last 30 days of email replies, all meetings in a property, every signal from a CRM — and let your agent reason over the corpus.
Three composable powers cover most “find me X” questions without adding endpoints:
return: 'entities'groups results by entity (one row per person/company), ranked by most-recent matching activitywithoutsubtracts a second scope from the first — for set-difference queries like “sent but no reply”rollups.by_valueappears whenscope.kind = 'state'— counts entities by current value (funnel reports)
Request
curl -X POST https://api.opennous.cloud/v2/query \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"scope": {
"kind": "event",
"property": "interaction.email_replied",
"since_days": 7,
"limit": 10
},
"return": "entities",
"question": "Who are the hottest leads this week?"
}'
Body
object
required
Primary filter for the corpus.
object
Optional set-subtract filter — same shape as scope. Entities matching
scope MINUS entities matching without. Use for “did X but not Y” questions.string
default:"observations"
"observations" — one row per observation (the classic shape).
"entities" — one row per entity, ranked by most-recent matching activity. Each row reports its match count + the most-recent matching observation.string
Your analytical question. Echoed back in the response. When set (and
without is not), enables semantic ranking via embeddings.number
Approximate token budget for item summaries.
Response
return: 'observations' (default)
{
"scope": { ... },
"mode": "structured",
"return": "observations",
"matched": 142,
"returned": 50,
"sampled": true,
"items": [
{
"observation_id": "...",
"entity_id": "...",
"entity_name": "Sarah Chen",
"when": "2026-05-21T15:00:00Z",
"type": "interaction.email_replied",
"source": "gmail",
"summary": "Interested but budget waiting on Q3"
}
],
"rollups": {
"by_type": { "interaction.email_replied": 142 },
"by_source": { "gmail": 120, "outlook": 22 }
}
}
return: 'entities'
{
"scope": { ... },
"return": "entities",
"matched": 47,
"returned": 10,
"items": [
{
"entity_id": "a1b2c3d4-...",
"entity_name": "Sarah Chen",
"matches": 4,
"most_recent_at": "2026-05-21T15:00:00Z",
"most_recent_type": "interaction.email_replied",
"most_recent_source": "gmail",
"most_recent_summary": "Interested but budget waiting on Q3"
}
],
"rollups": { ... }
}
rollups.by_value (when scope.kind = 'state')
{
"scope": { "kind": "state", "property": "stage" },
"rollups": {
"by_type": { "stage": 198 },
"by_source": { "hubspot": 162, "agent": 36 },
"by_value": {
"identified": 120,
"aware": 45,
"interested": 22,
"evaluating": 8,
"client": 3
}
}
}
Recipe book
The four most common “find me X” patterns:🔥 Hottest leads — recent replies, grouped
{
"scope": {
"kind": "event",
"property": "interaction.email_replied",
"since_days": 7
},
"return": "entities",
"limit": 10
}
❄️ Cooled in last 5 days — was active, went silent
{
"scope": { "kind": "event", "since_days": 30 },
"without": { "kind": "event", "since_days": 5 },
"return": "entities"
}
📭 Sent without reply in last 5 days
{
"scope": { "kind": "event", "property": "interaction.email_sent", "since_days": 5 },
"without": { "kind": "event", "property": "interaction.email_replied", "since_days": 5 },
"return": "entities"
}
📊 Full funnel report
{
"scope": { "kind": "state", "property": "stage" }
}
rollups.by_value for the stage distribution. Pair with since_days to bound the time window.
Pattern-finding belongs to the agent
The graph retrieves and shapes. Your agent does the reasoning. The four recipes above are the most common; combinescope + without + return + rollups.by_value for anything else.
For your own GTM profile (ICP, pricing, etc.) use /v2/workspace/facts instead — query is for per-entity observations only.