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

Sample HTML history, first 10 entries, no lookups

Exports the first 10 entries of an HTML Takeout file with only the data in the file.

Updated October 28, 2026

What this example returns

This example returns up to 10 history entries.

The dataset’s “Video details” view shows 10 columns: Played at, Title, Channel, Duration, Seconds, Views, Published, Category, Available, 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/watch-history.html?signature=MS4yMDgyNzU4NDAwMDAwLjFENkZnWUFPWDQwYXRpT3VsazBnVQ

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

No

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.

Default: Yes → this example uses No

Maximum entries maxItems

10

Stop after this many history entries (newest first). Leave empty to export the whole history.

.json
{
  "takeoutFile": "https://api.scrape.ly/v2/key-value-stores/64650d23-729d-4b51-b930-eeeaf9de6fde/records/watch-history.html?signature=MS4yMDgyNzU4NDAwMDAwLjFENkZnWUFPWDQwYXRpT3VsazBnVQ",
  "addVideoDetails": false,
  "maxItems": 10
}

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:

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 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.