---
title: "抖音熱搜 API (V1)"
description: "搜索抖音內容，支持可選的關鍵詞、類別、視頻類型、排序、分頁、互動量和創作者粉絲數篩選。用於支持趨勢發現和活動研究。"
aiUsagePrompt: true
---

# 抖音熱搜 API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/douyin/hot-search/v1\"")'
  :summary='JSON.parse("\"熱搜 (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/douyin-tiktok-china/hot-search-v1-zh-hant.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"此 API 服務的訪問令牌。\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"keyword\",\"in\":\"query\",\"description\":\"可選的搜索關鍵詞。\",\"required\":false,\"schema\":{\"type\":\"string\"}},{\"name\":\"contentType\",\"in\":\"query\",\"description\":\"頂級內容類型。只能選擇一種內容類型。\\n\\n可選值：\\n- `ALL`：所有內容類型。\\n- `FASHION`：時尚。\\n- `TECHNOLOGY`：科技。\\n- `SCIENCE`：科學。\\n- `PHOTOGRAPHY`：攝影與攝像。\\n- `FOOD`：美食。\\n- `MOTHER_BABY`：母嬰。\\n- `PARENTING`：育兒。\\n- `DRAMA`：戲劇。\\n- `GAME`：遊戲。\\n- `AUTOMOTIVE`：汽車。\\n- `ANIMAL`：動物。\\n- `TRAVEL`：旅行。\\n- `DANCE`：舞蹈。\\n- `TRADITIONAL_CULTURE`：傳統文化。\\n- `ART`：藝術。\\n- `SPORTS`：體育。\\n- `MUSIC`：音樂。\\n- `LIFE_RECORD`：生活記錄。\\n- `HOME_LIVING`：家居生活。\\n- `LEISURE_ENTERTAINMENT`：休閒娛樂。\\n- `WORKPLACE`：職場。\\n- `AGRICULTURE`：農業。\\n- `CASUAL`：隨拍。\\n- `ACG`：動漫、漫畫與遊戲。\\n- `MOVIE`：電影。\\n- `TV_SERIES`：電視劇。\\n- `VARIETY_SHOW`：綜藝。\\n- `CELEBRITY`：明星。\\n- `HUMANITIES_SOCIAL_SCIENCE`：人文社科。\\n- `EDUCATION_CAMPUS`：教育校園。\\n- `EMOTION`：情感。\\n- `FINANCE`：財經。\\n- `PUBLIC_WELFARE`：公益。\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"ALL\",\"description\":\"頂級內容類型。\",\"enum\":[\"ALL\",\"FASHION\",\"TECHNOLOGY\",\"SCIENCE\",\"PHOTOGRAPHY\",\"FOOD\",\"MOTHER_BABY\",\"PARENTING\",\"DRAMA\",\"GAME\",\"AUTOMOTIVE\",\"ANIMAL\",\"TRAVEL\",\"DANCE\",\"TRADITIONAL_CULTURE\",\"ART\",\"SPORTS\",\"MUSIC\",\"LIFE_RECORD\",\"HOME_LIVING\",\"LEISURE_ENTERTAINMENT\",\"WORKPLACE\",\"AGRICULTURE\",\"CASUAL\",\"ACG\",\"MOVIE\",\"TV_SERIES\",\"VARIETY_SHOW\",\"CELEBRITY\",\"HUMANITIES_SOCIAL_SCIENCE\",\"EDUCATION_CAMPUS\",\"EMOTION\",\"FINANCE\",\"PUBLIC_WELFARE\"]}},{\"name\":\"videoType\",\"in\":\"query\",\"description\":\"視頻類型篩選。\\n\\n可選值：\\n- `ALL`：所有視頻類型。\\n- `XINGTU_VIDEO`：星圖商業視頻。\\n- `NATURAL_VIDEO`：自然視頻。\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"ALL\",\"description\":\"視頻類型篩選。\",\"enum\":[\"ALL\",\"XINGTU_VIDEO\",\"NATURAL_VIDEO\"]}},{\"name\":\"sortType\",\"in\":\"query\",\"description\":\"熱門內容結果的排序標準。\\n\\n可選值：\\n- `COMPREHENSIVE`：綜合排序。\\n- `HIGH_INTERACTION`：最高互動量。\\n- `HIGH_LIKE`：最高點贊量。\\n- `HIGH_COMMENT`：最高評論量。\\n- `HIGH_SHARE`：最高分享量。\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"COMPREHENSIVE\",\"description\":\"熱門內容結果的排序標準。\",\"enum\":[\"COMPREHENSIVE\",\"HIGH_INTERACTION\",\"HIGH_LIKE\",\"HIGH_COMMENT\",\"HIGH_SHARE\"]}},{\"name\":\"page\",\"in\":\"query\",\"description\":\"頁碼（從1開始）。每頁固定10條。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int32\",\"default\":1}},{\"name\":\"likeCountMin\",\"in\":\"query\",\"description\":\"最低原始點贊數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"likeCountMax\",\"in\":\"query\",\"description\":\"最高原始點贊數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"commentCountMin\",\"in\":\"query\",\"description\":\"最低原始評論數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"commentCountMax\",\"in\":\"query\",\"description\":\"最高原始評論數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"shareCountMin\",\"in\":\"query\",\"description\":\"最低原始分享數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"shareCountMax\",\"in\":\"query\",\"description\":\"最高原始分享數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"interactionCountMin\",\"in\":\"query\",\"description\":\"最低原始互動數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"interactionCountMax\",\"in\":\"query\",\"description\":\"最高原始互動數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"followerCountMin\",\"in\":\"query\",\"description\":\"最低原始創作者粉絲數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}},{\"name\":\"followerCountMax\",\"in\":\"query\",\"description\":\"最高原始創作者粉絲數。\",\"required\":false,\"schema\":{\"type\":\"integer\",\"format\":\"int64\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"好的\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":[\"object\",\"null\"],\"description\":\"抖音熱搜結果，包含接口返回的分頁信息及內容屬性。\",\"properties\":{\"base_resp\":{\"type\":\"object\",\"description\":\"結果中包含的搜索狀態信息。\",\"properties\":{\"status_code\":{\"type\":\"integer\",\"description\":\"內容搜索返回的狀態碼。\"},\"status_message\":{\"type\":\"string\",\"description\":\"內容搜索返回的狀態消息，可以為空字符串。\"}}},\"pagination\":{\"type\":\"object\",\"description\":\"此次搜索返回的分頁信息。\",\"properties\":{\"page\":{\"type\":\"integer\",\"description\":\"此批結果返回的頁碼。\"},\"limit\":{\"type\":\"integer\",\"description\":\"此次搜索返回的分頁大小。\"},\"total_count\":{\"type\":\"integer\",\"description\":\"此次查詢返回的結果總數。\"},\"has_more\":{\"type\":\"boolean\",\"description\":\"搜索結果是否報告還有下一頁。\"}}},\"content_list\":{\"type\":\"array\",\"description\":\"此搜索頁返回的熱門內容條目。\",\"items\":{\"type\":\"object\",\"description\":\"一條熱門內容條目。\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"以字符串返回的內容標識。\"},\"object_type\":{\"type\":\"integer\",\"description\":\"此條內容返回的對象類型代碼。\"},\"attribute_datas\":{\"type\":\"object\",\"description\":\"此條內容返回的屬性及指標。\",\"properties\":{\"item_title\":{\"type\":\"string\",\"description\":\"內容標題，可以為空字符串。\"},\"item_create_time\":{\"type\":\"string\",\"description\":\"內容創建時間，Unix 秒級時間戳，以字符串返回。\"},\"cover_image_uri\":{\"type\":\"string\",\"description\":\"接口返回的封面圖資源 URI。\"},\"core_user_id\":{\"type\":\"string\",\"description\":\"內容屬性中關聯的作者帳號標識。\"},\"is_star_item\":{\"type\":\"string\",\"description\":\"以字符串返回的星圖內容標記。\"},\"v2_first_tag_id\":{\"type\":\"string\",\"description\":\"以字符串返回的內容一級標籤標識。\"},\"v2_second_tag_id\":{\"type\":\"string\",\"description\":\"以字符串返回的內容二級標籤標識。\"},\"vv_all\":{\"type\":\"string\",\"description\":\"以字符串返回的內容播放次數。\"},\"like_cnt_all\":{\"type\":\"string\",\"description\":\"以字符串返回的內容點贊數。\"},\"comment_cnt_all\":{\"type\":\"string\",\"description\":\"以字符串返回的內容評論數。\"},\"share_cnt_all\":{\"type\":\"string\",\"description\":\"以字符串返回的內容分享數。\"},\"interact_cnt\":{\"type\":\"string\",\"description\":\"以字符串返回的互動次數。已覈對的回包中，此值等於點贊、評論和分享次數之和。\"},\"interact_rate\":{\"type\":\"string\",\"description\":\"以小數比例文本返回的互動率。已覈對的值與互動次數除以播放次數的結果近似一致。\"},\"finish_rate\":{\"type\":\"string\",\"description\":\"以小數比例文本返回的完播率。\"},\"quality_score\":{\"type\":\"string\",\"description\":\"接口以文本返回的內容質量分。\"},\"score\":{\"type\":\"string\",\"description\":\"接口以文本返回的搜索結果分值。\"}}},\"user_info\":{\"type\":\"object\",\"description\":\"內容關聯的作者資料。\",\"properties\":{\"core_user_id\":{\"type\":\"string\",\"description\":\"作者資料中返回的帳號標識。\"},\"name\":{\"type\":\"string\",\"description\":\"內容作者的展示名稱。\"},\"avatar_url\":{\"type\":\"string\",\"description\":\"作者頭像連結。\"},\"follower\":{\"type\":\"string\",\"description\":\"以字符串返回的作者粉絲數。\"},\"star_id\":{\"type\":\"string\",\"description\":\"存在時返回的星圖達人標識。\"}}}}}}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"請求參數或請求本文無效\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"訪問令牌無效或未激活\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"權限不足\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"請求速率或每日配額已超限\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"伺服器內部錯誤\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"服務暫時不可用\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"string\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"全球生產 API（預設）\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/douyin/hot-search/v1\"")' />

