Skip to content

Impression-Level Report

Returns one row per impression — the finest-grained view of your revenue. Each row includes the CPM, ad unit, format, country, OS, and the primary_user_id you set in the SDK, so you can join revenue directly to your own user data.

Only ads that were actually displayed to the user are included — a serve that never rendered is not an impression and does not appear here.

text
GET /reporting/v1/publisher/impressions
Authorization: Bearer <your-reporting-key>

Query Parameters

ParameterTypeDefaultDescription
publisher_idstringrequiredYour publisher ID.
date_startstringrequiredISO 8601 UTC datetime, e.g. 2026-07-14T00:00:00Z.
date_endstringrequiredISO 8601 UTC datetime, e.g. 2026-07-15T23:59:59Z. Must be after date_start; max span 31 days.
ad_unit_idstring[]Filter by ad unit ID.
ad_unit_namestring[]Filter by ad unit name, as set in the dashboard. Case-insensitive.
ad_formatstring[]rewarded, interstitial, or native.
countrystring[]ISO 3166-1 alpha-2 code, e.g. US.
osstring[]ios or android.
statusstring[]estimated or final. Omit to include both.
sort_orderstringascasc or desc, by served_at.
limitint5000Page size, max 10000.
cursorstringPagination cursor from a prior response. See Pagination.

ad_unit_id, ad_unit_name, ad_format, country, os, and status accept multiple values — repeat the parameter once per value, e.g. country=US&country=GB. If you pass both ad_unit_id and ad_unit_name, only ad units matching both filters are returned.

Response Fields

Each element of data:

FieldTypeDescription
impression_idstringUnique ID for the impression.
ad_unit_idstring | nullAd unit that served the impression.
ad_unit_namestring | nullThe ad unit's name, as set in the dashboard.
ad_formatstringrewarded, interstitial, or native.
countrystring | nullISO 3166-1 alpha-2 country of the session.
osstring | nullios or android.
cpmnumber | nullRevenue per 1,000 impressions, in USD.
currencystringAlways USD.
served_atdatetimeWhen the impression was served (UTC).
publisher_idstringYour publisher ID.
primary_user_idstring | nullThe user ID your app passed to the SDK.
statusstringestimated or final. See Estimated vs. final revenue.

Example

text
GET /reporting/v1/publisher/impressions?publisher_id=pub_0a1b2c3d
    &date_start=2026-07-14T00:00:00Z&date_end=2026-07-15T00:00:00Z
    &ad_format=rewarded&status=final
json
{
  "data": [
    {
      "impression_id": "imp_9f2c47d1a8",
      "ad_unit_id": "SIM-RWD-A3F9K2BX",
      "ad_unit_name": "Daily Reward Video",
      "ad_format": "rewarded",
      "country": "US",
      "os": "ios",
      "cpm": 12.5,
      "currency": "USD",
      "served_at": "2026-07-14T09:21:37Z",
      "publisher_id": "pub_0a1b2c3d",
      "primary_user_id": "u_98234723",
      "status": "final"
    }
  ],
  "pagination": { "next_cursor": null, "has_more": false },
  "meta": { "row_count": 1 }
}

Fetching All Pages

bash
curl -G "$BASE/reporting/v1/publisher/impressions" \
  -H "Authorization: Bearer $REPORTING_KEY" \
  --data-urlencode "publisher_id=pub_0a1b2c3d" \
  --data-urlencode "date_start=2026-07-14T00:00:00Z" \
  --data-urlencode "date_end=2026-07-15T00:00:00Z"
js
const BASE = 'https://simula-api-701226639755.us-central1.run.app';

async function fetchAllImpressions(params) {
  const rows = [];
  let cursor = null;
  do {
    const query = new URLSearchParams({ ...params, ...(cursor && { cursor }) });
    const res = await fetch(`${BASE}/reporting/v1/publisher/impressions?${query}`, {
      headers: { Authorization: `Bearer ${process.env.REPORTING_KEY}` },
    });
    if (!res.ok) throw new Error(`Reporting API ${res.status}: ${await res.text()}`);
    const page = await res.json();
    rows.push(...page.data);
    cursor = page.pagination.next_cursor;
  } while (cursor);
  return rows;
}

const rows = await fetchAllImpressions({
  publisher_id: 'pub_0a1b2c3d',
  date_start: '2026-07-14T00:00:00Z',
  date_end: '2026-07-15T00:00:00Z',
});
python
import os
import requests

BASE = "https://simula-api-701226639755.us-central1.run.app"
HEADERS = {"Authorization": f"Bearer {os.environ['REPORTING_KEY']}"}

def fetch_all_impressions(**params):
    rows, cursor = [], None
    while True:
        if cursor:
            params["cursor"] = cursor
        res = requests.get(
            f"{BASE}/reporting/v1/publisher/impressions",
            headers=HEADERS, params=params,
        )
        res.raise_for_status()
        page = res.json()
        rows.extend(page["data"])
        cursor = page["pagination"]["next_cursor"]
        if not page["pagination"]["has_more"]:
            return rows

rows = fetch_all_impressions(
    publisher_id="pub_0a1b2c3d",
    date_start="2026-07-14T00:00:00Z",
    date_end="2026-07-15T00:00:00Z",
)