read
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
In the before times, when I solved a problem like this, I’d open-source the code. Now I’m not sure there’s much point. There’s a prompt at the end so you can scratch your own itch.
I was at a loose end the other day and thought to myself, I wouldn’t mind rewatching a series I watched a while back on Prime.
The problem with this seemingly simple task is that Prime has stored the fact that I’ve watched every episode. Even worse, it’s stored the point where I stopped watching each episode - which is invariably at the start of the closing titles.
I wanted to start from the beginning, but it insisted on starting where I’d “left off”.
The obvious fix is to reset the watch status on the series. Should be simple…
There’s no UI to do this in the Prime app. You have to do it on the web. And when you do, you end up using something aggressively user-unfriendly. Whoever was asked to develop it was evidently told “make this as difficult to use as possible - we want people to give up”.
You can see your watch history. It’s an infinitely scrolling list of all the episodes you’ve watched. There are no filters and no bulk actions. You have to delete each season one day at a time, and every viewing is a separate row. It’s designed to frustrate and annoy you.

Of course, nowadays we don’t need to put up with this kind of nonsense. I opened the page in Chrome and set Claude to work driving it. Then I thought: this won’t be the last time I do this. Claude, write me a script. Then came the follow-up thought: screw it, write me a nice app to manage my watch history, with all the bells and whistles.
A short time later, we have this thing of beauty!

And of course we also support dark mode out of the box.
This is the point where, in the before times, I’d push it up to GitHub. But why would I? You can build it yourself, with a UI that suits you. Here’s a quick brief for Claude (other coding agents are available).
Build me a [macOS Windows Linux] app for browsing and bulk-deleting my Prime Video and Netflix watch history. Auth: Embed a web view. If a request comes back signed out, show the web view in a sheet or dialog and load
{base}/settings/watch-history(Prime redirects to sign-in if needed). Close it once it lands back there. Never touch the password.API: Run
fetchcalls as JavaScript inside the web view so they’re same-origin and carry the session cookies. Base URL ishttps://www.primevideo.com/region/eu(make the region a setting).
- Read:
GET {base}/api/getWatchHistorySettingsPage?widgetArgs={"nextToken":…}. Thewatch-historywidget has anextTokenfor paging andtitles: a list of day groups, each with the titles watched that day. Each title has agti,titleType(season/movie/episode),imageSrc, anactions.REMOVEblock (titleIds,token) andchildrenfor the individual episodes, each with its own REMOVE action.- Delete:
POST {base}/api/activityHistoryTitleUpdatewith form bodyaction=REMOVE&titleIds=…&token=…and headerx-requested-with: XMLHttpRequest. It returnsisSuccess: true.Storage and sync: Keep the history as JSON in the app’s data folder, keyed by day +
gti. Incremental sync pages newest-first and stops at the newest day already stored, then replaces those days wholesale. Also add a full re-sync.Grouping: Prime lists seasons, not series (“REACHER (TV) - SEASON 01”, “The Expanse - Season 3”). Strip the season suffixes and tags and normalise case and punctuation so the seasons group into one show.
UI: Whatever you like - or just leave it to Claude!
Gotcha: Prime sometimes reports success on deletes for old entries and then keeps them. After deleting, re-read history in the background back to the oldest deleted day and restore anything that’s still there.
I know some people will be thinking, come on man, you’ve done the hard part of building the app, just give it to us. But really, that’s not the hard part anymore. In fact, none of this was particularly difficult.
What would be difficult is supporting an open-source project that does this. It’s built on Prime’s undocumented API, so it will break. If I open-sourced it, I’d be signing up for a steady stream of “it’s stopped working” issues. There would also be the usual bunch of feature requests for things I don’t need. Open-source projects can quickly become a thankless task.
You’ll note from the screenshot that I also added Netflix - why not, when it’s so easy to add new features?
Netflix: Same approach, on
https://www.netflix.com/settings/viewed/<profile>. Netflix lists one row per episode or movie.
- Read:
POST /api/aui/pathEvaluator/web/^2.0.0?method=call&callPath=["aui","viewingActivity",<page>,<size>]with form bodyparam={"guid":"<profile>"}. Page 0 always has 20 rows. The reply includesvhSize, the total row count.- Delete: the
HideTitleViewingGraphQL mutation, posted to/graphqlas a persisted query (by id only; the query text is rejected) with{videoId, hideAllEpisodes, profileGuid}.hideAllEpisodes: trueremoves a whole series in one go. Read the query id from the page’s scripts, as it changes when Netflix ships a new build.
And you’ve also got the BBC:
ok, we also have the bbc being rubbish - https://www.bbc.co.uk/iplayer/continue-watching
So there you go. Everything you need to build your own is above.
Of course, it does make you wonder: if building things is this easy now, why do these services have such terrible UIs for managing your watch history?
Related Posts
Related Videos
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Written by
Chris Greening
Published