TikTok-Ads-API

获取查询建议/Get query suggestions

Changed on

[中文]

用途:

  • 获取广告搜索的热门查询建议
  • 了解当前流行的广告搜索关键词和趋势
  • 帮助发现新的广告创意方向和热点话题

参数:

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

注意:

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

返回内容说明:

  • query: 查询建议列表(字符串数组)

示例响应:

{
  "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:

{
  "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"
      ]
    }
  }
}
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)
  • Auth
    HTTP bearer

Request body

querystring

场景1留空返回热门建议;场景2传入关键词/Empty for scenario 1; input a keyword for scenario 2

countinteger

建议数量/Suggestion count

scenariointeger

场景类型:1热门建议,2关键词联想/1 popular, 2 related suggestions

country_codestring

可选国家/地区代码/Optional country code

cookiestring

自定义Cookie字符串(可选)/Custom Cookie string (optional)

Response

Successful Response

codeinteger

HTTP status code | HTTP状态码

request_idstring nullable

Unique request identifier | 唯一请求标识符

messagestring

Response message (EN-US) | 响应消息 (English)

message_zhstring

Response message (ZH-CN) | 响应消息 (中文)

supportstring

Support message | 支持消息

timestring

The time the response was generated | 生成响应的时间

time_stampinteger

The timestamp the response was generated | 生成响应的时间戳

time_zonestring

The timezone of the response time | 响应时间的时区

docsstring nullable

Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接

cache_messagestring nullable

Cache message (EN-US) | 缓存消息 (English)

cache_message_zhstring nullable

Cache message (ZH-CN) | 缓存消息 (中文)

cache_urlstring nullable

The URL to access the cached result | 访问缓存结果的 URL

routerstring

The endpoint that generated this response | 生成此响应的端点

paramsunknown
dataunknown

Changes