Kuaishou Single Video by URL
https://api.sandbase.ai/v1/api/kuaishou/web/one-video-by-urlRetrieves video manifest data and streaming representation details for a specific Kuaishou post using its web link. Returns media properties such as resolution, frame rate, and direct video URLs.
- 料金
- $0.002USD / 回
- メソッド
- POST
- レスポンス
- JSON
- パラメータ
- 必須 1 件 · 任意 0 件
プレイグラウンド
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
API README
Kuaishou Single Video by URL API
Returns details for one Kuaishou post, including the author, engagement counts, cover images, direct video URLs and a stream manifest with the available quality representations. It needs a Kuaishou post link in url, such as a v.kuaishou.com short link.
Use cases
- Download or play a Kuaishou video by taking direct file links from
photo.mainMvUrls. - Compare the bitrate variants of one video using
photo.manifest.adaptationSet[].representation[]. - Track the views, likes, comments and shares of a post from a shared link.
- Check who published a post and whether the account is verified.
Request
curl -X POST "https://api.sandbase.ai/v1/api/kuaishou/web/one-video-by-url" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://v.kuaishou.com/GKTpYm"}'
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.
{
"counts": {
"collectionCount": 1836,
"fanCount": 69651241,
"followCount": 5,
"photoCount": 10863
},
"photo": {
"adminTags": [],
"caption": "现场视频!中央军委政治工作会议在延安召开,习近平出席会议并发表重要讲话。(来源:央视时政)",
"cccCoverMap": {
"height": 1155,
"width": 870
},
"commentCount": 2820,
"commentShowType": 2,
"coverUrls": [
{
"cdn": "p23.a.yximgs.com",
"url": "https://p23.a.yximgs.com/upic/2024/06/19/21/BMjAyNDA2MTkyMTA5NDJfMTA5NjYzNzQwMV8…"
}
],
"duration": 15682,
"exp_tag": "1_u/2006456229091442258_s0",
"ext_params": {
"color": "191818",
"h": 960,
"interval": 29,
"mtype": 3,
"sound": 15701,
"video": 15682,
"w": 720
},
"forcePublic": "H4sIAAAAAAAA%2F%2BNQEmCQ2Hn35s4fzABK4wL6CwAAAA%3D%3D",
"forwardCount": 0,
"headUrl": "https://p4-pro.a.yximgs.com/uhead/AB/2022/12/07/19/BMjAyMjEyMDcxOTEyMzFfMTA5NjYz…"
},
"result": 1
}
Response fields
| Field | Meaning |
|---|---|
photo.photoId / photo.photoType | The ID of the post and its type. In this response the type is VIDEO. |
photo.caption | The text that the author wrote for the post. |
photo.viewCount / likeCount / commentCount / shareCount / forwardCount | Engagement counts for the post. Each key is a separate count, for example photo.viewCount for views and photo.likeCount for likes. |
photo.timestamp | The time of the post as a 13-digit number. It looks like a Unix time in milliseconds. |
photo.duration / photo.width / photo.height | The length and the pixel size of the video. photo.duration is 15682 in this response, which fits milliseconds. |
photo.mainMvUrls[].url / photo.mainMvUrls[].cdn | Direct MP4 links to the video, each on a different CDN host. The links carry signed query strings. |
photo.coverUrls[].url / photo.webpCoverUrls[].url | Cover image links in JPG and WebP form, one for each CDN host. |
photo.manifest.adaptationSet[].representation[] | One entry per available encoding of the video. Each entry has avgBitrate, backupUrl and a comment that names the codec and the resolution tier. |
photo.userName / photo.userId / photo.userEid / photo.kwaiId | The author's display name, numeric ID, encoded ID and Kuaishou ID. |
photo.verified / photo.verifiedDetail.description | Shows whether the author is verified and the verification label. In this response the label is the name of a news organisation. |
counts.fanCount / counts.photoCount / counts.followCount / counts.collectionCount | Counts for the author's account, such as followers and number of posts. |
Notes
- Pass a Kuaishou share link in
url. The example uses the short formhttps://v.kuaishou.com/GKTpYm. photo.photoIdis a numeric string. You can use it with Kuaishou Single Video Details for more post data.- Use Kuaishou Video Comments (Web) to read the comments on the post.
- The
resultfield is1in this successful response.
Pricing
$0.002 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/kuaishou/web/one-video-by-url" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://v.kuaishou.com/GKTpYm"
}'2. 認証
SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
3. パラメータ
4. レスポンス
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
保存済みレスポンスはまだ公開されていません。PlaygroundでAPIを実行し、レスポンスを確認してください。
さらに探索
関連 APIs
| API | 価格 | レスポンス |
|---|---|---|
Kuaishou | $0.002 / 回 | JSON |
Kuaishou | $0.001 / 回 | JSON |
Kuaishou | $0.001 / 回 | JSON |
Kuaishou | $0.001 / 回 | JSON |
Kuaishou | $0.001 / 回 | JSON |
Kuaishou | $0.002 / 回 | JSON |
質問
FAQ
Kuaishou Single Video by URL API はどのように使いますか?
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/kuaishou/web/one-video-by-url に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
Kuaishou Single Video by URL API の料金はいくらですか?
1回あたり $0.002、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
Kuaishou Single Video by URL API はどのパラメータを受け付けますか?
必須: url (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
Kuaishou Single Video by URL API は何を返しますか?
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
Kuaishou の開発者アカウントまたは API key は必要ですか?
いいえ。Kuaishou Single Video by URL は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Kuaishou の API アクセスを別途申請する必要はありません。
