Skip to content

Working with statistics

POST /api/v1/stats/page

Example usage:

http
https://client.adstat.pro/api/v1/stats/page

Request parameters:

HTTP headers:

Pass <access_token> in the HTTP request headers in the following format:

  • Authorization: "Bearer <access_token>"

Request body:

The HTTP request body contains parameters for retrieving statistics.

ParameterTypeDescriptionRequired
period_fromstringStart date of the period for statistics (ISO 8601)Yes
period_tostringEnd date of the period for statistics (ISO 8601)Yes
period_grouping_unitstringTime grouping unit. Possible values: "day", "week", "month", "year", "hour", "30_minutes", "5_minutes"Yes
groupingstring[]Data grouping by entities. Possible values: "cabinet", "ad_object", "ad", "campaign"No
platform_cabinet_idsstring[]Filter by platform cabinet IDsNo
ad_objectsstring[]Filter by ad objectsNo
currency_codestringCurrency for financial metrics. Default: EUR. Available values: EUR, TON, USD, RUB, USDT, STARNo
order_bystringResult sort parameter. "period" — ascending by date, "-period" — descending by dateNo
limitnumberMaximum number of records in the response (maximum: 500)No
cursorstringPagination token for fetching the next page of resultsNo

Restrictions for detailed time grouping

When using period_grouping_unit values: "hour", "30_minutes", "5_minutes", the following restrictions apply:

  • Data availability: data is available only for the last 5 days
  • Maximum request period: the period between period_from and period_to cannot exceed 2 days

Example request:

http
POST https://client.adstat.pro/api/v1/stats/page
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "period_from": "2024-06-07T00:00:00.000Z",
  "period_to": "2024-06-07T23:59:59.000Z",
  "period_grouping_unit": "day",
  "grouping": ["cabinet", "ad"],
  "currency_code": "EUR",
  "limit": 100
}

Example successful response:

