API Stats
Each request must be authorized using Header:
http
Authorization: Bearer {apiToken}{apiToken} is an API key you create in the publisher cabinet: Account → API keys, with the widgets:read scope. It is shown only once. Details: API keys.
Placement statistics
http
GET https://api.adexium.io/api/v1/widget/stats/{widgetId}?startDate=YYYY-MM-DD&endDate=YYYY-MM-DD&viewBy=country| Parameter | Required | Description |
|---|---|---|
{widgetId} | yes | Numeric ID of the placement, shown on the placements page |
startDate | yes | First day, YYYY-MM-DD, inclusive |
endDate | yes | Last day, YYYY-MM-DD, inclusive |
viewBy | yes | How to split the rows — see the table below |
widgetIds[] | no | Several of your placements in one request, e.g. widgetIds[]=64352&widgetIds[]=64353. When set, it replaces {widgetId} as the filter |
Days are calendar days in UTC.
viewBy values
| Value | One row per |
|---|---|
country | Country (ISO 3166-1 alpha-2) |
language | User language |
date | Day |
hour | Hour |
platform | Platform |
deviceType | Device type |
premium | Telegram Premium: Yes / No |
tonConnected | TON wallet connected: Yes / No |
source | Traffic source |
placement | Sub-source (placement) |
widget | Placement — the row also has widgetId and widgetName |
A value we could not detect is returned as N/A.
Valid URL example:
http
GET https://api.adexium.io/api/v1/widget/stats/64352?startDate=2025-03-01&endDate=2025-03-01&viewBy=countryResponse example:
json
[
{
"id": "US",
"value": "US",
"clicks": 0,
"revenue": 0.0319,
"impressions": 13,
"ctr": 0,
"cpm": 2.5,
"requests": 40
},
{
"id": "PL",
"value": "PL",
"clicks": 3,
"revenue": 0.0088,
"impressions": 4,
"ctr": 75,
"cpm": 2.2,
"requests": 9
}
]| Field | Meaning |
|---|---|
id, value | The value of the viewBy split (for example the country code) |
requests | Ad requests from your placement |
impressions | Ads shown |
clicks | Clicks |
ctr | Clicks per impression, % |
revenue | Your earnings, USD |
cpm | Your earnings per 1000 impressions, USD |
widgetId, widgetName | Only with viewBy=widget |
For a Direct Link placement every visit is both an impression and a click.