YouTube
The YouTube connector exposes six endpoints:
| Endpoint | Purpose | Billed |
|---|---|---|
GET /v1/youtube/search | Keyword/topic search across public videos | per result block |
GET /v1/youtube/video/{video_id} | A single video's details and metrics | per request |
GET /v1/youtube/video/{video_id}/comments | A video's comments, optionally with replies | per result block |
GET /v1/youtube/video/{video_id}/transcript | A video's transcript as timestamped segments | per request |
GET /v1/youtube/video/{video_id}/transcripts | The transcript tracks a video offers | per request |
GET /v1/youtube/channel/{channel_id} | A channel's reference data and metrics | per request |
Identifiers
Video id — the 11-character code from a watch URL:
https://www.youtube.com/watch?v=dQw4w9WgXcQ
└─────────┘
video_id = dQw4w9WgXcQ
Channel — the video and channel endpoints accept either a channel id or a handle:
- Channel id —
UC38IQsAvIsxxjztdMZQtwHA - Handle —
@google
Result types
type | Meaning |
|---|---|
video | A standard video or Short |
channel | A channel record |
Metrics vocabulary
Counts are returned both as a number and as the display string shown on YouTube, so you get a precise value and the human-readable form:
| Field | Meaning |
|---|---|
views / views_text | View count, e.g. 184203 and 184K views |
subscribers / subscribers_text | Subscriber count, e.g. 1230000 and 1.23M subscribers |
view_count / view_count_text | Channel total views |
video_count / video_count_text | Channel public video count |
like_count / like_count_text | Like count — on a video or a comment |
comment_count | Total comments on a video |
Why some fields are
nullA count that YouTube does not expose is returned as null, never 0, so you can
always tell missing apart from zero. Subscriber counts are rounded by
YouTube itself.
Latency & reliability
- The first request after a quiet period may be slower; subsequent requests are faster.
- Occasional
429 upstream_rate_limitedresponses indicate a transient block — retry with backoff and it will clear. See Errors. - Large
max_resultsvalues run more work; prefer modest counts and page over multiple calls for big pulls.