Fetch insight
curl --request GET \
--url https://{publisher_host}/v1/ads/{ad_id}/insights \
--header 'Authorization: Bearer <token>'import requests
url = "https://{publisher_host}/v1/ads/{ad_id}/insights"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{publisher_host}/v1/ads/{ad_id}/insights', 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://{publisher_host}/v1/ads/{ad_id}/insights",
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://{publisher_host}/v1/ads/{ad_id}/insights"
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://{publisher_host}/v1/ads/{ad_id}/insights")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{publisher_host}/v1/ads/{ad_id}/insights")
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{
"ad_id": "ad_9pL2wR",
"insights": {
"impressions": 12500,
"clicks": 340,
"spend": 1500,
"currency": "NOK",
"cpm": 120,
"cpc": 4.41,
"ctr": 0.0272,
"reach": 8200,
"frequency": 1.52,
"conversion": 28,
"cost_per_conversion": 53.57,
"video_views": {
"p25": 5469,
"p50": 4031,
"p75": 2472,
"p100": 1031
},
"from_date": "2026-08-01",
"to_date": "2026-08-19"
}
}Insights
Fetch insight
Return performance metrics for an ad over a date range
GET
/
ads
/
{ad_id}
/
insights
Fetch insight
curl --request GET \
--url https://{publisher_host}/v1/ads/{ad_id}/insights \
--header 'Authorization: Bearer <token>'import requests
url = "https://{publisher_host}/v1/ads/{ad_id}/insights"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{publisher_host}/v1/ads/{ad_id}/insights', 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://{publisher_host}/v1/ads/{ad_id}/insights",
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://{publisher_host}/v1/ads/{ad_id}/insights"
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://{publisher_host}/v1/ads/{ad_id}/insights")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{publisher_host}/v1/ads/{ad_id}/insights")
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{
"ad_id": "ad_9pL2wR",
"insights": {
"impressions": 12500,
"clicks": 340,
"spend": 1500,
"currency": "NOK",
"cpm": 120,
"cpc": 4.41,
"ctr": 0.0272,
"reach": 8200,
"frequency": 1.52,
"conversion": 28,
"cost_per_conversion": 53.57,
"video_views": {
"p25": 5469,
"p50": 4031,
"p75": 2472,
"p100": 1031
},
"from_date": "2026-08-01",
"to_date": "2026-08-19"
}
}Overview
Return performance metrics for an ad. Targeter uses this to populate campaign stats in the app. Dates are inclusiveYYYY-MM-DD. Omit both from_date and to_date to return lifetime totals from the ad start_date through today.
Metrics should match what Targeter already shows on campaigns: impressions, clicks, spend, CPM, CPC, CTR, reach, frequency, conversions, and video quartiles when the creative is video.
Request
Headers
Authorization: Bearer {token}(required)
Path Parameters
Query Parameters
string
Start of the reporting window (inclusive)
string
End of the reporting window (inclusive)
Example Request
curl "https://publisher.example.com/v1/ads/ad_9pL2wR/insights?from_date=2026-08-01&to_date=2026-08-19" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
Success (200)
string
Publisher-generated ad id
object
Aggregated metrics for the requested window
integer
Total ad impressions
integer
Total ad clicks
number
Amount spent in
insights.currencystring
ISO 4217 currency code
number
Cost per 1,000 impressions
number
Cost per click
number
Click-through rate (
clicks / impressions)integer
Unique people reached
number
Average impressions per person reached
integer
Total conversions
number
Average cost per conversion
object
Video completion quartiles (
p25, p50, p75, p100). Omit when the ad has no video.string
Start of the window actually returned
string
End of the window actually returned
{
"ad_id": "ad_9pL2wR",
"insights": {
"impressions": 12500,
"clicks": 340,
"spend": 1500,
"currency": "NOK",
"cpm": 120.0,
"cpc": 4.41,
"ctr": 0.0272,
"reach": 8200,
"frequency": 1.52,
"conversion": 28,
"cost_per_conversion": 53.57,
"video_views": {
"p25": 5469,
"p50": 4031,
"p75": 2472,
"p100": 1031
},
"from_date": "2026-08-01",
"to_date": "2026-08-19"
}
}
Return zeros rather than omitting core counters (
impressions, clicks, spend) when the ad has not delivered yet.Error Responses
400 - Invalid request payload
{
"error": "to_date must be on or after from_date"
}
401 - Unauthorized
{
"error": "Missing or invalid Authorization header"
}
404 - Ad not found
{
"error": "Ad not found"
}
500 - Server Error
{
"error": "Unexpected server error. Please try again later."
}
Authorizations
API token issued to Targeter during integration setup. Send as Authorization: Bearer <token>.
Path Parameters
Publisher-generated ad id returned from POST /ads
Query Parameters
Start of the reporting window (inclusive). ISO 8601 date.
End of the reporting window (inclusive). ISO 8601 date.