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/successZum Anbieterpreis
- Success rate
- —Noch keine ErfolgsratendatenNoch keine Erfolgsratendaten
- Latency p50
- ——
- Last verified
- 28.07.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 onlineDemnächstProvider docs ↗
- Uses platform quota
- Synchronous response
- Reads public data
Parameter
| Parameter | Typ | Erforderlich | Beschreibung | Beispiel |
|---|---|---|---|---|
| Abfrageparameter | ||||
cursor | Zeichenkette | Optional | Pagination cursor returned by the previous response. | |
sortBy | Zeichenkette | Optional | Sort order for the comment list. Available Values: - `top`: Top comments - `newest`: Newest comments One of: top, newest. | newest |
videoId | Zeichenkette | Erforderlich | The unique identifier for a YouTube video. | dQw4w9WgXcQ |
countryCode | Zeichenkette | Optional | Region code for response data. | US |
languageCode | Zeichenkette | Optional | Language preference for response data. | zh-CN |
- Abfrageparameter
cursorZeichenketteOptionalPagination cursor returned by the previous response.
sortByZeichenketteOptionalSort order for the comment list. Available Values: - `top`: Top comments - `newest`: Newest comments One of: top, newest.
Beispiel:
newestvideoIdZeichenketteErforderlichThe unique identifier for a YouTube video.
Beispiel:
dQw4w9WgXcQcountryCodeZeichenketteOptionalRegion code for response data.
Beispiel:
USlanguageCodeZeichenketteOptionalLanguage preference for response data.
Beispiel:
zh-CN
Codebeispiele
Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.
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());Diese Gateway-API ist eine Vorschauversion; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit $0.01476/success einschließlich Servicegebühr abgerechnet.