YouTube
YouTube post API
Get a YouTube community post and its comments. Call the YouTube post API and get JSON back in one request. 1 credit per call. Failed calls cost nothing.
POST
Get a YouTube community post and its comments
Returns a YouTube community post and its comments. The post is identified by its URL or ID.
Request
Exactly one ofpostUrl or postId is required. A request that sets both, or none, fails with invalidRequest.
Response
If successful, the response body contains the standard envelope.data contains the post’s text, images and likes, and results lists its comments.
The following example is a real response, truncated: each list shows one item and long strings are cut.
For every field, see the response schema on this page.
Optional parameters
Billing
Each successful request consumes 1 credit, regardless of the number of items returned. Requests that fail, or that return no items, are not billed.Pagination
Results are paginated. To retrieve the next page, pass the value ofdata.cursor as cursor in a subsequent request. A response that omits cursor is the last page.
Related methods
- YouTube transcript: Accepts
videoId. Returns what a YouTube video says, from its captions. - YouTube video: Accepts
videoId. Returns a video’s stats, description, chapters and most replayed moments. - YouTube comments: Accepts
videoId. Returns a video’s comments, or the replies to one comment. - YouTube related videos: Accepts
videoId. Returns the videos YouTube suggests next to a video, equivalent to its Up next list.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Link to the YouTube community post, like https://www.youtube.com/post/UgkxX6gkDxQ0KRucvyG7NLui0LhjHp0CLlfZ. Send this or postId.
YouTube community post id, like UgkxX6gkDxQ0KRucvyG7NLui0LhjHp0CLlfZ. Send this or postUrl.
YouTube's own comment sort.
Available options:
top, newest The cursor from the previous response. Send it as is.
Minimum string length:
1