获取图像识别搜索/Fetch vision search (image-based search)
Douyinapi
About
获取图像识别搜索/Fetch vision search (image-based search)
Documentation
获取图像识别搜索/Fetch vision search (image-based search)
[中文]
用途:
- 抖音APP图像识别搜索(以图搜图/视觉搜索)。
- 通过图片进行视觉搜索,返回相似的视频/图文内容。
image_uri可从抖音其他接口的返回数据中获取(如视频详情、搜索结果、用户主页等接口的图片uri字段)。
备注:
- 初次请求时
cursor传入 0,search_id传空字符串。 - 翻页时需从上一次响应中获取
cursor和search_id字段值。 image_uri是必填参数,需要先通过抖音图片上传接口获取,或在单一视频接口中获取,其他途径如各类搜索接口返回的图片URI均可使用。detection表示图片中需要识别的区域,格式为 "x1,y1,x2,y2",默认 "0.1,0.1,0.9,0.9" 表示全图。
参数:
- image_uri: 图片URI,通过图片上传接口获取,或在单一视频接口中获取,其他途径如各类搜索接口返回的图片URI均可使用。(必填)
- cursor: 翻页游标(首次请求传 0)
- search_id: 搜索ID(首次请求传空,翻页时从上次响应获取)
- search_source: 搜索来源
graphic_detail: 图片详情页搜索(默认)visual_normal_search: 带关键词追加搜索(需要传入 user_query)
- detection: 检测区域坐标,格式为 "x1,y1,x2,y2"
- detection_index: 检测索引,默认 0
- user_query: 搜索关键词,仅当 search_source="visual_normal_search" 时使用
- aweme_id: 原视频ID,仅当 search_source="visual_normal_search" 时使用
请求体示例:
基础图片搜索:
payload = {
"image_uri": "20251221204239F0C21D7645F172B6085C",
"cursor": 0,
"search_id": "",
"search_source": "graphic_detail",
"detection": "0.1,0.1,0.9,0.9",
"detection_index": 0
}
带关键词的追加搜索:
payload = {
"image_uri": "20251221204239F0C21D7645F172B6085C",
"cursor": 0,
"search_id": "2025122120452038252994F25A4BAEB043",
"search_source": "visual_normal_search",
"detection": "0.1,0.1,0.9,0.9",
"detection_index": 0,
"user_query": "游戏",
"aweme_id": "7523532488087817529"
}
返回(部分常用字段,实际返回字段更多,一切以实际响应为准):
status_code: 响应状态码(0为成功)cursor: 下一页游标has_more: 是否还有更多数据(1=有,0=无)search_id: 搜索ID,翻页时使用data[]: 搜索结果列表type: 结果类型aweme_info: 视频/图文详细信息aweme_id: 视频IDdesc: 视频描述author: 作者信息video: 视频播放信息statistics: 互动统计
[English]
Purpose:
- Douyin APP vision search (image-based search / reverse image search).
- Search for similar videos/images using an image.
- The
image_urican be obtained from other Douyin API responses (such as video details, search results, user profile, etc.), and used directly for vision search.
Notes:
- Set
cursorto 0 andsearch_idto empty string for the first request. - For pagination, obtain
cursorandsearch_idvalues from the previous response. image_uriis a required parameter. It can be obtained from Douyin API responses that contain image information, such as video details API, general search API, user profile API, etc. These responses typically include image URIs that can be used directly for vision search.detectionrepresents the area to be recognized in the image, format "x1,y1,x2,y2", default "0.1,0.1,0.9,0.9" means the whole image.
Parameters:
- image_uri: Image URI obtained from other Douyin API responses (e.g., video details, search results, user profile) (required)
- cursor: Pagination cursor (0 for the first page)
- search_id: Search ID (empty for first request, obtained from previous response for pagination)
- search_source: Search source
graphic_detail: Image detail page search (default)visual_normal_search: Search with keyword append (requires user_query)
- detection: Detection area coordinates, format "x1,y1,x2,y2"
- detection_index: Detection index, default 0
- user_query: Search keyword, only used when search_source="visual_normal_search"
- aweme_id: Original video ID, only used when search_source="visual_normal_search"
Request Body Example:
Basic image search:
payload = {
"image_uri": "20251221204239F0C21D7645F172B6085C",
"cursor": 0,
"search_id": "",
"search_source": "graphic_detail",
"detection": "0.1,0.1,0.9,0.9",
"detection_index": 0
}
Search with keyword append:
payload = {
"image_uri": "20251221204239F0C21D7645F172B6085C",
"cursor": 0,
"search_id": "2025122120452038252994F25A4BAEB043",
"search_source": "visual_normal_search",
"detection": "0.1,0.1,0.9,0.9",
"detection_index": 0,
"user_query": "game",
"aweme_id": "7523532488087817529"
}
Response (common fields, actual response may contain more fields):
status_code: Response status code (0 means success)cursor: Cursor for next pagehas_more: Whether more data is available (1=Yes, 0=No)search_id: Search ID for paginationdata[]: List of search resultstype: Result typeaweme_info: Video/image post detailsaweme_id: Video IDdesc: Video descriptionauthor: Author informationvideo: Video playback informationstatistics: Interaction statistics
Imported from a validated TikHub OpenAPI document. Pricing must be reviewed before enabling.
Try 获取图像识别搜索/Fetch vision search (image-based search)
Test this model in the Sandbase Playground with your own prompts.
Open in PlaygroundRelated Models
获取话题搜索 V1/Fetch hashtag search V1Douyinapi获取话题搜索 V2/Fetch hashtag search V2Douyinapi获取话题推荐搜索/Fetch hashtag suggestionsDouyinapi获取讨论搜索/Fetch discussion searchDouyinapi获取经验搜索/Fetch experience searchDouyinapi获取综合搜索 V1/Fetch general search V1Douyinapi获取综合搜索 V2/Fetch general search V2Douyinapi获取图片搜索/Fetch image searchDouyinapi