YouTube Comments Scraper
scrape.ly/store/echofield/youtube-comments-scraper
EchofieldSocial mediaVideos
514 monthly users

Turn your Google Takeout YouTube and YouTube Music history into a clean table: title, artist or channel, link, play time, duration and album for every video and song you played.
Turn your own YouTube and YouTube Music history into a clean table: every video and song you played, with the title, artist or channel, link, play time, duration and album. Upload the history file Google Takeout gives you, and get JSON, CSV or Excel back in minutes. No Google password, no cookies, no browser extension.
.zip / .tgz; Google Drive and Dropbox share links work too..zip as it is; there is no need to unpack it. You can also paste a link to the file, for example a Google Drive or Dropbox share link.The file you upload is kept in your own account's storage (the input-files key-value store), where you can delete it after the run.
| Field | What it does |
|---|---|
takeoutFile | Your Takeout file (upload) or an https link to it: watch-history.json, watch-history.html, or the Takeout .zip / .tgz |
addVideoDetails | Look up each video once for duration, album, artist, views, publish date and thumbnail (default on) |
maxItems | Stop after this many entries, newest first; empty exports everything |
historySource | all (default), youtube or music |
playedAfter / playedBefore | Only plays in this date range (UTC days) |
{
"takeoutFile": "https://drive.google.com/file/d/<your-file-id>/view?usp=sharing",
"addVideoDetails": true,
"historySource": "all",
"playedAfter": "2026-01-01"
}
One row per play, newest first.
| Field | Description |
|---|---|
playedAt | When you played it (ISO 8601, UTC) |
source | YouTube or YouTube Music |
title | Video or song title as it was when you played it |
artist | Artist of a song (YouTube Music plays and music videos) |
album | Album of a song, where YouTube shows one |
song | Song title from YouTube's music information |
channelName, channelUrl | Channel that uploaded the video |
url, videoId | Link and id of the video or song |
duration, durationSeconds | Length as hh:mm:ss and in seconds |
viewCount, publishedAt, category, thumbnailUrl | Public video details |
releaseDate | Release date of a song, where YouTube shows one |
isAvailable | false when the video is now private or removed |
playedAtText | Only for HTML exports whose time could not be converted: the time exactly as written |
[
{
"playedAt": "2026-10-19T23:17:40.401Z",
"source": "YouTube Music",
"title": "Get Lucky (feat. Pharrell Williams and Nile Rodgers)",
"artist": "Daft Punk, Pharrell Williams, Nile Rodgers",
"album": "Random Access Memories",
"song": "Get Lucky (feat. Pharrell Williams and Nile Rodgers)",
"channelName": "Daft Punk - Topic",
"channelUrl": "https://www.youtube.com/channel/UCRr1xG_2WIDs18a6cIiCxeA",
"url": "https://music.youtube.com/watch?v=4D7u5KF7SP8",
"videoId": "4D7u5KF7SP8",
"duration": "00:06:10",
"durationSeconds": 370,
"viewCount": 359601875,
"publishedAt": "2014-11-07T19:18:11-08:00",
"category": "Music",
"thumbnailUrl": "https://i.ytimg.com/vi/4D7u5KF7SP8/maxresdefault.jpg",
"releaseDate": "2013-05-20",
"isAvailable": true
},
{
"playedAt": "2026-10-20T21:15:03.120Z",
"source": "YouTube",
"title": "Me at the zoo",
"channelName": "jawed",
"channelUrl": "https://www.youtube.com/channel/UC4QobU6STFB0P71PMvOGN5A",
"url": "https://www.youtube.com/watch?v=jNQXAC9IVRw",
"videoId": "jNQXAC9IVRw",
"duration": "00:00:19",
"durationSeconds": 19,
"viewCount": 446963552,
"publishedAt": "2005-04-23T20:31:52-07:00",
"category": "Film & Animation",
"isAvailable": true
}
]
The key-value store's OUTPUT record sums up the run: rows saved, rows with video details, videos looked up, videos no longer available, and the entries the file had (ads and entries without a video link are skipped).
Pay per event. Platform usage (compute, proxy) is included in the price; you pay the events only.
| Event | Free | Starter | Scale | Business |
|---|---|---|---|---|
| History entry (per 1,000) | $0.20 | $0.16 | $0.13 | $0.10 |
| Video details (per 1,000 entries) | $0.50 | $0.40 | $0.35 | $0.30 |
Is it legal? It reads a file of your own data that Google gives you, and public video pages on YouTube. Use it for your own history, or with the consent of the person whose history it is.
Do I need to give my Google password or cookies? No. You export the history yourself with Google Takeout; the actor never signs in to your account.
How much history is in the export? Everything your account's watch history kept. If watch history was paused or auto-delete is on, those plays are not in the file.
Why are some fields empty? Album, artist and release date exist only for songs YouTube has music information for. Videos that were removed or made private since you watched them keep the title and link from your file but have no duration (isAvailable is false). Takeout leaves out the title of videos that were already removed when you exported; those entries are skipped.
Can I export only YouTube Music? Yes: set History to YouTube Music only.
Can I run it from the API or on a schedule? Yes. Pass takeoutFile as an https link your run can download. A schedule only makes sense with a new Takeout export each time; Google Takeout can also create scheduled exports every two months.
.json file to 10 MB: upload the Takeout .zip (a few MB even for years of history), or paste a link to the file. Select only history in Takeout to keep the archive small.playedAtText. JSON exports are exact.Every field below can be set in the run form, passed through the API, or saved as a task. Unset fields fall back to the defaults shown.
takeoutFilestringRequiredGoogle Takeout file
Your YouTube history from Google Takeout: upload the Takeout .zip as downloaded (or watch-history.json / watch-history.html from inside it), or paste a link to it (Google Drive and Dropbox share links work). Get it at takeout.google.com: deselect all, select "YouTube and YouTube Music", keep only "history", and pick JSON as the history format. The example is a small sample file.
addVideoDetailsbooleanOptionaldefault trueAdd video details
Look up each video on YouTube once and add its duration, album, artist, views, publish date and thumbnail. Turn off to export only what the Takeout file contains (title, channel, link, play time), which is faster and costs less.
maxItemsintegerOptionalMaximum entries
Stop after this many history entries (newest first). Leave empty to export the whole history.
historySourceenumOptionaldefault "all"History
Export both histories, or only YouTube videos or only YouTube Music plays.
playedAfterstringOptionalPlayed on or after
Only entries played on or after this day (UTC), e.g. 2024-01-01.
playedBeforestringOptionalPlayed on or before
Only entries played on or before this day (UTC), e.g. 2024-12-31.
Every run writes its results to a dataset. Preview it in the dashboard, then export it or read it through the API.
| Field | Type | Description |
|---|---|---|
| playedAt | string | When you played it (ISO 8601, UTC) |
| source | string | YouTube or YouTube Music |
| title | string | Video or song title as it was when you played it |
| artist | string | Artist of a song (YouTube Music plays and music videos) |
| album | string | Album of a song, where YouTube shows one |
| song | string | Song title from YouTube's music information |
| channelName | string | Channel that uploaded the video |
| channelUrl | string | Channel link |
| url | string | Video or song link |
| videoId | string | YouTube video id |
| duration | string | Length (hh:mm:ss) |
| durationSeconds | integer | Length in seconds |
| viewCount | integer | Views on YouTube now |
| publishedAt | string | When the video was published |
| category | string | YouTube category |
| thumbnailUrl | string | Thumbnail image |
| releaseDate | string | Release date of a song, where YouTube shows one |
| isAvailable | boolean | False when the video is now private or removed (video details on) |
| playedAtText | string | Play time exactly as written in an HTML export, when it could not be converted |
You pay for the events the actor reports, such as each result or page it produces. Platform usage is included in the event prices: compute, proxies, browser and storage cost nothing extra.
| Event | Charged when | Free | Starter | Scale | Business |
|---|---|---|---|---|---|
| History entry (main event) | One saved play from your watch history | $0.00020 | $0.00016 | $0.00013 | $0.00010 |
| Video details | Per history entry that got duration, album and other public video details | $0.00050 | $0.00040 | $0.00035 | $0.00030 |
Each plan pays the event prices in its column. Platform usage is included in the event prices.
Run this actor from your own code. Swap in your API token and the examples work as-is.
import { ScrapelyClient } from 'scrapely-client'
const client = new ScrapelyClient({ token: process.env.SCRAPELY_TOKEN })
// Start the actor and wait for the run to finish.
const run = await client.actor('echofield/youtube-watch-history').call({
"takeoutFile": "https://api.scrape.ly/v2/key-value-stores/64650d23-729d-4b51-b930-eeeaf9de6fde/records/watch-history.json?signature=MS4yMDgyNzU4NDAwMDAwLjFzaDg3N2JNaUxSSmdFVDdua1VjRw"
})
// Read the dataset the run produced.
const { items } = await client.dataset(run.defaultDatasetId).listItems()
console.log(items)Tokens live in your account settings. Keep them server-side: a token carries the full permissions of your account.
Connect the Scrape.ly MCP server once and your agent can run this actor as a tool. Pick your tool:
Fetch scrape.ly/agents.md and run echofield/youtube-watch-historyPaste into Claude Code, Codex, Cursor or any AI agent. It signs you in once in the browser.
{
"mcpServers": {
"scrapely": {
"url": "https://mcp.scrape.ly?tools=actors,runs,storage,docs&actors=echofield/youtube-watch-history"
}
}
}No key in the file: your client opens the browser to sign you in the first time it connects.
Inputs the developer prepared for common jobs. Open one to see its input, then copy it to your account to run it as-is or adjust it.
A small sample Takeout file: 25 plays of public videos and songs, with duration, album and artist.
Reads the history from a whole Takeout archive and keeps only the YouTube Music plays of one day.
Exports the first 10 entries of an HTML Takeout file with only the data in the file.

The n8n Puppeteer node needs Chromium inside your n8n container and installs only on self-hosted n8n. How it and the Playwright nodes install, where they break, and how to run the same browser scrape on Scrape.ly from n8n instead, with a real tested run.
Read the article
Puppeteer vs Selenium for web scraping: languages, browsers, protocols, waiting, request blocking and parallel sessions, from the official docs on 28 October 2026, plus the same scraper written in Puppeteer and Selenium and tested on a JavaScript-rendered page.
Read the article
How to use webhooks for web scraping: get an HTTP call, a Slack or Discord message or an email the moment a scraper run finishes, with the run and dataset IDs to fetch results. Event types, payload templates, retries, a tested Python receiver and the API calls to set it up.
Read the articleScrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.