Fetch video search V1 API
Fetch video search V1
USD 0.010000 / appel réussi
ID public: social.tikhub.douyin.search.fetch.video.search.v1 · Version 1
Tarifs
USD 0.010000 / appel réussi
Démarrage rapide
Recherchez cet outil avec votre clé API, puis inspectez le provider et le endpoint renvoyés avant de lancer une exécution.
Définissez GLOOP_API_BASE sur votre adresse API et GLOOP_API_KEY sur votre clé côté serveur.
curl
curl --fail-with-body "${GLOOP_API_BASE%/}/v1/discover" \
-H "Authorization: Bearer $GLOOP_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"limit": 5,
"query": "Fetch video search V1"
}'Python
import os, json, urllib.request
url = os.environ['GLOOP_API_BASE'].rstrip('/') + "/v1/discover"
headers = {'Authorization': 'Bearer ' + os.environ['GLOOP_API_KEY']}
headers['Content-Type'] = 'application/json'
data = "{\n \"limit\": 5,\n \"query\": \"Fetch video search V1\"\n}".encode('utf-8')
request = urllib.request.Request(url, data=data, headers=headers)
with urllib.request.urlopen(request) as response:
print(json.load(response))Node.js
const url = process.env.GLOOP_API_BASE.replace(/\/$/, '') + "/v1/discover";
const headers = { Authorization: `Bearer ${process.env.GLOOP_API_KEY}` };
headers['Content-Type'] = 'application/json';
const response = await fetch(url, { method: 'POST', headers, body: JSON.stringify({
"limit": 5,
"query": "Fetch video search V1"
}) });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Documentation API des outils · POST /v1/inspectSchéma d'entrée
{
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"backtrace": {
"description": "翻页回溯标识,用于翻页,从上一次请求返回的响应中获取 / Backtrace for pagination, obtained from the last response",
"title": "Backtrace",
"type": "string"
},
"content_type": {
"description": "内容类型:0=不限 1=视频 2=图片 3=文章 / Content type: 0=All, 1=Video, 2=Picture, 3=Article",
"title": "Content Type",
"type": "string"
},
"cursor": {
"description": "偏移游标,用于翻页,从上一次请求返回的响应中获取 / Offset cursor for pagination, obtained from the last response",
"title": "Cursor",
"type": "integer"
},
"filter_duration": {
"description": "视频时长过滤:0=不限 0-1=一分钟以内 1-5=一到五分钟 5-10000=五分钟以上 / Video duration filter: 0=Unlimited, 0-1=Within 1 minute, 1-5=1 to 5 minutes, 5-10000=More than 5 minutes",
"title": "Filter Duration",
"type": "string"
},
"keyword": {
"description": "关键词 / Keyword",
"title": "Keyword",
"type": "string"
},
"publish_time": {
"description": "发布时间筛选:0=不限 1=最近一天 7=最近一周 180=最近半年 / Publish time filter: 0=Unlimited, 1=Last day, 7=Last week, 180=Last half year",
"title": "Publish Time",
"type": "string"
},
"search_id": {
"description": "搜索ID,用于翻页,从上一次请求返回的响应中获取 / Search ID for pagination, obtained from the last response",
"title": "Search Id",
"type": "string"
},
"sort_type": {
"description": "排序方式:0=综合排序 1=最多点赞 2=最新发布 / Sort type: 0=Comprehensive, 1=Most Likes, 2=Latest",
"title": "Sort Type",
"type": "string"
}
},
"title": "VideoSearchV1Request",
"type": "object"
},
"queryParams": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
},
"required": [],
"type": "object"
}Schéma de sortie
{
"type": "object"
}