工具 API

report_task_create

Creates an asynchronous report task for TikTok Ads reporting via `POST /open_api/v1.3/report/task/create/`. Use this endpoint instead of the synchronous report endpoints when you want async report generation. Important operational notes: rate limit is 1 QPS per app, and the user associated with the access token has a separate limit of 500 async report creations per ad account per hour. Playable ads reports are not supported in asynchronous reports. Asynchronous reports support no pagination, are valid for 30 days after creation, and data is refreshed every several hours, so current-day data may be inaccurate. Asynchronous filtering supports only `campaign_ids`, `adgroup_ids`, `ad_ids`, or `country_code`, with up to 20000 IDs total; if `country_code` is used as a grouping filter, include `country_code` in `dimensions`. Dimension/metric compatibility differs from synchronous reports: a valid sync combination may be unsupported in async reports, and UV metrics cannot be queried together with audience dimensions in async reports. CHUNK mode only supports synchronous basic reports. Known issue: async reports currently return the dimension `country_code` (for example `US`) as `country_name` (for example `United States`). In v1.3, this endpoint replaces `/v1.2/reports/integrated/get/` for async creation; `filters` was renamed to `filtering`, `advertiser_id` changed from number to string, `lifetime` was deprecated in favor of `query_lifetime`, and new parameters include `output_format`, `file_name`, `query_lifetime`, `advertiser_ids`, and `enable_report_title_translation`.

ecommerceOAuth1 积分

调用信息

工具标识
tiktok-ads.report_task_create
服务提供方
TikTok 广告
平均响应
0 ms
近 7 天调用
0

输入参数

advertiser_id

Advertiser ID. Either `advertiser_id` or `advertiser_ids` must be set. If both `advertiser_id` and `advertiser_ids` are provided, `advertiser_id` is ignored.

advertiser_ids

List of advertiser IDs. Either `advertiser_id` or `advertiser_ids` must be set. If both are provided, `advertiser_id` is ignored. Max size: 5. Valid only when `report_type` is `BASIC` or `AUDIENCE`. All advertisers in `advertiser_ids` must belong to the same TikTok for Business user or an error occurs. If `start_date` and `end_date` are specified, data is pulled according to each ad account's timezone. When passing multiple advertiser IDs, you can specify up to two ID dimensions in `dimensions` (`advertiser_id` plus one other ID dimension). Many metrics do not support the `advertiser_id` dimension. It is recommended to include `currency` in `metrics` because ad accounts may use different currencies.

data_level

Report aggregation level. Required when `report_type` is `BASIC`, `AUDIENCE`, or `CATALOG`.

dimensions必填

Grouping dimensions, for example `["campaign_id", "stat_time_day"]`. Supported dimensions vary by `report_type`. If `country_code` is used as a grouping filter in `filtering`, you must also include `country_code` in `dimensions`. If your `dimensions` contain more than `xx_id` and there is no ads reporting in the query time range, an empty list is returned. Dimension/metric combinations supported in synchronous reports may not be supported in asynchronous reports. The dimension `ad_id_v2` is available only when `report_type` is `BASIC`, `AUDIENCE`, or `CATALOG`; it cannot be used together with the dimension `ad_id` or the filter `ad_ids`. `ad_id_v2` can return ad-level data for Manual Ads, Smart+ Campaigns, and Upgraded Smart+ Ads.

enable_report_title_translation

Whether to translate the title row of the asynchronous report, including dimension and metric names. Default is `true`. Valid only when `report_type` is `BASIC` or `AUDIENCE`. If set to `false`, titles remain untranslated, for example `ad_id` instead of `AD ID`. Starting November 15th, 2024, translations of certain metrics in async report title rows will change. This does not affect metric field names. TikTok strongly recommends setting this field to `false` to avoid code dependencies on translations that may change over time.

end_date

Query end date in `YYYY-MM-DD` format, based on the ad account time zone. Required when `query_lifetime` is `false` or omitted. If `query_lifetime` is `true`, this field is ignored. Asynchronous reports have no time range limitations.

file_name

Custom download file name. Optional when `output_format` is `CSV_DOWNLOAD` or `XLSX_DOWNLOAD`. Maximum length is 255 characters. Must not contain any of these characters: `/`, `\t`, `\b`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `)`, `[`, `]`.

filtering

Filtering conditions. Supported filters vary by `service_type` and `data_level`. When you include `filtering`, each object in the list must include `field_name`, `filter_type`, and `filter_value` together. If you want to use `country_code` as a grouping filter, you must also include `country_code` in `dimensions`. In asynchronous mode, for basic, audience, and DSA reports, the only supported filter fields are `campaign_ids`, `adgroup_ids`, and `ad_ids`.

metrics

Metrics to query. Supported metrics vary by `report_type`. Default is `["spend", "impressions"]`. In async reports, UV metrics cannot be queried together with audience dimensions. Supported dimension/metric combinations may differ from synchronous reports.

order_field

Field to sort by. All supported metrics except attribute metrics support sorting. By default, no sorting is applied.

order_type

Sort order. Default is `DESC`.

output_format

Output format. Default is `CSV_STRING`. If `output_format` is `CSV_DOWNLOAD` or `XLSX_DOWNLOAD`, you may optionally provide `file_name`.

query_lifetime

Whether to request lifetime metrics. Default is `false`. If `true`, `start_date` and `end_date` are ignored. Lifetime metric names are the same as the normal metric names. Breakdown by time, audience, or location code (`country_code`) is not supported for lifetime metrics. DSA reports do not support lifetime metrics. Audience reports do not support lifetime metrics at this time.

report_type必填

Report type. When `service_type` is `AUCTION`, supported values are `BASIC`, `AUDIENCE`, `PLAYABLE_MATERIAL`, and `CATALOG`. `data_level` is required when `report_type` is `BASIC`, `AUDIENCE`, or `CATALOG`. `advertiser_ids` is valid only when `report_type` is `BASIC` or `AUDIENCE`. `enable_report_title_translation` is valid only when `report_type` is `BASIC` or `AUDIENCE`. You can retrieve creative-level data for Upgraded Smart+ Ads when `report_type` is `BASIC`, `AUDIENCE`, or `CATALOG`.

service_type

Ad service type. Default is `AUCTION`. To retrieve TopView ad reporting data, use basic or audience reports and set the `buying_type` filter to `RESERVATION_TOP_VIEW`.

start_date

Query start date in `YYYY-MM-DD` format, based on the ad account time zone. Required when `query_lifetime` is `false` or omitted. If `query_lifetime` is `true`, this field is ignored. Asynchronous reports have no time range limitations.