- Available for macOS, Linux & Windows
- Fetch all comments + comment replies for a given list of YouTube videos
- Applies cooldown if rate limit reached
- Outputs CSV file containing all comments
A YouTube API key is required. You can get one here.
Download the latest executable for your system.
- Windows:
fetch_comments_windows.exe
- macOS:
fetch_comments_mac
- Linux:
fetch_comments_arm64
If you get a permissions denied
error, you may call sudo chmod +x fetch_comments
.
Create a videos.txt
file with the YouTube video URLs you want to fetch comments from (separated by new line) in the same folder as the executable.
https://youtu.be/h5MJn_Yy7aA
https://www.youtube.com/watch?v=eglxpDucXpI
...
You can/need to pass the following env vars:
YOUTUBE_API_KEY
: Your YouTube API key (required)MIN_LENGTH
: Minimum length of the comment to be fetched (default: 5)MAX_COMMENTS
: Maximum amount of the comment to be fetched for each video (default: 1000)
set YOUTUBE_API_KEY=... set MIN_LENGTH=10 fetch_comments_windows.exe
$env:YOUTUBE_API_KEY="..."; $env:MIN_LENGTH="10"; .\fetch_comments_windows.exe
YOUTUBE_API_KEY=... MIN_LENGTH=10 ./fetch_comments_mac
YOUTUBE_API_KEY=... MIN_LENGTH=10 ./fetch_comments_arm64
If everything goes to plan, you should see a comments.csv
file being created.
go run .
go mod download
go build -o ./fetch_comments