VI | EN
Message us on Messenger
Developer resources

Get internet service providers — TikTok Business API

Get internet service providers · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

Get internet service providers

GET/tool/targeting/list/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/tool/targeting/list/
Description

Use this endpoint to get targeting tags.

You can get one single type of targeting tag that is used to target ad audiences: ISP IDs. Then to apply ISP IDs to your ads, you can pass the returned ISP IDs to isp_ids when calling /adgroup/create/, /adgroup/update/ or /ad/audience_size/estimate/.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/tool/targeting/list/

Authentication & shop

NameInTypeSampleDescription
AuthorizationheaderheaderBearer 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_idquerystring7000000000000000001Tà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

NameInTypeRequiredSampleDescription
location_idsquerystring[]YesIDs of the locations that you want to get the supported ISP IDs for. Max size: 1000. To find out the list of location IDs, see Location IDs. Note: You need to pass location IDs at the country or region level. To get the available locations and corresponding IDs based on your placement and objective, use the /tool/region/ and the returned level for location IDs at the country or region level will be COUNTRY.
scenequerystringYesThe targeting type that the targeting tags are used for. The allowed enum values: ISP ( Internet Service Provider targeting).

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/tool/targeting/list/?location_ids=%5B%5D&scene=" \
  -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/tool/targeting/list/",
    params={
        "location_ids": [],
        "scene": ""
    },
    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/tool/targeting/list/');
for (const [k, v] of Object.entries({"location_ids":[],"scene":""})) 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/tool/targeting/list/' . '?' . http_build_query(['location_ids' => '[]', 'scene' => '']);
$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)

NameTypeSampleDescription
codenumberResponse code. For the complete list of response codes and descriptions, see Appendix-Return Code.
messagestringResponse message. For details, see Appendix - Return Codes.
request_idstringThe log ID of a request, which uniquely identifies the request.
dataobjectReturned data.
targeting_tag_listobject[]Information about the targeting tags.
targeting_typestringThe targeting type that the targeting tag is used for. Enum values: `ISP` ( Internet Service Provider targeting).
namestringThe name of the targeting tag.
status_infoobjectInformation about the status of the targeting tag.
statusstringThe status of the targeting tag. Enum values: `ENABLED` (can be used for targeting), `DISABLED`(cannot be used for targeting).
reasonstringThe reason why the targeting tag cannot be used for targeting. Returned when `status` = `DISABLED`. Enum values: - `OFFLINE`: The targeting tag is offline. - `NOT_SUPPORTED`: The targeting tag is not offline but is not supported for the specified settings.
ispobjectInformation about the targeting tag that is used for Internet service provider targeting.
isp_idstringThe ID of the Internet service provider that you can target.
location_idstringThe location ID that the `isp_id` can be used together with. Only location IDs at the country or region level are supported.
region_codestringThe code of the region or country that the `isp_id` belongs to.
geoobjectInformation about the targeting tag that is used for location targeting.
parent_tagsobject[]Information about all the parent targeting tags.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "parent_tags": [],
        "targeting_tag_list": [
            {
                "name": "Etisalat Misr",
                "targeting_type": "ISP",
                "geo": null,
                "status_info": {
                    "status": "ENABLED",
                    "reason": null
                },
                "isp": {
                    "isp_id": "EG00045",
                    "location_id": "357994",
                    "region_code": "EG"
                }
            },
            {
                "name": "Orange Egypt",
                "targeting_type": "ISP",
                "geo": null,
                "status_info": {
                    "status": "ENABLED",
                    "reason": null
                },
                "isp": {
                    "isp_id": "EG00081",
                    "location_id": "357994",
                    "region_code": "EG"
                }
            },
            {
                "name": "Telecom Egypt",
                "targeting_type": "ISP",
                "geo": null,
                "status_info": {
                    "status": "ENABLED",
                    "reason": null
                },
                "isp": {
                    "isp_id": "EG00098",
                    "location_id": "357994",
                    "region_code": "EG"
                }
            },
            {
                "name": "Vodafone Egypt",
                "targeting_type": "ISP",
                "geo": null,
                "status_info": {
                    "status": "ENABLED",
                    "reason": null
                },
                "isp": {
                    "isp_id": "EG00105",
                    "location_id": "357994",
                    "region_code": "EG"
                }
            },
            {
                "name": "other",
                "targeting_type": "ISP",
                "geo": null,
                "status_info": {
                    "status": "ENABLED",
                    "reason": null
                },
                "isp": {
                    "isp_id": "EG0",
                    "location_id": "357994",
                    "region_code": "EG"
                }
            }
        ]
    }
}

Get started

  1. Sign up for Partner
  2. Enable a data type of the Ads (Marketing API) group on the platform page
  3. Create an API key (tick the TikTok Business channel)
  4. Call it as in the examples above