<p>搜索抖音內容，支持可選的關鍵詞、類別、視頻類型、排序、分頁、互動量和創作者粉絲數篩選。用於支持趨勢發現和活動研究。</p>

## 請求參數

<div class="api-doc-table api-doc-table--params">

| 參數名 | 位置 | 類型 | 必填 | 預設值 | 說明 |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | 是 | - | 此 API 服務的訪問令牌。 |
| <code>keyword</code> | query | <code>string</code> | 否 | - | 可選的搜索關鍵詞。 |
| <code>contentType</code> | query | <code>string</code> | 否 | <code>ALL</code> | 頂級內容類型。只能選擇一種內容類型。<br /><br><br>可選值：<br /><br>- <code>ALL</code>：所有內容類型。<br /><br>- <code>FASHION</code>：時尚。<br /><br>- <code>TECHNOLOGY</code>：科技。<br /><br>- <code>SCIENCE</code>：科學。<br /><br>- <code>PHOTOGRAPHY</code>：攝影與攝像。<br /><br>- <code>FOOD</code>：美食。<br /><br>- <code>MOTHER_BABY</code>：母嬰。<br /><br>- <code>PARENTING</code>：育兒。<br /><br>- <code>DRAMA</code>：戲劇。<br /><br>- <code>GAME</code>：遊戲。<br /><br>- <code>AUTOMOTIVE</code>：汽車。<br /><br>- <code>ANIMAL</code>：動物。<br /><br>- <code>TRAVEL</code>：旅行。<br /><br>- <code>DANCE</code>：舞蹈。<br /><br>- <code>TRADITIONAL_CULTURE</code>：傳統文化。<br /><br>- <code>ART</code>：藝術。<br /><br>- <code>SPORTS</code>：體育。<br /><br>- <code>MUSIC</code>：音樂。<br /><br>- <code>LIFE_RECORD</code>：生活記錄。<br /><br>- <code>HOME_LIVING</code>：家居生活。<br /><br>- <code>LEISURE_ENTERTAINMENT</code>：休閒娛樂。<br /><br>- <code>WORKPLACE</code>：職場。<br /><br>- <code>AGRICULTURE</code>：農業。<br /><br>- <code>CASUAL</code>：隨拍。<br /><br>- <code>ACG</code>：動漫、漫畫與遊戲。<br /><br>- <code>MOVIE</code>：電影。<br /><br>- <code>TV_SERIES</code>：電視劇。<br /><br>- <code>VARIETY_SHOW</code>：綜藝。<br /><br>- <code>CELEBRITY</code>：明星。<br /><br>- <code>HUMANITIES_SOCIAL_SCIENCE</code>：人文社科。<br /><br>- <code>EDUCATION_CAMPUS</code>：教育校園。<br /><br>- <code>EMOTION</code>：情感。<br /><br>- <code>FINANCE</code>：財經。<br /><br>- <code>PUBLIC_WELFARE</code>：公益。 |
| <code>videoType</code> | query | <code>string</code> | 否 | <code>ALL</code> | 視頻類型篩選。<br /><br><br>可選值：<br /><br>- <code>ALL</code>：所有視頻類型。<br /><br>- <code>XINGTU_VIDEO</code>：星圖商業視頻。<br /><br>- <code>NATURAL_VIDEO</code>：自然視頻。 |
| <code>sortType</code> | query | <code>string</code> | 否 | <code>COMPREHENSIVE</code> | 熱門內容結果的排序標準。<br /><br><br>可選值：<br /><br>- <code>COMPREHENSIVE</code>：綜合排序。<br /><br>- <code>HIGH_INTERACTION</code>：最高互動量。<br /><br>- <code>HIGH_LIKE</code>：最高點贊量。<br /><br>- <code>HIGH_COMMENT</code>：最高評論量。<br /><br>- <code>HIGH_SHARE</code>：最高分享量。 |
| <code>page</code> | query | <code>integer</code> | 否 | <code>1</code> | 頁碼（從1開始）。每頁固定10條。 |
| <code>likeCountMin</code> | query | <code>integer</code> | 否 | - | 最低原始點贊數。 |
| <code>likeCountMax</code> | query | <code>integer</code> | 否 | - | 最高原始點贊數。 |
| <code>commentCountMin</code> | query | <code>integer</code> | 否 | - | 最低原始評論數。 |
| <code>commentCountMax</code> | query | <code>integer</code> | 否 | - | 最高原始評論數。 |
| <code>shareCountMin</code> | query | <code>integer</code> | 否 | - | 最低原始分享數。 |
| <code>shareCountMax</code> | query | <code>integer</code> | 否 | - | 最高原始分享數。 |
| <code>interactionCountMin</code> | query | <code>integer</code> | 否 | - | 最低原始互動數。 |
| <code>interactionCountMax</code> | query | <code>integer</code> | 否 | - | 最高原始互動數。 |
| <code>followerCountMin</code> | query | <code>integer</code> | 否 | - | 最低原始創作者粉絲數。 |
| <code>followerCountMax</code> | query | <code>integer</code> | 否 | - | 最高原始創作者粉絲數。 |

