Fetch user search API
Fetch user search
USD 0.010000 / 成功した呼び出し
パブリックID: social.tikhub.douyin.search.fetch.user.search · バージョン 1
料金
USD 0.010000 / 成功した呼び出し
クイックスタート
API キーでこのツールを検索し、返された provider と endpoint の仕様を確認してから実行してください。
GLOOP_API_BASE に API の URL、GLOOP_API_KEY にサーバー側のキーを設定してください。
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 user search"
}'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 user search\"\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 user search"
}) });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());ツール API ドキュメント · POST /v1/inspect入力スキーマ
{
"additionalProperties": false,
"properties": {
"body": {
"additionalProperties": false,
"properties": {
"cursor": {
"description": "偏移游标,用于翻页,从上一次请求返回的响应中获取 / Offset cursor for pagination, obtained from the last response",
"title": "Cursor",
"type": "integer"
},
"douyin_user_fans": {
"description": "粉丝数过滤:空=不限 0_1k=1千以下 1k_5k=1千到5千 5k_10k=5千到1万 10k_100k=1万到10万 100k_1M=10万到100万 1M_=100万以上 / Fans filter: empty=No limit, 0_1k=Under 1k, etc.",
"title": "Douyin User Fans",
"type": "string"
},
"douyin_user_type": {
"description": "用户类型过滤:空=不限 300=创作者 900=小店 700=音乐人 800=明星 / User type filter: empty=No limit, 300=Creator, 900=Shop, 700=Musician, 800=Celebrity",
"title": "Douyin User Type",
"type": "string"
},
"keyword": {
"description": "关键词 / Keyword",
"title": "Keyword",
"type": "string"
},
"search_id": {
"description": "搜索ID,用于翻页,从上一次请求返回的响应中获取 / Search ID for pagination, obtained from the last response",
"title": "Search Id",
"type": "string"
}
},
"title": "UserSearchRequest",
"type": "object"
},
"queryParams": {
"additionalProperties": false,
"properties": {},
"type": "object"
}
},
"required": [],
"type": "object"
}出力スキーマ
{
"type": "object"
}