---
title: "获取查询建议/Get query suggestions"
method: POST
path: "/api/v1/tiktok/ads/get_query_suggestions"
tags: ["TikTok-Ads-API"]
---

# 获取查询建议/Get query suggestions

`POST /api/v1/tiktok/ads/get_query_suggestions`

## Request

- Base URL: `https://api.tikhub.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tikhub.io/api/v1/tiktok/ads/get_query_suggestions`
- Auth: HTTP bearer

# [中文]
### 用途:
- 获取广告搜索的热门查询建议
- 了解当前流行的广告搜索关键词和趋势
- 帮助发现新的广告创意方向和热点话题

### 参数:
- query: 场景1留空返回热门建议；场景2传入关键词返回联想建议
- count: 返回的建议数量，默认50
- scenario: 场景类型，1为热门建议，2为关键词联想
- country_code: 国家/地区代码，可选
- cookie: 自定义Cookie字符串，可选参数，可以使用自己的Cookie来获取更多数据

### 注意:
- 如果您应用了一个或多个筛选条件后没有返回任何结果，请尝试调整或移除部分筛选条件。TikTok 创作者数据集仅收录部分热门数据，不一定包含全量数据。

### 返回内容说明:
- `query`: 查询建议列表（字符串数组）

### 示例响应:
```json
{
  "code": 200,
  "router": "/api/v1/tiktok/ads/get_query_suggestions",
  "params": {
    "count": "50",
    "scenario": "1"
  },
  "data": {
    "code": 0,
    "msg": "OK",
    "data": {
      "query": [
        "shop now",
        "50% off"
      ]
    }
  }
}
```

# [English]
### Purpose:
- Get popular query suggestions for ad search
- Understand current popular ad search keywords and trends
- Help discover new creative directions and hot topics

### Parameters:
- query: Leave empty for popular suggestions in scenario 1; provide a keyword for related suggestions in scenario 2
- count: Number of suggestions to return, default 50
- scenario: Scenario type: 1 for popular suggestions, 2 for related suggestions
- country_code: Optional country code
- cookie: Custom Cookie string, optional parameter, can be used to fetch more data

### Note:
- If you've applied one or more filters and there's no result returned, try adjusting or removing some of them. The TikTok Creator dataset only includes a selection of popular records and may not contain the complete set of data.

### Return Description:
- `query`: Query suggestions list (string array)

### Example Response:
```json
{
  "code": 200,
  "router": "/api/v1/tiktok/ads/get_query_suggestions",
  "params": {
    "count": "50",
    "scenario": "1"
  },
  "data": {
    "code": 0,
    "msg": "OK",
    "data": {
      "query": [
        "shop now",
        "50% off"
      ]
    }
  }
}
```

## Request body

- BodyGetQuerySuggestionsApiV1TiktokAdsGetQuerySuggestionsPost
  - `query` string: 场景1留空返回热门建议；场景2传入关键词/Empty for scenario 1; input a keyword for scenario 2
  - `count` integer: 建议数量/Suggestion count
  - `scenario` integer: 场景类型：1热门建议，2关键词联想/1 popular, 2 related suggestions
  - `country_code` string: 可选国家/地区代码/Optional country code
  - `cookie` string: 自定义Cookie字符串（可选）/Custom Cookie string (optional)

## Response `200`

Successful Response

- ResponseModel
  - `code` integer: HTTP status code | HTTP状态码
  - `request_id` string, nullable: Unique request identifier | 唯一请求标识符
  - `message` string: Response message (EN-US) | 响应消息 (English)
  - `message_zh` string: Response message (ZH-CN) | 响应消息 (中文)
  - `support` string: Support message | 支持消息
  - `time` string: The time the response was generated | 生成响应的时间
  - `time_stamp` integer: The timestamp the response was generated | 生成响应的时间戳
  - `time_zone` string: The timezone of the response time | 响应时间的时区
  - `docs` string, nullable: Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接
  - `cache_message` string, nullable: Cache message (EN-US) | 缓存消息 (English)
  - `cache_message_zh` string, nullable: Cache message (ZH-CN) | 缓存消息 (中文)
  - `cache_url` string, nullable: The URL to access the cached result | 访问缓存结果的 URL
  - `router` string: The endpoint that generated this response | 生成此响应的端点
  - `params` unknown
  - `data` unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-08** `96a122a5f220`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-09-01** `50f9ec6e1cd3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/changes/api/v1/tiktok/ads/get_query_suggestions/post.md)

---

[API](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi.md) - [All operations](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/llms.txt) - [OpenAPI document](https://skmtc.dev/tikhub/apis/tikhub-douyin-tiktok-xiaohongshu-lemon8-bilibili-kuaishou-pi/revisions/86a3483c705a?raw)
