Douyin sec_user_id from URL
https://api.sandbase.ai/v1/api/douyin/web/sec-user-idExtracts the Douyin sec_user_id identifier from a provided web link or profile URL. Input the target link in the query parameter to resolve the user identifier.
- 价格
- $0.001美元 / 次调用
- 方法
- POST
- 响应
- JSON
- 参数
- 1 个必填 · 0 个可选
Playground
您的输出将显示在这里
完成输入,然后点击运行。
API README
Douyin sec_user_id from URL API
This API takes a Douyin web link in the url parameter and returns a single JSON string. It is meant to extract the sec_user_id from a user profile link. In the sample call, a video link came back as the same URL text.
Use cases
- Turn a shared Douyin profile link into a
sec_user_idbefore you request that user's data. - Prepare user identifiers for Douyin User Profile (Web) from profile links you collected.
- Check whether a pasted Douyin link resolves to an identifier or comes back unchanged.
Request
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/sec-user-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.douyin.com/video/7691553968815623478"}'
The result is returned in outputs[0].data.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes |
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
"https://www.douyin.com/video/7691553968815623478"
Response fields
| Field | Meaning |
|---|---|
$ | The whole response is one plain JSON string, not an object, so it has no named fields. |
$ | For a user profile link, this string is the resolved sec_user_id, according to the API description. |
$ | In the sample call with a video link, the string was the same URL that was sent in url. |
Notes
- Send a user profile or homepage URL in
urlif you want asec_user_id. The sample video URLhttps://www.douyin.com/video/7691553968815623478returned the input unchanged. - For a video link, call Douyin Video ID Extractor to get the video ID.
- To process many profile links in one call, use Douyin sec_user_ids from URLs (Batch).
Pricing
$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
开始构建
发送您的第一条请求
具备统一身份验证和使用情况跟踪的平台 API 端点。
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/sec-user-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://www.douyin.com/video/7691553968815623478"
}'2. 身份验证
将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
3. 参数
4. 响应
这是该 API 保存的示例响应;查看时不会发起实时请求。
尚未发布已保存的响应。请在 Playground 中运行 API 以查看其响应。
探索更多
相关 APIs
| API | 价格 | 响应 |
|---|---|---|
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.03 每次调用 | JSON |
问题
常见问题
如何使用 Douyin sec_user_id from URL API?
向 https://api.sandbase.ai/v1/api/douyin/web/sec-user-id 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
Douyin sec_user_id from URL API 的价格是多少?
每次调用 $0.001。每个组织在每个 UTC 日可获得 100 次免费调用,适用于包括此接口在内的所有符合条件的 SandBase APIs;超过后,每次调用将按此价格从您的 SandBase 余额中扣费。无需订阅。
Douyin sec_user_id from URL API 接受哪些参数?
必填:url (string)。 Parameters 表和本页的 Playground 列出了每个字段。
Douyin sec_user_id from URL API 返回什么?
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
我需要 Douyin 开发者账户或 API key 吗?
不需要。Douyin sec_user_id from URL 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Douyin API 访问权限。
