Menu

Export YouTube Comments to CSV for Sentiment Analysis (Python, pandas and VADER)
📰

Export YouTube Comments to CSV for Sentiment Analysis (Python, pandas and VADER)

DEV Community: nlp·frankxie·12 days ago
#qJMXgZwK
#devtonlp#devto#dev#comments#false
Long article (1711 words) — no AI summary yet.
Reading 0:00
15s threshold

YouTube comments are one of the best sources of unfiltered opinion on the internet. Under a product review you'll find owners describing what they like, buyers explaining why they returned it, and people asking the questions your FAQ should answer. For a brand, a product team or an NLP project, that's useful text, as long as you can get it out of YouTube and into a table.

The official route is the YouTube Data API. It can do this: commentThreads.list returns comments 100 at a time. But you need a Google Cloud project and an API key, you write the paging yourself, and a thread response doesn't always include every reply, so full threads need a second endpoint ( comments.list ). That's fine for a long-term pipeline and a lot of setup for "I want the comments of these five videos in a spreadsheet".

This tutorial uses an Apify Actor that exports comments to JSON, CSV or Excel with no API key, then scores them with a simple sentiment model in pandas.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.