# 搜索-获取搜索关键词推荐V2

`POST /api/douyin-app/search_suggest_v2`

- 获取抖音搜索关键词的联想推荐结果（V2 版本）。
- 根据用户已输入的关键词前缀，返回相关搜索词建议，用于实现搜索框实时补全。
- 返回条数由抖音决定，不支持指定数量。
- history_words 为可选项，传入用户此前搜索过的词（英文逗号分隔）会影响联想词排序。
- 相比 V1，V2 直接给出纯词列表 words，无需再从原始结构中提取。

## 鉴权

源接口未声明鉴权要求，请结合接入指南确认。

## 请求参数



| 字段 | 位置 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| Authorization | header | string | 是 | 在 Header 添加参数 Authorization，其值为在 Bearer 之后拼接 apikey · default: "Bearer YOUR_API_KEY" |
| Content-Type | header | string | 是 |  · default: "application/json" |

## 请求体 · application/json



| 字段 | 位置 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| keyword | body | string | 是 |  |
| history_words | body | string | 否 |  |

```json
{
  "type" : "object",
  "properties" : {
    "keyword" : {
      "type" : "string",
      "title" : "关键词"
    },
    "history_words" : {
      "type" : "string",
      "title" : "可选，历史搜索词"
    }
  },
  "required" : [ "keyword" ]
}
```

```json
{
  "keyword" : "罗永浩",
  "history_words" : ""
}
```

## 响应 200 · application/json



| 字段 | 位置 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- | --- |
| code | body | integer | 是 |  |
| message | body | string | 是 |  |
| data | body | object | 是 |  |

```json
{
  "type" : "object",
  "properties" : {
    "code" : {
      "type" : "integer"
    },
    "message" : {
      "type" : "string"
    },
    "data" : {
      "type" : "object",
      "properties" : { }
    }
  },
  "required" : [ "code", "message", "data" ]
}
```

```json
{
  "code" : 200,
  "message" : "success",
  "data" : {
    "words" : [ "罗永浩年轻时的照片", "罗永浩手机", "罗永浩是干嘛的", "罗永浩没有孩子吗", "罗永浩是谁", "罗永浩脱口秀", "罗永浩大杯超大杯", "罗永浩的十字路口", "罗永浩交个朋友", "罗永浩直播间茶叶" ],
    "items" : [ {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩年轻时的照片",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6746395276853908750",
        "words_position" : 0,
        "words_content" : "罗永浩年轻时的照片",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    }, {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩手机",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6579908122054235406",
        "words_position" : 1,
        "words_content" : "罗永浩手机",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    }, {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩是干嘛的",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6604839899168249101",
        "words_position" : 2,
        "words_content" : "罗永浩是干嘛的",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    }, {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩没有孩子吗",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6766306518238237965",
        "words_position" : 3,
        "words_content" : "罗永浩没有孩子吗",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    }, {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩是谁",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6595880903623333128",
        "words_position" : 4,
        "words_content" : "罗永浩是谁",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    }, {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩脱口秀",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6542975529320994055",
        "words_position" : 5,
        "words_content" : "罗永浩脱口秀",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    }, {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩大杯超大杯",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6757172907912205571",
        "words_position" : 6,
        "words_content" : "罗永浩大杯超大杯",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    }, {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩的十字路口",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6862363663991330055",
        "words_position" : 7,
        "words_content" : "罗永浩的十字路口",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    }, {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩交个朋友",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6585116150965769476",
        "words_position" : 8,
        "words_content" : "罗永浩交个朋友",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    }, {
      "pos" : [ {
        "begin" : 0,
        "end" : 2
      } ],
      "content" : "罗永浩直播间茶叶",
      "sug_type" : "",
      "word_record" : {
        "group_id" : "6845280804671591683",
        "words_position" : 9,
        "words_content" : "罗永浩直播间茶叶",
        "words_source" : "sug"
      },
      "extra_info" : {
        "poi_id" : "",
        "poi_location_recall_log_id" : "202611091727037D92C5087E2A9B1B2389",
        "search_params" : "{\"sug_poi_id\":\"\"}"
      }
    } ],
    "raw_key" : "sug_list"
  }
}
```

## cURL

```sh
curl --globoff --request POST 'https://api.getoneapi.com/api/douyin-app/search_suggest_v2' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "keyword" : "罗永浩",
  "history_words" : ""
}'
```

