YouTube video comments by video id
justoneapi.x.youtube-get-video-comment-v1Retrieve first-level comments for a YouTube video with sorting, locale options, and cursor pagination.
- Price
- $0.01476/successプロバイダー原価
- Success rate
- —成功率データはまだありません成功率データはまだありません
- Latency p50
- ——
- Last verified
- 2026/07/28Verified working
GEThttps://toolswitch.dev/v1/tools/justoneapi.x.youtube-get-video-comment-v1?cursor=0&sortBy=newest&videoId=dQw4w9WgXcQ&countryCode=US&languageCode=zh-CNPreviewTry online近日公開Provider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
cursor | 文字列 | 任意 | Pagination cursor returned by the previous response. | |
sortBy | 文字列 | 任意 | Sort order for the comment list. Available Values: - `top`: Top comments - `newest`: Newest comments One of: top, newest. | newest |
videoId | 文字列 | 必須 | The unique identifier for a YouTube video. | dQw4w9WgXcQ |
countryCode | 文字列 | 任意 | Region code for response data. | US |
languageCode | 文字列 | 任意 | Language preference for response data. | zh-CN |
- クエリパラメータ
cursor文字列任意Pagination cursor returned by the previous response.
sortBy文字列任意Sort order for the comment list. Available Values: - `top`: Top comments - `newest`: Newest comments One of: top, newest.
例:
newestvideoId文字列必須The unique identifier for a YouTube video.
例:
dQw4w9WgXcQcountryCode文字列任意Region code for response data.
例:
USlanguageCode文字列任意Language preference for response data.
例:
zh-CN
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
Preview
curl -X GET 'https://toolswitch.dev/v1/tools/justoneapi.x.youtube-get-video-comment-v1?cursor=0&sortBy=newest&videoId=dQw4w9WgXcQ&countryCode=US&languageCode=zh-CN' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/justoneapi.x.youtube-get-video-comment-v1?cursor=0&sortBy=newest&videoId=dQw4w9WgXcQ&countryCode=US&languageCode=zh-CN",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/justoneapi.x.youtube-get-video-comment-v1?cursor=0&sortBy=newest&videoId=dQw4w9WgXcQ&countryCode=US&languageCode=zh-CN", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は $0.01476/success です。サービス料を含みます。