Expand to view response
json
{
	"columns": [
		{
			"key": "period_date",
			"type": "datetime"
		},
		{
			"key": "original_spent",
			"type": "money"
		},
		{
			"key": "original_currency",
			"type": "string"
		},
		{
			"key": "exchanged_spent",
			"type": "money"
		},
		{
			"key": "exchange_currency",
			"type": "string"
		},
		{
			"key": "views",
			"type": "number"
		},
		{
			"key": "clicks",
			"type": "number"
		},
		{
			"key": "actions",
			"type": "number"
		},
		{
			"key": "video_opens",
			"type": "number"
		},
		{
			"key": "ctr",
			"type": "number"
		},
		{
			"key": "cpc",
			"type": "number"
		},
		{
			"key": "cpm",
			"type": "number"
		},
		{
			"key": "cpa",
			"type": "number"
		},
		{
			"key": "cvr",
			"type": "number"
		},
		{
			"key": "campaign_id",
			"type": "number"
		},
		{
			"key": "platform_id",
			"type": "number"
		},
		{
			"key": "ad_object",
			"type": "string"
		},
		{
			"key": "ad_id",
			"type": "number"
		},
		{
			"key": "platform_ad_id",
			"type": "number"
		},
		{
			"key": "platform_cabinet_id",
			"type": "string"
		},
		{
			"key": "ad_title",
			"type": "string"
		},
		{
			"key": "ad_text",
			"type": "string"
		},
		{
			"key": "ad_status",
			"type": "string"
		},
		{
			"key": "ad_cpm",
			"type": "money"
		},
		{
			"key": "ad_budget",
			"type": "money"
		},
		{
			"key": "promote_url",
			"type": "string"
		},
		{
			"key": "target_type",
			"type": "string"
		},
		{
			"key": "website_name",
			"type": "string"
		},
		{
			"key": "media_type",
			"type": "string"
		},
		{
			"key": "views_limit_per_user",
			"type": "number"
		},
		{
			"key": "website_button_type",
			"type": "string"
		},
		{
			"key": "action_type",
			"type": "string"
		},
		{
			"key": "exclude_crypto",
			"type": "boolean"
		},
		{
			"key": "only_crypto",
			"type": "boolean"
		},
		{
			"key": "target_langs",
			"type": "array"
		},
		{
			"key": "additional_information",
			"type": "string"
		},
		{
			"key": "target_countries",
			"type": "array"
		},
		{
			"key": "target_locations",
			"type": "array"
		},
		{
			"key": "target_channels",
			"type": "array"
		},
		{
			"key": "target_user_channels",
			"type": "array"
		},
		{
			"key": "target_topics",
			"type": "array"
		},
		{
			"key": "target_search",
			"type": "array"
		},
		{
			"key": "target_bots",
			"type": "array"
		},
		{
			"key": "platform_cabinet_name",
			"type": "string"
		},
		{
			"key": "campaign_name",
			"type": "string"
		}
	],
	"rows": [
		{
			"period_date": "2025-11-27T14:45:00Z",
			"original_spent": "0.054000",
			"original_currency": "EUR",
			"exchanged_spent": "0.054000",
			"exchange_currency": "EUR",
			"views": 157,
			"clicks": 12,
			"actions": 3,
			"video_opens": 0,
			"ctr": "0.0",
			"cpc": "0E-10",
			"cpm": "3.0000000000",
			"cpa": "0E-10",
			"cvr": "0.0",
			"campaign_id": 10101,
			"platform_id": 10,
			"ad_object": "t.me/cute_cats_bot?start=cats123",
			"ad_id": 5669137,
			"platform_ad_id": 891,
			"platform_cabinet_id": "ACC00101",
			"ad_status": "active",
			"ad_cpm": "3.0000000000",
			"ad_budget": "4.0400000000",
			"ad_title": "🐱 Милые котики каждый день!",
			"ad_text": "😻 Получайте фото самых милых котиков прямо в Telegram!",
			"promote_url": "t.me/aboutstoloto/8702",
			"website_name": "",
			"views_limit_per_user": 3,
			"website_button_type": "",
			"action_type": "join",
			"exclude_crypto": false,
			"only_crypto": false,
			"additional_information": "erid: 1A1aa5sdAS2",
			"media_type": "",
			"platform_cabinet_name": "Cats_Lovers_Studio",
			"campaign_name": "Default",
			"target_type": "target_users",
			"target_langs": [],
			"target_countries": [],
			"target_locations": [],
			"target_channels": [],
			"target_user_channels": [],
			"target_topics": ["Pets & Animals", "Lifestyle", "Entertainment"],
			"target_search": [],
			"target_bots": []
		}
	],
	"count": 50,
	"cursor": "eyJmaadasdw12312F9mcm9tIjoiMjAyNS0wNC0zMFQyMzowMDowMFoiLCJwZXJpb2RfdG8iOiIyMDI1LTA4LTMxVDIyOjU5OjU5WiIsInBsYXRmb3JtX2NhYmluZXRfaWRzIjpbXSwiYWRfb2JqZWN0cyI6W10sInBhcnRuZXJfaWRzIjpbMTA5NTZdLCJjdXJyVyIjpbInBlcmlvZCJdLCJtYXJrIjp7InBlcmlvZF9ncm91cGluZ191bml0IjoibW9udGgiLCJncm91cGluZyI6WyJhZCJdLCJsaW1pdCI6NTAsInBvaW50ZXIiOnsicGVyaW9kX2RhdGUiOiIyMDI1LTA3LTAxVDAwOjAwOjAwIiwicGxhdGZvcm1fY2FiaW5ldF9pZCI6IkFDQzAxNjA5IiwiYWRfb2JqZWN0IjoidC5tZS9vc3RyZWUiLCJhZF9pZCI6NDE3ODExMCwiY2FtcGFpZ25faWQiOjE3Nn19fQ=="
}

Response structure:

FieldTypeDescription
columnsobject[]Table column metadata (see structure below)
rowsobject[]Array of rows with statistics data (see fields below)
countnumberTotal number of records in the result
cursorstring | nullPagination token for the next page (base64 JSON or null for the last page)

Column structure (columns):

FieldTypeDescription
keystringField identifier in the data
typestringField data type: "string", "number", "money", "date", "datetime", "boolean", "array"

Data fields in rows (rows):

The table below lists all possible fields that may appear in result rows depending on request parameters:

