Guides & How-Tos

Combine your Spotify and YouTube history in one place

By the Echo team · 17 July 2026 · 8 min read

Spotify and YouTube each keep their own history, in their own format, with no shared view between them. You can merge the two exports yourself with a spreadsheet or a short script, or skip the export step entirely with a tool that records both live. Here is how each approach actually works.

If you have ever wanted one timeline of everything you listened to and watched, music from Spotify and videos from YouTube, in the order it actually happened, you have probably discovered there is no button for that. Spotify has its own history. YouTube has its own history. Neither one knows the other exists.

Why do you end up with two separate histories?

Spotify and YouTube are built by different companies with different data models, and neither has a reason to talk to the other. Spotify logs plays as track, artist, album, and a timestamp. YouTube logs a watch event as a video title, a channel, and a timestamp. The fields do not line up cleanly, and there is no shared account or API that merges them for you.

The result is two separate exports, in two separate formats, that only make sense together once someone lines them up by time. That someone, until now, has had to be you. A number of people have built their own tools to do exactly this. The YouTubeAndSpotify_DataAnalysis project on GitHub is a good example: it pulls both exports into a shared database, then uses Python and SQL to line up listening and watching activity for analysis in Power BI and Tableau. It is exactly the kind of project people reach for when they want both histories in one dataset.

How do you export both histories?

Before you can combine anything, you need both raw files. Each platform has its own export process, and each has its own quirks:

Both files land as JSON with a timestamp on every entry, which is the one thing that makes joining them possible at all.

How do you merge Spotify and YouTube history yourself?

Once you have both exports, the common approach is to treat the timestamp as the join key. In practice, that looks like one of a few paths, roughly in order of how technical they are:

  1. Spreadsheet. Import both JSON files into Google Sheets or Excel (usually via a JSON-to-table add-on, since neither file is natively spreadsheet-shaped). Normalise the timestamp columns to the same format and time zone, then sort both sheets by time and stack or interleave the rows into a single tab. This works, but it is fiddly by hand once you are past a few hundred rows.
  2. Small script. The more common route for anyone with a bit of Python is to load both JSON files with pandas, parse the timestamps into a consistent datetime type, tag each row with its source (Spotify or YouTube), concatenate the two dataframes, and sort by time. This is the pattern behind most of the GitHub projects in this space, including the one linked above, and it scales far better than a spreadsheet once your history runs into the thousands of plays.
  3. A dedicated analysis tool. Projects like youtube-history-analyzer handle the YouTube side of this (video durations, CSV export, reports) and can be paired with a similar Spotify-side parser before combining the outputs.
Watch the time zones

Spotify's export and Google Takeout's export do not always use the same time zone convention. If your merged timeline looks a few hours off, check whether one file is in UTC and the other in local time before you assume the join failed.

What are the limits of the DIY approach?

The spreadsheet or script method genuinely works, and it is the right call if what you want is a one-off analysis: a yearly wrap-up, a chart of your busiest listening months, a combined top-artists-and-channels list. But it comes with three real limits worth being honest about:

None of that makes the DIY method wrong. It is exactly the right tool if you want to analyse a year of habits after the fact. It is the wrong tool if what you actually want is to answer, on any given day, "what was that song, and what was that video I had open last week" without repeating the whole export-and-merge cycle.

How does Echo combine both automatically?

Echo is a Mac app that removes the export step entirely. It records Spotify plays through native capture and YouTube (along with Twitch, SoundCloud, and general web video) through a lightweight browser extension, and it writes both into one searchable, on-device history as you go. There is no request to submit, no waiting on an email, no JSON file to line up by hand. Whatever you played, wherever you played it, shows up in the same list, in the order it actually happened.

The gap the manual method cannot close, however carefully you script it, is resume position. Neither Spotify's export nor a Takeout file records exactly where you stopped inside a video or track. Echo does. Press ⌘⇧E from anywhere on your Mac and Echo brings up your combined history, ready to pick a Spotify track or a YouTube video back up at the exact second you left it. That is not something a merged spreadsheet can offer, no matter how well the timestamps line up, because the underlying export was never built to capture it in the first place.

If you want a one-time picture of your combined habits for a chart or a report, the DIY export-and-merge route is a reasonable weekend project. If you want an always-current, searchable record of everything you have played on your Mac, with the ability to jump straight back in, an automatic capture tool like Echo does the job the exports were never designed to do. See full Spotify listening history on Mac and what Echo remembers, and from where for more on what gets captured.

Frequently asked

Can I combine my Spotify and YouTube history without writing code?
Yes, using a spreadsheet. Import both JSON exports (usually via a JSON-to-table add-on), normalise the timestamp columns to the same format and time zone, then sort and stack the rows into one tab. It works, but it gets slow and fiddly once your combined history runs past a few hundred rows.
Why do Spotify and YouTube history files need to be joined by timestamp?
Timestamp is the only field both exports share in a comparable form. Spotify logs track, artist, album, and time; YouTube logs video title, channel, and time. There is no shared ID between the two platforms, so lining up entries by when they happened is the only practical way to interleave them into one timeline.
Does a merged Spotify and YouTube spreadsheet update automatically?
No. Both source exports are one-off snapshots, so a spreadsheet or script built from them is out of date the moment you finish building it. Getting a current view means repeating the whole export, wait, and merge cycle again.
Does Echo replace the need to export from Spotify or Google Takeout?
For day-to-day use, yes. Echo records Spotify plays and YouTube views on your Mac as they happen, building one combined, searchable, on-device history with no export or waiting. The official exports are still worth using if you specifically want a portable data archive for other tools or long-term backup.
Can a merged export show me where I stopped in a YouTube video?
No. Neither Spotify's streaming history export nor a Google Takeout watch-history file records watch position or resume point, only that a track or video was played and when. Echo captures the exact position and lets you resume from it with a keyboard shortcut.
Written by the Echo team

We build Echo, a native macOS app that remembers everything you play across your apps and your browser, and brings any of it back at the exact spot with one keystroke.

One History, No Exports

Echo records Spotify, YouTube, and everything else you play on your Mac into a single searchable history, live, with no merging required.

One-time purchase, yours forever.
All articles