---
title: "Douyin (TikTok ประเทศจีน) การค้นหาแข่งขัน API (V1)"
description: "ค้นหาเนื้อหาบน Douyin (TikTok China) โดยใช้คำสำคัญ, หมวดหมู่, ประเภทวิดีโอ, อันดับ, การจัดลำดับหน้า, ความน่าสนใจ, และตัวกรองของ Creator-follower ใช้เพื่อการค้นหาแนวโน้มและการวิจัยแคมเปญ"
lastUpdated: false
aiUsagePrompt: true
---

# Douyin \(TikTok ประเทศจีน\) การค้นหาแข่งขัน 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-th.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`: ซีรีส์ TV\\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\":\"ประเภทเนื้อหาการค้นหาโดนใจของ Douyin\",\"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`: วิดีโอโฆษณาของ Xingtu\\n- `NATURAL_VIDEO`: วิดีโอธรรมชาติ\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"ALL\",\"description\":\"ประเภทวิดีโอการค้นหาโดนใจของ Douyin\",\"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\":\"ประเภทการจัดลำดับการค้นหาโดนใจของ Douyin\",\"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\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":[\"object\",\"null\"],\"description\":\"ผลการค้นหาสินค้าที่น่าสนใจของ Douyin พร้อมข้อมูลการแสดงผลและคุณสมบัติของเนื้อหาที่รายงาน。\",\"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\":\"ข้อมูลเนื้อหาแบบ One hot-content.\",\"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\":\"ตัวระบุสัญลักษณ์เนื้อหา Xingtu ในรูปแบบสตริง.\"},\"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\":\"URL ของภาพโปรไฟล์ของผู้เขียน.\"},\"follower\":{\"type\":\"string\",\"description\":\"จำนวนผู้ติดตามของผู้เขียนในรูปแบบสตริง.\"},\"star_id\":{\"type\":\"string\",\"description\":\"ตัวระบุผู้สร้าง Xingtu เมื่อมีการรายงาน\"}}}}}}}}}},\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"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\":\"ท่อนำข้อมูลหรือ access token ที่ไม่ถูกต้องหรือไม่มีการใช้งาน\",\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"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>ค้นหาเนื้อหาบน Douyin (TikTok China) โดยใช้คำสำคัญ, หมวดหมู่, ประเภทวิดีโอ, อันดับ, การจัดลำดับหน้า, ความน่าสนใจ, และตัวกรองของ Creator-follower ใช้เพื่อการค้นหาแนวโน้มและการวิจัยแคมเปญ</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>: ซีรีส์ TV<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>: วิดีโอโฆษณาของ Xingtu<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]
ฉันต้องการใช้ API "การค้นหาแข่งขัน (V1)" จาก JustOneAPI.
URL หลัก: https://api.justoneapi.com.
เส้นทาง API: /api/douyin/hot-search/v1?token=YOUR_API_KEY
เอนด์พอยต์ API: BASE_URL + /api/douyin/hot-search/v1?token=YOUR_API_KEY
เมธอด HTTP: GET
การยืนยันตัวตน: เพิ่มพารามิเตอร์ "token" เข้าไปใน URL.
คำนิยาม OpenAPI: https://docs.justoneapi.com/openapi/douyin-tiktok-china/hot-search-v1-th.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`: ซีรีส์ TV
- `VARIETY_SHOW`: รายการวาไรตี้
- `CELEBRITY`: คนดัง
- `HUMANITIES_SOCIAL_SCIENCE`: มนุษยศาสตร์และสังคมศาสตร์
- `EDUCATION_CAMPUS`: การศึกษาและชีวิตในสถานศึกษา
- `EMOTION`: อารมณ์
- `FINANCE`: การเงิน
- `PUBLIC_WELFARE`: กิจกรรมสาธารณประโยชน์
- videoType (query): ตัวกรองประเภทวิดีโอ

ค่าที่มีให้:
- `ALL`: ทุกประเภทวิดีโอ
- `XINGTU_VIDEO`: วิดีโอโฆษณาของ Xingtu
- `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): จำนวนผู้ติดตามของผู้สร้างแบบดิบสูงสุด

รูปแบบที่ส่งกลับ: จัดการ JSON หรือข้อความอย่างปลอดภัยตามค่า Content-Type ที่ได้รับจริง

การจัดการผลตอบกลับและรหัสข้อผิดพลาด:
1. ตรวจสอบผลการทำงานจากฟิลด์ "code" ในผลตอบกลับ (รหัส 0 หมายถึงสำเร็จ)
2. แนะนำให้ตั้งระยะเวลารอ 120 วินาที หาก 120 วินาทีนานเกินไป ให้ตั้งอย่างน้อย 60 วินาที แต่คำขอบางรายการอาจหมดเวลาก่อนได้รับผลลัพธ์
3. รหัสผลลัพธ์:
   - 0: สำเร็จ
   - 100: โทเคนไม่ถูกต้องหรือถูกปิดใช้งาน
   - 301: ดึงข้อมูลไม่สำเร็จ โปรดลองอีกครั้ง
   - 302: เกินขีดจำกัดอัตราการเรียก
   - 303: ใช้โควตารายวันครบแล้ว
   - 400: พารามิเตอร์ไม่ถูกต้อง
   - 500: ข้อผิดพลาดภายในเซิร์ฟเวอร์
   - 600: ไม่มีสิทธิ์เข้าถึง
   - 601: ยอดเงินคงเหลือไม่เพียงพอ
   - 602: ถึงวงเงินของโทเคนแล้ว
4. รหัส 601 หมายถึงยอดเงินที่ใช้ร่วมกันของบัญชีไม่เพียงพอ รหัส 602 หมายถึงโทเคน API ถึงวงเงินสะสมของตนเองแล้ว การกำหนดวงเงินโทเคนจะไม่โอนเงินออกจากยอดเงินที่ใช้ร่วมกันของบัญชี

กรุณาช่วยเขียนสคริปต์ในภาษาโปรแกรมที่ฉันชื่นชอบเพื่อเรียกใช้ API และจัดการการตอบกลับ.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # ให้โดยเซิร์ฟเวอร์ OpenAPI

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
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
        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

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
$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-th.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> | ผลการค้นหาสินค้าที่น่าสนใจของ Douyin พร้อมข้อมูลการแสดงผลและคุณสมบัติของเนื้อหาที่รายงาน。 |
| <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> | ข้อมูลเนื้อหาแบบ One hot-content. |
| <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> | ตัวระบุสัญลักษณ์เนื้อหา Xingtu ในรูปแบบสตริง. |
| <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> | URL ของภาพโปรไฟล์ของผู้เขียน. |
| <code>data.content_list[].user_info.follower</code> | <code>string</code> | จำนวนผู้ติดตามของผู้เขียนในรูปแบบสตริง. |
| <code>data.content_list[].user_info.star_id</code> | <code>string</code> | ตัวระบุผู้สร้าง Xingtu เมื่อมีการรายงาน |

</div>

## ตัวอย่างผลการตอบกลับ

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

