om_kh Apify Actor Catalogue

← All guides · All Actors

Export YouTube Comments to CSV or JSON — Up to 5,000 per Video

How do I export all comments from a YouTube video?

Use the YouTube Comments Scraper with one or more video URLs. It returns up to 5,000 comments per video, sorted by newest or top, with text, author, like count, reply count, date and whether the creator hearted it. Export as CSV, Excel or JSON. No YouTube API key and no quota. $0.40 per 1,000 comments.

Try it: YouTube Comments Scraper on Apify — click Try for free, the input is prefilled.

Step by step

  1. Open YouTube Comments Scraper and click Try for free (an Apify account is free).
  2. Paste this input (or fill the form):
{
  "videoUrls": [
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  ],
  "maxComments": 500,
  "sortBy": "top"
}
  1. Click Start. Download the results as JSON, CSV or Excel, or read them from the API.

From Python

from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("om_kh/youtube-comments-scraper").call(run_input={
    "videoUrls": [
        "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
    ],
    "maxComments": 500,
    "sortBy": "top"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

With one HTTP call (cURL)

curl -X POST "https://api.apify.com/v2/acts/om_kh~youtube-comments-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"videoUrls": ["https://www.youtube.com/watch?v=dQw4w9WgXcQ"], "maxComments": 500, "sortBy": "top"}'

What you get

Price

$0.0004 per comment. You only pay for results delivered; set maxTotalChargeUsd to cap a run.

Use cases

From an AI agent (MCP)

Connect Claude, Cursor or any MCP client to https://mcp.apify.com and add om_kh/youtube-comments-scraper as a tool. The agent sends the same JSON input and gets the rows back.

FAQ

Does it work on Shorts?
Yes, pass a Shorts URL or an 11-character video ID.

Is there a quota?
No YouTube API quota applies.