Skip to content
//YouTube Watch History Export example\\

Sample Takeout .zip, YouTube Music plays on one day

Reads the history from a whole Takeout archive and keeps only the YouTube Music plays of one day.

Updated October 28, 2026

What this example returns

The dataset’s “History” view shows 8 columns: Played at, Source, Title, Artist, Album, Channel, Duration, and Link. See every output field.

What each setting does

The input this example runs YouTube Watch History Export with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

Google Takeout file takeoutFile

https://api.scrape.ly/v2/key-value-stores/64650d23-729d-4b51-b930-eeeaf9de6fde/records/takeout-sample.zip?signature=MS4yMDgyNzU4NDAwMDAwLkRHN3VsWXlXR2dDVk5Fb21iY2Mz

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…

Add video details addVideoDetails

Yes

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.

History historySource

YouTube Music only

Export both histories, or only YouTube videos or only YouTube Music plays.

Default: YouTube and YouTube Music → this example uses YouTube Music only

Played on or after playedAfter

2026-10-19

Only entries played on or after this day (UTC), e.g. 2024-01-01.

Played on or before playedBefore

2026-10-19

Only entries played on or before this day (UTC), e.g. 2024-12-31.

.json
{
  "takeoutFile": "https://api.scrape.ly/v2/key-value-stores/64650d23-729d-4b51-b930-eeeaf9de6fde/records/takeout-sample.zip?signature=MS4yMDgyNzU4NDAwMDAwLkRHN3VsWXlXR2dDVk5Fb21iY2Mz",
  "addVideoDetails": true,
  "historySource": "music",
  "playedAfter": "2026-10-19",
  "playedBefore": "2026-10-19"
}

What it costs

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.

  • History entryfrom $0.0001One saved play from your watch history
  • Video detailsfrom $0.0003Per history entry that got duration, album and other public video details

Full pricing

When to use this example

From the YouTube Watch History Export readme:

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.

Other ways to run YouTube Watch History Export

All examples of YouTube Watch History Export

About YouTube Watch History Export

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.

Price:
from $0.10 / 1,000 results
Developer:
Echofield
Categories:
Videos, Social media

YouTube Watch History Export pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.