curl --request GET \
--url https://api.dappier.com/v1/analytics/ask-ai \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dappier.com/v1/analytics/ask-ai"
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/ask-ai', 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/ask-ai",
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/ask-ai"
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/ask-ai")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dappier.com/v1/analytics/ask-ai")
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{
"success": true,
"filters": {
"start_date": "2026-04-01",
"end_date": "2026-04-30",
"deployment_type": "brand_agent",
"widget_id": "wd_92831",
"placement_id": "<string>",
"creative_id": "cr_123",
"line_item_id": "<string>",
"publisher_id": "<string>"
},
"summary": {
"widget_loads": 124550,
"viewable_sessions": 38122,
"viewability_rate": 30.6,
"engagement_queries": 6421,
"engagement_rate": 16.8,
"total_clicks": 2310,
"article_clicks": 1240,
"cta_clicks": 1070,
"sessions": 5120,
"avg_session_duration_seconds": 142,
"engagement_session_rate": 13.4,
"total_session_time_seconds": 727040,
"query_to_click_rate": 36
},
"daily_breakdown": [
{
"date": "2026-04-28",
"widget_loads": 4211,
"viewable_sessions": 1312,
"engagement_queries": 248,
"total_clicks": 94,
"sessions": 201
}
],
"meta": {
"timezone": "UTC",
"generated_at": "2026-05-11T18:45:00Z"
}
}{
"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"
}Ask AI Analytics
Publisher-facing Ask AI engagement rollup: summary KPIs plus a daily time-series. Numbers match the Dappier platform analytics dashboard for the same filters.
curl --request GET \
--url https://api.dappier.com/v1/analytics/ask-ai \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dappier.com/v1/analytics/ask-ai"
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/ask-ai', 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/ask-ai",
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/ask-ai"
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/ask-ai")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dappier.com/v1/analytics/ask-ai")
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{
"success": true,
"filters": {
"start_date": "2026-04-01",
"end_date": "2026-04-30",
"deployment_type": "brand_agent",
"widget_id": "wd_92831",
"placement_id": "<string>",
"creative_id": "cr_123",
"line_item_id": "<string>",
"publisher_id": "<string>"
},
"summary": {
"widget_loads": 124550,
"viewable_sessions": 38122,
"viewability_rate": 30.6,
"engagement_queries": 6421,
"engagement_rate": 16.8,
"total_clicks": 2310,
"article_clicks": 1240,
"cta_clicks": 1070,
"sessions": 5120,
"avg_session_duration_seconds": 142,
"engagement_session_rate": 13.4,
"total_session_time_seconds": 727040,
"query_to_click_rate": 36
},
"daily_breakdown": [
{
"date": "2026-04-28",
"widget_loads": 4211,
"viewable_sessions": 1312,
"engagement_queries": 248,
"total_clicks": 94,
"sessions": 201
}
],
"meta": {
"timezone": "UTC",
"generated_at": "2026-05-11T18:45:00Z"
}
}{
"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"
}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).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.creative_id / line_item_id / publisher_id match the publisher-supplied values the widget was loaded with. Once a session enters a sponsored conversation these fields are overridden with the matched DSP ad-render IDs, so filtering by your own publisher macros excludes most sponsored-conversation events. For sponsored conversion data use the Sponsored Conversations Analytics endpoint instead.Authorizations
Bearer token authentication using your Dappier API key. Get your API key at https://platform.dappier.com/profile/api-keys.
Query Parameters
Inclusive start of the analytics window, formatted YYYY-MM-DD (UTC). Optional — if either start_date or end_date is omitted, both default to the trailing 7-day window ending today_UTC (i.e., start_date = today_UTC - 6).
"2026-04-01"
Inclusive end of the analytics window, formatted YYYY-MM-DD (UTC). Optional — if either start_date or end_date is omitted, both default to the trailing 7-day window ending today_UTC. Must be on or after start_date; the total range must be ≤ 365 days.
"2026-04-30"
External widget id (e.g. wd_...). Validated against the key's tenant — an unknown or other-tenant id returns 400 widget_id not found. Scopes results to that widget's AI agent. Omit for all of the tenant's widgets.
"wd_92831"
External placement id.
Deployment type, e.g. brand_agent, sponsored_conversation, embed. Omit for all.
"brand_agent"
Publisher-supplied ad-tracking macro filter (HTML attribute on <dappier-ask-ai-widget>).
Publisher-supplied ad-tracking macro filter.
Publisher-supplied ad-tracking macro filter.
Response
Engagement rollup for the requested window and filters.
Always true for a 200 response.
true
Echoes back only the filters you supplied in the request.
Show child attributes
Show child attributes
Full 13-metric rollup for the window. The block is internally self-consistent; all percentages are rounded to 2 decimals.
Show child attributes
Show child attributes
Per-day subset for charting, ascending by date.
Show child attributes
Show child attributes
Show child attributes
Show child attributes

