Get audience details
GET/dmp/custom_audience/get/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/dmp/custom_audience/get/
Description
Use this endpoint to obtain the details of specified audiences, such as current status and modification record. Details for both owned and shared audiences will be returned. You can use is_creator to check whether this advertiser is the owner of this audience.
> Note
A maximum of 100 audiences can be queried per request.
Request
Endpoint
GET https://partner.quantri360.com/v1/tiktok_business/dmp/custom_audience/get/
Authentication & shop
| Name | In | Type | Sample | Description |
|---|---|---|---|---|
| Authorization | header | header | Bearer q360_live_ab12cd34_… | Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand. |
| platform_shop_id | query | string | 7000000000000000001 | Tài sản TikTok Business đã kết nối — "Mã tài sản" ở trang Nền tảng hoặc GET /v1/platforms (tài khoản quảng cáo cho Marketing API, tài khoản TikTok cho Organic / Messaging). Có thể bỏ khi chỉ kết nối một tài sản. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| custom_audience_ids | query | string[] | Yes | A list of Audience IDs. Length range is [1, 100] . | |
| history_size | query | number | No | The size of the history data which the user requests. |
Request examples
curl -s "https://partner.quantri360.com/v1/tiktok_business/dmp/custom_audience/get/?custom_audience_ids=%5B%5D" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/tiktok_business/dmp/custom_audience/get/",
params={
"custom_audience_ids": []
},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
print(r.status_code)
print(r.json())Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/tiktok_business/dmp/custom_audience/get/');
for (const [k, v] of Object.entries({"custom_audience_ids":[]})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'GET',
headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());PHP
<?php $key = 'q360_live_...'; // khóa API của brand $url = 'https://partner.quantri360.com/v1/tiktok_business/dmp/custom_audience/get/' . '?' . http_build_query(['custom_audience_ids' => '[]']); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo $status, "\n", $res;
Response
Response fields (as returned by TikTok Business)
| Name | Type | Sample | Description |
|---|---|---|---|
| code | number | Response code. For the complete list of response codes and descriptions, see Appendix - Return Codes. | |
| message | string | Response message. For details, see Appendix - Return Codes. | |
| data | object | Returned Data. | |
| list | object[] | A list of audience details. | |
| audience_details | object | Audience data. | |
| audience_id | string | Audience ID. | |
| msg | string | Information about audience status. | |
| audience_sub_type | string | Audience sub type, indicating the type of ads that the audience can be used. Enum values: `NORMAL`: Normal audience. It can be used in non-R&F ads. `REACH_FREQUENCY`: Audience for Reach & Frequency. It can only be used in R&F ads. | |
| error_msg | string | Error information when creating or modifying an audience. | |
| is_valid | boolean | Audience availability. An audience becomes available after it has been processed. An audience becomes invalid after it is expired. | |
| is_expiring | boolean | Whether an audience is expiring. When an audience is expiring, it will expire in less than 60 days. | |
| expired_time | string | Time when the audience expires, in the format of "YYYY-MM-DD HH:MM:SS". | |
| name | string | Audience name. | |
| rule | string | If this audience is an engagement audience, app activity audience or website traffic audience, this is the creation rule for it. | |
| is_auto_refresh | boolean | If this audience is an engagement audience / app activity audience or website traffic audience, this indicates whether the audience refreshes daily. | |
| shared | boolean | Whether this audience is shared with others. Enum values: `True`, `False`. | |
| is_creator | boolean | Whether this advertiser is the owner of the audience. Enum values: `true`, `false`. You can use `shared` and `is_creator` to check audience ownership and shared status. The rules are as follows: 1. `shared` = `true` and `is_creator` = `true`: The advertiser is the owner and the audience is shared to others. 2. `shared` = `true` and `is_creator` = `false`: The advertiser is NOT the owner and the audience is shared by others. 3. `shared` = `false` and `is_creator` = `true`: The advertiser is the owner and the audience has not been shared to others. | |
| owner_id | string | Advertiser ID of the audience creator. - If `is_creator`=`true`, `owner_id` will be `advertiser_id` that you specified in the request. - If `is_creator`=`false`, `owner_id` will be the ID of the advertiser that created the audience. | |
| create_time | string | Time when the audience was created, in the format of "YYYY-MM-DD HH:MM:SS". | |
| type | string | Audience type. Enum values: - `Customer File Audience` (Customer File Audience). - `Engagement Audience` (Engagement Audience). - `App Activity Audience` (App Activity Audience). - `Website Audience` (Website Traffic Audience). - `Lookalike Audience` (Lookalike Audience). - `Lead Generation `(Lead Generation Audience) - `Rule Business Account` (Business Account Audience) - `Rule ad shop` (Shop Activity Audience) - `Partner` (Partner Audience) - `Challenge` (Challenge Audience) - `Preferred Population` (Premium Audience)Note: Currently, Partner Audience, Challenge Audience and Premium Audience cannot be created through the API. | |
| cover_num | number | TikTok coverage, or number of matched users on TikTok. | |
| calculate_type | string | Encryption type. For enum values, see Enumeration - Encryption Type. | |
| lookalike_spec | object[] | Lookalike audience-specific information. Returned only when the audience is a lookalike audience. | |
| source_audience_id | string | Source (seed) audience ID. | |
| include_source | boolean | Whether to include the source audience in the new lookalike audience. | |
| mobile_os | string | Device operating systems. Enum values support `ALL` for both `ANDROID` and `IOS`. See Enumeration-Audience Management-Lookalike System for details. | |
| placements | string | The apps where you want to deliver your ads. Enum values: `TikTok`, `TopBuzz & BuzzVideo`, `Pangle`. See Enumeration - Audience Management-Lookalike Placement for details. | |
| location_ids | string[] | IDs of the locations that you want to target. For enum values, see Enumeration-Lookalike Locations. | |
| audience_size | string | Size of lookalike audience. Enum values: `NARROW`, `BALANCED` and `BROAD`. | |
| audience_history | object[] | List of audience modification history. | |
| action | string | Modification made. To learn about the meaning of the values, see "Mapping between `action` value and operation via /dmp/custom_audience/update/" section below. | |
| action_detail | string | Modification result. | |
| editor | string | Operator used. If modification was made through the TikTok API for Business, the value is "open_api". | |
| msg | string | If the operation is partial success, the information will be shown here. | |
| opt_time | string | The operation time. Formats such as:2019-04-14 06:52:56. | |
| request_id | string | The log id of a request, which uniquely identifies the request. |
Response sample
HTTPS/1.1 200 OK
{
"code": 0,
"message": "OK",
"request_id": "123",
"data": {
"list": [
{
"audience_history": [
{
"msg": null,
"action_detail": "6489086",
"editor": "open_api",
"opt_time": "2022-05-26 14:12:12",
"action": "create"
}
],
"audience_details": {
"audience_id": "123",
"is_expiring": false,
"is_auto_refresh": false,
"is_creator": true,
"expired_time": "2023-09-07 18:34:20",
"is_valid": true,
"shared": true,
"create_time": "2022-05-26 14:12:12",
"msg": null,
"error_msg": null,
"type": "Lookalike Audience",
"audience_sub_type": "NORMAL",
"calculate_type": null,
"cover_num": 6489086,
"name": "CUSTOM_AUDIENCE_NAME",
"rule": "{\"inclusions\": null, \"exclusions\": null}",
"owner_id": "{{owner_id}}",
"lookalike_spec": null
}
}
]
}
}
(/code);
Get started
- Sign up for Partner
- Enable a data type of the Ads (Marketing API) group on the platform page
- Create an API key (tick the TikTok Business channel)
- Call it as in the examples above