# TikTok Ads

> Read TikTok advertising campaigns, audiences and performance; manage ad status and asynchronous reports.

App · 14 actions. Web page: https://docs.lodol.com/docs/integrations/tiktok-ads

## Actions

### Cancel report task

Cancel report task in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Task ID (`task_id`, text, required): Task id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Create report task

Start an asynchronous basic report and return its task ID. Use Get report task to check progress.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Start date (`start_date`, date, required): Start date.
- End date (`end_date`, date, required): End date.
- Data level (`data_level`, text, required): Data level. One of: `AUCTION_ADVERTISER`, `AUCTION_CAMPAIGN`, `AUCTION_ADGROUP`, `AUCTION_AD`.
- Dimensions (`dimensions`, list, required): Dimensions. One or more of: `advertiser_id`, `campaign_id`, `adgroup_id`, `ad_id`, `stat_time_day`, `stat_time_hour`.
- Metrics (`metrics`, list): Metrics. One or more of: `spend`, `impressions`, `clicks`, `ctr`, `cpc`, `cpm`, `conversion`, `cost_per_conversion`, `conversion_rate`.

**Outputs**: Response.

- `data` (object): Task creation response.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "code": 0,
    "data": {
      "task_id": "Example"
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get ad group quota

Get ad group quota in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get custom audiences

Get custom audiences in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Custom audience IDs (`custom_audience_ids`, list, required): Custom audience ids.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get report

Get report in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Start date (`start_date`, date, required): Start date.
- End date (`end_date`, date, required): End date.
- Data level (`data_level`, text, required): Data level. One of: `AUCTION_ADVERTISER`, `AUCTION_CAMPAIGN`, `AUCTION_ADGROUP`, `AUCTION_AD`.
- Dimensions (`dimensions`, list, required): Dimensions. One or more of: `advertiser_id`, `campaign_id`, `adgroup_id`, `ad_id`, `stat_time_day`, `stat_time_hour`.
- Metrics (`metrics`, list): Metrics. One or more of: `spend`, `impressions`, `clicks`, `ctr`, `cpc`, `cpm`, `conversion`, `cost_per_conversion`, `conversion_rate`.
- Page (`page`, number): Page. At least 1.
- Page size (`page_size`, number): Page size. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": {
      "list": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get report task

Get report task in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Task ID (`task_id`, text, required): Task id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List ad groups

List ad groups in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Page (`page`, number): Page. At least 1.
- Page size (`page_size`, number): Page size. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": {
      "list": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List ads

List ads in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Page (`page`, number): Page. At least 1.
- Page size (`page_size`, number): Page size. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": {
      "list": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List campaigns

List campaigns in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Page (`page`, number): Page. At least 1.
- Page size (`page_size`, number): Page size. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": {
      "list": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List custom audiences

List custom audiences in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Page (`page`, number): Page. At least 1.
- Page size (`page_size`, number): Page size. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": {
      "list": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### List saved audiences

List saved audiences in TikTok Ads.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Page (`page`, number): Page. At least 1.
- Page size (`page_size`, number): Page size. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "data": {
      "list": []
    }
  },
  "has_more": false,
  "next_cursor": null
}
```

### Set ad status

Change ad status. ENABLE can start ad spending; DELETE is irreversible.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Ad IDs (`ad_ids`, list, required): Ad ids.
- Operation status (`operation_status`, text, required): Operation status. One of: `ENABLE`, `DISABLE`, `DELETE`.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Set adgroup status

Change ad group status. ENABLE can start ad spending; DELETE is irreversible.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Adgroup IDs (`adgroup_ids`, list, required): Adgroup ids.
- Operation status (`operation_status`, text, required): Operation status. One of: `ENABLE`, `DISABLE`, `DELETE`.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Set campaign status

Change campaign status. ENABLE can start ad spending; DELETE is irreversible.

**Inputs**

- Advertiser ID (`advertiser_id`, text): Advertiser ID. Leave empty to use the connected advertiser.
- Campaign IDs (`campaign_ids`, list, required): Campaign ids.
- Operation status (`operation_status`, text, required): Operation status. One of: `ENABLE`, `DISABLE`, `DELETE`.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```
