automations / n8n · updated 2026-07-20

YouTube video → comments dataset

One video in, one item per comment out — author, text, likes — with videos that have comments disabled exiting as typed rows instead of failed executions.

200 comments cost $0.08; a video with comments off costs $0.

What's inside

  1. 1.Run workflow (manual trigger)
  2. 2.Get comments (HTTP Request → run-sync-get-dataset-items, one item per comment)
  3. 3.Split by success (IF on {{ $json.success }})
  4. 4.Comment row (true branch: video_id, author, text, like_count)
  5. 5.Failure row (false branch: video_id, code, request_id — not billed)

Set it up

Open the workflow on GitHub (button above), click Raw and copy that URL, then in n8n: Workflow → Import from URL. Open Get comments and replace YOUR_APIFY_TOKEN. Set videoUrls to your video (URL or 11-character ID); flip includeReplies to true if you want reply threads. The token comes from Apify Console → Settings → API tokens; the free tier works, and the run bills per delivered row on your Apify account.

Ways to extend it

  • Feed Comment row into a sentiment model and aggregate the scores per video.
  • Add the YouTube Search template pattern upstream to pull comments for every video ranking for a keyword.
  • Route rows where {{ $json.code }} is COMMENTS_DISABLED to a skip-list so you stop re-querying them.

Going deeper: the n8n transcripts guide — the same run-sync HTTP pattern, step by step. Actor pricing: what a YouTube Comments Scraper run costs. Error codes the failure branch can carry: the error-code reference.