</div>

## 程式碼範例

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/douyin/hot-search/v1?token=YOUR_API_KEY'
```

```text [🤖 AI 提示詞]
我想使用 JustOneAPI 提供的“熱搜 (V1)”接口。
接入地址: https://api.justoneapi.com。
接口路徑: /api/douyin/hot-search/v1?token=YOUR_API_KEY
接口地址: BASE_URL + /api/douyin/hot-search/v1?token=YOUR_API_KEY
HTTP 方法: GET
身份驗證: 在 URL 中傳入 token 查詢參數。
OpenAPI 定義: https://docs.justoneapi.com/openapi/douyin-tiktok-china/hot-search-v1-zh-hant.json

請求參數說明:
- token (query): 此 API 服務的訪問令牌。 (必填)
- keyword (query): 可選的搜索關鍵詞。
- contentType (query): 頂級內容類型。只能選擇一種內容類型。

可選值：
- `ALL`：所有內容類型。
- `FASHION`：時尚。
- `TECHNOLOGY`：科技。
- `SCIENCE`：科學。
- `PHOTOGRAPHY`：攝影與攝像。
- `FOOD`：美食。
- `MOTHER_BABY`：母嬰。
- `PARENTING`：育兒。
- `DRAMA`：戲劇。
- `GAME`：遊戲。
- `AUTOMOTIVE`：汽車。
- `ANIMAL`：動物。
- `TRAVEL`：旅行。
- `DANCE`：舞蹈。
- `TRADITIONAL_CULTURE`：傳統文化。
- `ART`：藝術。
- `SPORTS`：體育。
- `MUSIC`：音樂。
- `LIFE_RECORD`：生活記錄。
- `HOME_LIVING`：家居生活。
- `LEISURE_ENTERTAINMENT`：休閒娛樂。
- `WORKPLACE`：職場。
- `AGRICULTURE`：農業。
- `CASUAL`：隨拍。
- `ACG`：動漫、漫畫與遊戲。
- `MOVIE`：電影。
- `TV_SERIES`：電視劇。
- `VARIETY_SHOW`：綜藝。
- `CELEBRITY`：明星。
- `HUMANITIES_SOCIAL_SCIENCE`：人文社科。
- `EDUCATION_CAMPUS`：教育校園。
- `EMOTION`：情感。
- `FINANCE`：財經。
- `PUBLIC_WELFARE`：公益。
- videoType (query): 視頻類型篩選。

