get_ads_stats
Retrieve per-ad totals for a Unix time range in Telegram Ads, optionally with timeseries. Select ad IDs or fetch all ads; check completeness and errors before relying on results.
Instructions
Get per-ad totals for [from_time, to_time), in Unix seconds.
The period must not exceed 1000 intervals.
Empty or omitted ad_ids selects all ads via automatic paging, regardless of status. Provided ad_ids are used as supplied. Set include_timeseries to include interval rows.
Returns rounded bounds, per-ad totals, counts, complete and errors. Totals are null when no data is available. Check complete and errors before treating the result as complete.
Omitted account_id uses TELEGRAM_ADS_ACCOUNT_ID if set, otherwise the token owner's account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ad_ids | No | ||
| to_time | Yes | ||
| interval | No | ||
| from_time | Yes | ||
| account_id | No | ||
| include_timeseries | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||