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/successAt provider cost
- Success rate
- —No success-rate data yetNo success-rate data yet
- Latency p50
- ——
- Last verified
- Jul 28, 2026Verified working
GEThttps://toolswitch.dev/v1/tools/justoneapi.x.youtube-get-video-comment-v1?cursor=0&sortBy=newest&videoId=dQw4w9WgXcQ&countryCode=US&languageCode=zh-CNPreviewTry onlineComing soonProvider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| Query parameters | ||||
cursor | string | Optional | Pagination cursor returned by the previous response. | |
sortBy | string | Optional | Sort order for the comment list. Available Values: - `top`: Top comments - `newest`: Newest comments One of: top, newest. | newest |
videoId | string | Required | The unique identifier for a YouTube video. | dQw4w9WgXcQ |
countryCode | string | Optional | Region code for response data. | US |
languageCode | string | Optional | Language preference for response data. | zh-CN |
- Query parameters
cursorstringOptionalPagination cursor returned by the previous response.
sortBystringOptionalSort order for the comment list. Available Values: - `top`: Top comments - `newest`: Newest comments One of: top, newest.
Example:
newestvideoIdstringRequiredThe unique identifier for a YouTube video.
Example:
dQw4w9WgXcQcountryCodestringOptionalRegion code for response data.
Example:
USlanguageCodestringOptionalLanguage preference for response data.
Example:
zh-CN
Code samples
Replace $TOOLSWITCH_KEY with the key you created in the console.
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());This gateway API is in preview; its URL and authentication may change. The example parameters are sample data. Calls are billed at $0.01476/success, including the service fee.