FieldTypeDescriptionFrontend label
period_datestringPeriod date (ISO 8601)Day/Week/Month/Year/Period
original_spentstringAmount spent in the original currency-
original_currencystringOriginal currency-
exchanged_spentstringAmount spent in the report currencySpend
exchange_currencystringReport currency-
viewsnumberNumber of impressionsImpressions
clicksnumberNumber of clicksClicks
actionsnumberNumber of actionsActions
video_opensnumberNumber of video opensVideo opens
ctrstringClick-through rate (percentage)CTR,% (Click-through rate: (Clicks/Impressions)*100)
cpcstringCost per clickCPC (Cost per click: Spend/Clicks)
cpmstringCost per 1,000 impressions (actual)CPM (Cost per 1,000 impressions)
cpastringCost per actionCPA (Cost per goal: Spend/Actions)
cvrstringConversion rate (percentage)CVR,% (Conversion rate: (Actions/Clicks)*100)
campaign_idnumberCampaign ID-
platform_idnumberPlatform ID-
ad_objectstringAd objectObject
ad_idnumberAd ID-
platform_ad_idnumberPlatform ad ID-
platform_cabinet_idstringPlatform cabinet ID-
ad_statusstringAd status-
ad_cpmstringCost per 1,000 impressions (set on the ad)-
ad_budgetstringAd budget-
ad_titlestring | nullAd titleAd name
ad_textstring | nullAd textCreative text
promote_urlstring | nullPromoted object URLURL
website_namestring | nullWebsite nameSite name
website_button_typestring | nullWebsite button typeButton text
views_limit_per_usernumberImpression limit per userImpression frequency
action_typestring | nullAction typeAction type
exclude_cryptobooleanExclude cryptocurrency ads-
only_cryptobooleanCryptocurrency ads only-
additional_informationstring | nullAdditional information (erid token)-
media_typestring | nullMedia typeMedia type
platform_cabinet_namestring | nullPlatform cabinet nameCabinet
campaign_namestring | nullCampaign nameCampaign name
target_typestring | nullTargeting typeTargeting type
target_langsstring[]Target languages-
target_countriesstring[] | nullTarget countries-
target_locationsstring[] | nullTarget locations-
target_channelsstring[] | nullTarget channels-
target_user_channelsstring[]Target user channels-
target_topicsstring[] | nullTarget topicsInterests
target_searchstring[] | nullTarget search queries-
target_botsstring[] | nullTarget bots-

Field availability by grouping:

The table below shows which fields are returned in the API response depending on the grouping parameter value:

API fieldNo breakdownBy cabinets (["cabinet"])By campaigns (["campaign"])By objects (["ad_object"])By ads (["ad"])
period_date
platform_cabinet_name
campaign_name
ad_object
ad_title
ad_text
promote_url
website_name
media_type
target_type
target_topics
views_limit_per_user
website_button_type
action_type
original_spent
original_currency
exchanged_spent
exchange_currency
views
clicks
video_opens
actions
ctr
cvr
cpm
cpc
cpa
platform_id
platform_cabinet_id
campaign_id
ad_id
platform_ad_id
ad_status
ad_cpm
ad_budget
exclude_crypto
only_crypto
additional_information
target_langs
target_countries
target_locations
target_channels
target_user_channels
target_search
target_bots

Notes:

  • The period_date field is always present in the response regardless of grouping
  • When using grouping combinations (for example, ["cabinet", "campaign"]), fields are merged: if a field is available in at least one of the specified groupings, it will be present in the response

Pagination:

To fetch the next page of results, use the cursor parameter from the response. If cursor is null, the last page has been reached.

Example request for the next page:

http
POST https://client.adstat.pro/api/v1/stats/page
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "cursor": "eyJwZXJpb2QiOiIyMDI0LTA2LTA3In0="
}

:::


⚠️ Deprecated endpoint

Attention!

This endpoint is deprecated and will be disabled on 28.02.2026. We recommend using /api/v1/stats/page.

POST report/tgview

Example usage:

http
https://client.adstat.pro/api/report/tgview

Parameters:

HTTP headers:

Pass <access_token> in the HTTP request headers in the following format:

  • Authorization: "Bearer <access_token>"

Request body:

The HTTP request body must contain parameters for retrieving statistics.

Description of parameters passed in the request body:

FieldTypeDescription
dateObjectDate interval defining the time period for the request.
date.date_fromStringStart date and time in ISO 8601 format (for example, "2024-06-07T00:00:00.000Z").
date.date_toStringEnd date and time in ISO 8601 format (for example, "2024-06-07T23:59:59.000Z").
platformArray of numbersStatic value always equal to [10].
partnerArray of numbersStatic value always equal to [2].
campaignArrayList of campaign identifiers. May be an empty array if you need data for all campaigns.
group_timeNumberTime grouping parameter. Values:
Day — 1,
Month — 2,
Week — 3,
Year — 4.
groupingsArray of objectsList of data grouping objects. Each object defines a grouping parameter.
groupings.nameStringParameter name for grouping (for example, "date", "object", etc.).
groupings.typeNumberGrouping type for the parameter. Used only for some groupings (for example, 1).
objectArrayList of ad object identifiers to retrieve statistics for selected objects. ["t.me/someobject", "..."]. Use [] to retrieve data for all objects.
You can get the list of ad objects in Ad object list
sub_clientArrayInternal parameter for technical needs.
type_cabnullCabinet type. Static value — always null.
currencyStringCurrency in which data will be presented. Static value — always RUB
account_uidsArrayList of cabinet identifiers for filtering statistics by individual cabinets. May be an empty array [] to retrieve data for all cabinets. For individual cabinets — ["ACC0000", "..."].
You can get a list containing cabinet account_uids in Cabinet list

