Skip to content

API

YouTube API

The TrueScrape YouTube API exposes 17 public endpoints covering Channel details, Channel videos, Channel community posts and Channel live streams. Every call is a GET against public, logged-out pages and returns the same unified schema as every other platform here. Calls cost 1 credit each. A cache hit is free, and a failed or empty response is never charged.

Channel details

curl
curl "https://api.truescrape.com/v1/youtube/channel?handle=%40MrBeast" \
  -H "x-api-key: $KEY"
Try it
GET/v1/youtube/channel

What YouTube exposes

  • A YouTube video or Short returns the exact like count where YouTube carries it beside the rounded "19M" it displays, and null when the uploader hides likes.
  • A YouTube video has `commentCount: null`: the logged-out watch page does not show a comment total, and we return null rather than round the displayed figure.
  • A premiere or upcoming video has no view count yet, and a channel can hide its subscriber count, so `viewCount` and `followerCount` can be null on a healthy response.
  • The Shorts grid does not render a duration or publish date, so both are null there; `extra_fetch=true` fills the exact view count, publish date and duration from each Short at 1 credit per item.
  • YouTube comments come about 20 per page and the Shorts grid about 48, each with a cursor for the next page, while a playlist returns 100 videos per page in playlist order.

Endpoints

Questions

How much does the YouTube API cost?
Calls cost 1 credit each. Every endpoint is cacheable, and a cache hit costs nothing. A failed request and an empty result are both free, on every endpoint.
Does the YouTube API need a login or cookies?
No. Every endpoint reads public, logged-out pages only — no account, no cookies, no session. An API key identifies your own TrueScrape account and nothing else.
Can I fetch many YouTube targets in one request?
Yes. 17 of 17 are batchable: one POST to /v1/jobs/batch takes many targets and returns a job id to poll.
Can I watch YouTube endpoints for changes?
Yes, 13 of 17. A subscription polls on your schedule and fires your webhook only when the content changed; the rest carry x-subscribable: false in the spec.
Why does a transcript or comments request fail on an age-restricted YouTube video?
YouTube serves an age-restricted video's captions and comments only to a signed-in viewer, and this API is logged-out by design. The request returns an `upstream_blocked` error rather than claiming the video has none, and it is not charged. The video's own metadata still comes back from the video endpoint.
Is there a YouTube trending endpoint?
YouTube retired its global Trending feed, so the trending endpoint reads the ranked Shorts surface for a region instead. Its results differ from one request to the next, which is why it cannot be watched for changes.
How do I track new comments on a YouTube video?
Request comments with `order=newest`. The default `top` order is re-ranked by YouTube and churns between calls. A comment with replies also appears in `replyCursors`; pass that cursor to the comment replies endpoint.
Does YouTube publish sponsor data?
No structured sponsor data exists. The sponsors endpoint returns YouTube's own paid-promotion disclosure plus brands, promo codes and affiliate links inferred from the description, each with the line it was read from and a confidence.

Free YouTube tools

From the blog