可選值：
- `ALL`：所有視頻類型。
- `XINGTU_VIDEO`：星圖商業視頻。
- `NATURAL_VIDEO`：自然視頻。
- sortType (query): 熱門內容結果的排序標準。

可選值：
- `COMPREHENSIVE`：綜合排序。
- `HIGH_INTERACTION`：最高互動量。
- `HIGH_LIKE`：最高點贊量。
- `HIGH_COMMENT`：最高評論量。
- `HIGH_SHARE`：最高分享量。
- page (query): 頁碼（從1開始）。每頁固定10條。
- likeCountMin (query): 最低原始點贊數。
- likeCountMax (query): 最高原始點贊數。
- commentCountMin (query): 最低原始評論數。
- commentCountMax (query): 最高原始評論數。
- shareCountMin (query): 最低原始分享數。
- shareCountMax (query): 最高原始分享數。
- interactionCountMin (query): 最低原始互動數。
- interactionCountMax (query): 最高原始互動數。
- followerCountMin (query): 最低原始創作者粉絲數。
- followerCountMax (query): 最高原始創作者粉絲數。

返回格式: 請根據實際 Content-Type 安全處理 JSON 或文本回應。

回應處理與錯誤代碼：
1. 需通過返回體中的 "code" 欄位判斷業務結果（code 為 0 表示成功）。
2. 逾時建議：建議將請求逾時時間設置為 120 秒；如果 120 秒偏長，請至少設置為 60 秒，但可能會有少量請求因逾時而未接收到結果。
3. 業務碼說明：
   - 0: 成功
   - 100: Token 無效或已失效
   - 301: 採集失敗，請重試
   - 302: 超出速率限制
   - 303: 超出每日配額
   - 400: 參數錯誤
   - 500: 內部伺服器錯誤
   - 600: 權限不足
   - 601: 帳戶餘額不足
   - 602: TOKEN 限額超限
