Get Session Intelligence
curl --request GET \
--url https://api.dappier.com/v1/analytics/session-intelligence \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dappier.com/v1/analytics/session-intelligence"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dappier.com/v1/analytics/session-intelligence', 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.dappier.com/v1/analytics/session-intelligence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dappier.com/v1/analytics/session-intelligence"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dappier.com/v1/analytics/session-intelligence")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dappier.com/v1/analytics/session-intelligence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session_intelligence": {
"summary": {
"total_engaged_sessions": 110,
"total_queries": 187,
"average_queries_per_session": 1.7,
"sessions_with_2_plus_queries": 40,
"sessions_with_2_plus_queries_percentage": 36,
"single_query_sessions": 70,
"single_query_sessions_percentage": 64,
"max_queries_in_session": 4
},
"engagement_time": {
"total_session_time_seconds": 3170,
"average_engagement_time_per_session_seconds": 288,
"median_engagement_time_per_session_seconds": 164
},
"intent_breakdown": [
{
"intent_type": "informational",
"label": "Informational",
"sessions": 98,
"percentage": 89
}
],
"top_queried_topics": [
{
"query": "the iht loophole the wealthy don't talk about",
"category": "Business and Finance",
"count": 4
}
],
"category_distribution": [
{
"category": "Personal Finance",
"count": 42,
"percentage": 27
}
],
"session_engagement_distribution": [
{
"query_depth": "1",
"sessions": 70,
"percentage": 64
}
]
}
}{
"message": "end_date must be on or after start_date"
}{
"message": "end_date must be on or after start_date"
}{
"message": "end_date must be on or after start_date"
}{
"message": "rate limit exceeded"
}Analytics APIs
Session Intelligence
Single aggregated payload describing how end users interact with a publisher’s Ask AI widgets — summary KPIs, engagement time, intent breakdown, top queried topics, content-category mix, and session-engagement (query-depth) distribution. Powers the marketplace Session Intelligence dashboard in one request. Numbers match the Dappier platform dashboard for the same filters.
GET
/
v1
/
analytics
/
session-intelligence
Get Session Intelligence
curl --request GET \
--url https://api.dappier.com/v1/analytics/session-intelligence \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dappier.com/v1/analytics/session-intelligence"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dappier.com/v1/analytics/session-intelligence', 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.dappier.com/v1/analytics/session-intelligence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dappier.com/v1/analytics/session-intelligence"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dappier.com/v1/analytics/session-intelligence")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dappier.com/v1/analytics/session-intelligence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"session_intelligence": {
"summary": {
"total_engaged_sessions": 110,
"total_queries": 187,
"average_queries_per_session": 1.7,
"sessions_with_2_plus_queries": 40,
"sessions_with_2_plus_queries_percentage": 36,
"single_query_sessions": 70,
"single_query_sessions_percentage": 64,
"max_queries_in_session": 4
},
"engagement_time": {
"total_session_time_seconds": 3170,
"average_engagement_time_per_session_seconds": 288,
"median_engagement_time_per_session_seconds": 164
},
"intent_breakdown": [
{
"intent_type": "informational",
"label": "Informational",
"sessions": 98,
"percentage": 89
}
],
"top_queried_topics": [
{
"query": "the iht loophole the wealthy don't talk about",
"category": "Business and Finance",
"count": 4
}
],
"category_distribution": [
{
"category": "Personal Finance",
"count": 42,
"percentage": 27
}
],
"session_engagement_distribution": [
{
"query_depth": "1",
"sessions": 70,
"percentage": 64
}
]
}
}{
"message": "end_date must be on or after start_date"
}{
"message": "end_date must be on or after start_date"
}{
"message": "end_date must be on or after start_date"
}{
"message": "rate limit exceeded"
}Data is sourced from BigQuery — expect a 5–15 minute lag for the most recent events. All dates and timestamps are UTC. Responses are tenant-scoped to the API key and are rate limited (default 60 requests/minute per key;
X-RateLimit-* headers are returned, 429 with Retry-After when exceeded) and cached server-side for up to 30 minutes (send Cache-Control: no-cache to skip the cache read; the X-Cache response header reports HIT, MISS, BYPASS, or DISABLED).Returns a single aggregated payload that powers the marketplace Session Intelligence dashboard — session-engagement distribution, engagement time, intent breakdown, top queried topics, and content-category mix — in one request. Numbers match the Dappier platform analytics dashboard for the same filters.
If either
start_date or end_date is omitted, both default to the trailing 7-day window ending today UTC. Explicit ranges must be ≤ 365 days. widget_id is validated against the key’s tenant — an unknown or other-tenant id returns 400 widget_id not found. The seven query-depth buckets ("1", "2", "3", "4", "5", "6-10", "10+") are always returned in session_engagement_distribution, even when empty.Authorizations
Bearer token authentication using your Dappier API key. Get your API key at https://platform.dappier.com/profile/api-keys.

