DatafetchPro
    xport-youtube-comments-to-csv-easily
    May 23, 20265 min read40 views

    Export YouTube Comments to CSV With Tampermonkey

    I built a Tampermonkey userscript to export YouTube comments to CSV without the API. Here is how to install it and what it can and cannot do.

    Manually copying comments off a YouTube video is slow, and it gets slower the more videos you have to check. I wrote a Tampermonkey userscript that lets you export YouTube comments to CSV from the page you are already looking at, with no API key and no paid tool in the middle. This post covers what it does, how to install it, and where it stops being the right approach.

    A userscript is a small piece of JavaScript that runs inside your own browser, on pages you choose. It is not an extension from the Chrome Web Store. You install a manager once, paste in a script, and it wakes up only on the sites you tell it to.


    What the script does on a YouTube page

    The script scans videos automatically and pulls the recent comments off them. For each comment it captures three things: the author name, the comment text, and the "time ago" value YouTube displays. Then it hands you a one-click CSV export.

    The floating dashboard

    Rather than a full extension with its own settings page, the script adds a floating dashboard to the page and drops a quick export button inside each video card. A lightweight sidebar preview shows what has been collected before you export anything. The YouTube interface stays as it was.

    Show Image

    What people use it for

    Creators, marketers, and developers use it for content research, audience analysis, early lead research, and watching how the conversation around a topic shifts over time. Bulk export is supported, so you can work across the homepage and the video feed rather than one video at a time. Collecting public engagement data by hand takes hours; this takes the clicking out of it.


    How to export YouTube comments to CSV

    Three steps, and the first one you only do once.

    Install the userscript manager

    Tampermonkey is the manager that runs the script. Grab it from the official Tampermonkey download page for Chrome, Edge, Firefox, or Safari, then pin it to your toolbar so the dashboard is one click away.

    Add the script

    Open the Tampermonkey dashboard, create a new script, paste in the file, and save with Ctrl+S. It should appear in your list as enabled. If it does not, check the toggle — a disabled userscript fails silently and looks identical to a broken one.


    Run it on YouTube

    Load a video or feed page and let it finish rendering. The floating dashboard appears. Scroll through the comments you want, then use the export button. You get a CSV file that opens in Excel, Google Sheets, or LibreOffice.


    Where a YouTube comment scraper runs into limits

    I would rather tell you this now than have you find out on a deadline.

    It reads what is on the page

    The script collects recent comments, not a complete thread. YouTube loads comments in batches as you scroll, so anything not yet loaded into the page does not exist as far as a userscript is concerned. If you need all forty thousand comments on a video, scrolling to the bottom by hand is not a plan — that is the point where a Playwright bot that scrolls and waits on its own becomes the better tool. I cover that approach in my other write-ups on browser automation.

    "Time ago" is relative, not a date

    YouTube renders "3 weeks ago", not a date, and that string is what lands in your CSV. Export the same video next month and the same comment reads differently. For anything time-sensitive, record the date you ran the export and treat every value as an offset from it.

    Emoji and encoding

    Comments are full of emoji and non-Latin characters. CSV carries them fine, as long as the encoding survives the handoff.

    Opening the file in Excel

    Double-clicking a UTF-8 CSV in Excel on Windows often mangles accented characters and turns emoji into symbols. Use Data → From Text/CSV and set the file origin to UTF-8, or open the file in Google Sheets, which reads it correctly by default.


    Scraping YouTube comments without the API, versus using it

    Google publishes an official endpoint for this. The YouTube Data API commentThreads reference returns comments as structured JSON with real timestamps and stable IDs. It also requires a Google Cloud project, an API key, and it runs against a daily quota.

    The userscript route fits when you want a few hundred comments today, you do not want to manage credentials, and approximate timestamps are good enough. The API fits when you need exact dates, stable comment IDs, or a job that runs unattended every night and writes somewhere permanent. I build both — the API pipelines and scheduling work I take on covers the second case.


    Terms of service and robots.txt

    The script is a technical tool. Whether you are permitted to run it against a given site or account is a separate question, and it is yours to answer. Read the YouTube Terms of Service and check what a site declares in its robots.txt file, as Google documents it, before running anything at scale. I will explain how a scraper works and what it can reach. I will not tell you that scraping a particular site is allowed, because that depends on the terms you agreed to and sometimes on where you are.

    When a custom build makes more sense

    A userscript works when the job is small and you are the one clicking. It stops working when you need comments from two hundred videos overnight, or the data landing in PostgreSQL or Airtable instead of a downloads folder, or replies as well as top-level comments.

    That is the kind of thing I build to order: Python and Playwright bots, Chrome extensions, no-code macros, and the storage and scheduling underneath them. You can read how I work and what I take on, or start a project with me through Fiverr, which is the only place I take work.

    If you want to try the userscript first, install it, run it on one video, and check whether the three fields it captures are the three you actually need. That usually settles the question.

    0

    Rather not build it yourself?

    I build this kind of thing for a living.

    Send me the site and what you need out of it — you'll get an approach, a timeline, and a fixed quote back. Scoping is free.