4. code 601 表示帳戶共享餘額不足。code 602 表示當前 API TOKEN 自身的累計消費上限已達到。TOKEN 限額不是資金劃撥，多個 TOKEN 仍共享同一個帳戶餘額。

請幫我用我擅長的編程語言寫一個腳本來呼叫這個接口，並處理返回結果。
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # 由 OpenAPI servers 提供

url = BASE_URL + "/api/douyin/hot-search/v1?token=YOUR_API_KEY"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // 由 OpenAPI servers 提供
const url = BASE_URL + "/api/douyin/hot-search/v1?token=YOUR_API_KEY";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // 由 OpenAPI servers 提供
        final String url = BASE_URL + "/api/douyin/hot-search/v1?token=YOUR_API_KEY";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // 由 OpenAPI servers 提供

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/douyin/hot-search/v1?token=YOUR_API_KEY"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // 由 OpenAPI servers 提供
$url = $BASE_URL . '/api/douyin/hot-search/v1?token=YOUR_API_KEY';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/douyin-tiktok-china/hot-search-v1-zh-hant.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI 定義 (JSON)]</a>
</div>

## 返回欄位

業務成功時（`code = 0`）的主要返回欄位。

<div class="api-doc-table api-doc-table--response">

| 欄位路徑 | 類型 | 說明 |
| --- | --- | --- |
| <code>data</code> | <code>object &#124; null</code> | 抖音熱搜結果，包含接口返回的分頁信息及內容屬性。 |
| <code>data.base_resp</code> | <code>object</code> | 結果中包含的搜索狀態信息。 |
| <code>data.base_resp.status_code</code> | <code>integer</code> | 內容搜索返回的狀態碼。 |
| <code>data.base_resp.status_message</code> | <code>string</code> | 內容搜索返回的狀態消息，可以為空字符串。 |
| <code>data.pagination</code> | <code>object</code> | 此次搜索返回的分頁信息。 |
| <code>data.pagination.page</code> | <code>integer</code> | 此批結果返回的頁碼。 |
| <code>data.pagination.limit</code> | <code>integer</code> | 此次搜索返回的分頁大小。 |
| <code>data.pagination.total_count</code> | <code>integer</code> | 此次查詢返回的結果總數。 |
| <code>data.pagination.has_more</code> | <code>boolean</code> | 搜索結果是否報告還有下一頁。 |
| <code>data.content_list</code> | <code>array</code> | 此搜索頁返回的熱門內容條目。 |
| <code>data.content_list[]</code> | <code>object</code> | 一條熱門內容條目。 |
| <code>data.content_list[].id</code> | <code>string</code> | 以字符串返回的內容標識。 |
| <code>data.content_list[].object_type</code> | <code>integer</code> | 此條內容返回的對象類型代碼。 |
| <code>data.content_list[].attribute_datas</code> | <code>object</code> | 此條內容返回的屬性及指標。 |
| <code>data.content_list[].attribute_datas.item_title</code> | <code>string</code> | 內容標題，可以為空字符串。 |
| <code>data.content_list[].attribute_datas.item_create_time</code> | <code>string</code> | 內容創建時間，Unix 秒級時間戳，以字符串返回。 |
| <code>data.content_list[].attribute_datas.cover_image_uri</code> | <code>string</code> | 接口返回的封面圖資源 URI。 |
| <code>data.content_list[].attribute_datas.core_user_id</code> | <code>string</code> | 內容屬性中關聯的作者帳號標識。 |
| <code>data.content_list[].attribute_datas.is_star_item</code> | <code>string</code> | 以字符串返回的星圖內容標記。 |
| <code>data.content_list[].attribute_datas.v2_first_tag_id</code> | <code>string</code> | 以字符串返回的內容一級標籤標識。 |
| <code>data.content_list[].attribute_datas.v2_second_tag_id</code> | <code>string</code> | 以字符串返回的內容二級標籤標識。 |
| <code>data.content_list[].attribute_datas.vv_all</code> | <code>string</code> | 以字符串返回的內容播放次數。 |
| <code>data.content_list[].attribute_datas.like_cnt_all</code> | <code>string</code> | 以字符串返回的內容點贊數。 |
| <code>data.content_list[].attribute_datas.comment_cnt_all</code> | <code>string</code> | 以字符串返回的內容評論數。 |
| <code>data.content_list[].attribute_datas.share_cnt_all</code> | <code>string</code> | 以字符串返回的內容分享數。 |
| <code>data.content_list[].attribute_datas.interact_cnt</code> | <code>string</code> | 以字符串返回的互動次數。已覈對的回包中，此值等於點贊、評論和分享次數之和。 |
| <code>data.content_list[].attribute_datas.interact_rate</code> | <code>string</code> | 以小數比例文本返回的互動率。已覈對的值與互動次數除以播放次數的結果近似一致。 |
| <code>data.content_list[].attribute_datas.finish_rate</code> | <code>string</code> | 以小數比例文本返回的完播率。 |
| <code>data.content_list[].attribute_datas.quality_score</code> | <code>string</code> | 接口以文本返回的內容質量分。 |
| <code>data.content_list[].attribute_datas.score</code> | <code>string</code> | 接口以文本返回的搜索結果分值。 |
| <code>data.content_list[].user_info</code> | <code>object</code> | 內容關聯的作者資料。 |
| <code>data.content_list[].user_info.core_user_id</code> | <code>string</code> | 作者資料中返回的帳號標識。 |
| <code>data.content_list[].user_info.name</code> | <code>string</code> | 內容作者的展示名稱。 |
| <code>data.content_list[].user_info.avatar_url</code> | <code>string</code> | 作者頭像連結。 |
| <code>data.content_list[].user_info.follower</code> | <code>string</code> | 以字符串返回的作者粉絲數。 |
| <code>data.content_list[].user_info.star_id</code> | <code>string</code> | 存在時返回的星圖達人標識。 |

</div>

## 回應示例

<ApiExampleSection :api='JSON.parse("\"/api/douyin/hot-search/v1\"")' />

