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.
- Harga
- $0.001USD / panggilan
- Metode
- POST
- Respons
- JSON
- Parameter
- 1 wajib · 0 opsional
Playground
Output Anda akan muncul di sini
Lengkapi input, lalu klik Run.
README API
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.
Mulai membangun
Kirim permintaan pertama Anda
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
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. Autentikasi
Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
3. Parameter
4. Respons
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
Belum ada respons tersimpan yang dipublikasikan. Jalankan API di Playground untuk melihat responsnya.
Jelajahi lebih lanjut
API Terkait
| API | Harga | Respons |
|---|---|---|
Douyin sec_user_id from URLAPI ini Douyin | $0.001 per panggilan | JSON |
Douyin | $0.001 per panggilan | JSON |
Douyin | $0.001 per panggilan | JSON |
Douyin | $0.001 per panggilan | JSON |
Douyin | $0.001 per panggilan | JSON |
Douyin | $0.03 per panggilan | JSON |
Pertanyaan
FAQ
Bagaimana cara menggunakan API Douyin sec_user_id from URL?
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/douyin/web/sec-user-id dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
Berapa biaya API Douyin sec_user_id from URL?
$0.001 per panggilan. Setiap organisasi mendapat 100 panggilan gratis per hari UTC, dibagi di seluruh API SandBase yang memenuhi syarat termasuk yang ini; setelah itu setiap panggilan ditagihkan dengan harga ini dari saldo SandBase Anda. Tidak ada langganan.
Parameter apa yang diterima API Douyin sec_user_id from URL?
Wajib: url (string). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Apa yang dikembalikan API Douyin sec_user_id from URL?
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.
Apakah saya memerlukan akun developer atau kunci API Douyin?
Tidak. Douyin sec_user_id from URL berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API Douyin secara terpisah.