Detailed parameter description:

groupings parameter:

Example 1: Statistics grouped by date only:

json
{
	"others_params": "others params",
	"groupings": [{ "name": "date", "type": "<group_time>" }],
	"..": "others params"
}

Example 2: Statistics grouped by multiple parameters:

  • By ad object: {"name": "object"}
  • By ad: {"name": "campaign"}
  • By cabinet: {"name": "account", "type": 1}
json
{
	"others_params": "others params",
	"groupings": [
		{ "name": "object" },
		{ "name": "campaign" },
		{ "name": "account", "type": 1 },
		{ "name": "date", "type": "<group_time>" }
	],
	"..": "others params"
}

Full request body example:

json
{
	"date": {
		"date_from": "2024-06-07T00:00:00.000Z",
		"date_to": "2024-06-07T23:59:59.000Z"
	},
	"platform": [10],
	"partner": [2],
	"campaign": [],
	"group_time": 1,
	"groupings": [
		{
			"name": "date",
			"type": 1
		},
		{
			"name": "partner"
		},
		{
			"name": "platform"
		},
		{
			"name": "sub_client"
		}
	],
	"object": [],
	"sub_client": [],
	"type_cab": null,
	"currency": "RUB",
	"account_uids": []
}

Example successful response:

json
{
	"results": [
		{
			"account_name": "SOME_Test",
			"account_uid": "ACC0000000",
			"action_type": "join",
			"ad_id": 999999999,
			"ad_text": "example ad_text",
			"ad_type": "target_channels",
			"button_type": null,
			"campaign_plat": "example campaign plat",
			"clicks": 0,
			"cpc": 0.0,
			"cpm": 1.33,
			"ctr": 0.0,
			"cvr": 0.0,
			"date": "2024-06-09",
			"goals": 0.0,
			"impressions": 1.0,
			"object": "t.me/example",
			"opened": null,
			"price_target": 0.0,
			"promote_url": "t.me/example",
			"spent": 0.004,
			"target_bots": [],
			"target_channels": [],
			"target_countries": [],
			"target_langs": ["Russian"],
			"target_search": ["Russian"],
			"target_topics": ["Offers & Promotions"],
			"target_user_channels": [],
			"target_user_locations": [],
			"unit": 1016091001563,
			"website_name": null
		}
	]
}

Response structure:

Result object fields:

FieldTypeDescription
account_nameStringAccount name.
account_uidStringUnique account identifier.
action_typeString or nullTarget action type.
ad_idNumberUnique ad identifier.
ad_textStringCreative text.
ad_typeStringAd type
(for example, target_channels, target_users, target_search, target_bots).
button_typeString or nullButton text.
campaign_platStringAd name.
clicksNumberClicks.
cpcNumberCost per click (CPC).
cpmNumberCost per thousand impressions (CPM).
ctrNumberClick-through rate (CTR).
cvrNumberConversion rate (CVR).
dateStringDate in "YYYY-MM-DD" format.
goalsNumberGoals.
impressionsNumberNumber of ad impressions.
objectStringAd object.
openedNumber or nullVideo opens.
price_targetNumberCost per goal.
promote_urlStringFinal URL of the promoted object.
spentNumberSpend.
target_botsArray of stringsList of bots the ad targets.
target_channelsArray of stringsList of channels the ad targets.
target_countriesArray of stringsList of countries the ad targets.
target_langsArray of stringsList of languages the ad targets.
target_searchArray of stringsList of search queries the ad targets.
target_topicsArray of stringsList of topics the ad targets.
target_user_channelsArray of stringsList of channels the ad targets.
target_user_locationsArray of stringsList of locations the ad targets.
unitNumberInternal parameter for technical needs.
website_nameStringWebsite name.

Ad object list

INFO

GET report/objects

Example usage:

http
https://client.adstat.pro/api/report/objects

Request parameters:

HTTP headers:

Pass <access_token> in the HTTP request headers in the following format:

  • Authorization: "Bearer <access_token>"

Example successful response:

json
["t.me/object", "https://example.ru"]