Bulk organize your media
In your browser, utilizing GP's undocumented web api
-
Install any recommended userscript manager for your browser
- Violentmonkey
- Tampermonkey
- If you're on Android, try Firefox browser, it supports Tampermonkey
-
Click Install
-
Accept installation
Tutorial
-
Go to photos.google.com and click the GPTK icon in the top bar to open it
-
Select a source from which to read from:
-
Use Filters to filter found items with:
-
Select an action to apply to found items:
This example groups all space-consuming media in one album.
- Make sure "Library" is the selected source
- Select
SPACE-CONSUMING
in theSpace
filter - Select action
Add to new album
As simple as selecting "Library" source, clicking Move to trash
, then clearing it.
GPTK exports it's api class globally so you can use it in your browser's console. It's much more powerful than the UI!
Example usage.
// getting the fist page of the library by taken date
const libraryPage = await gptkApi.getItemsByTakenDate()
// getting the info of the first item on the page
const itemInfo = await gptkApi.getItemInfo(libraryPage.items[0].mediaKey)
console.log(itemInfo)
If you want to learn more about how GP's api works, read https://kovatch.medium.com/deciphering-google-batchexecute-74991e4e446c
I just found this post, after doing all the work from zero :D
Also, i've made a userscript that parses all responses and logs them to console in a more readable way, you can find it here - https://github.com/xob0t/Google-Photos-Toolkit/tree/main/tools
If something does not work, open an issue and describe it in detail
If you have a question, open a discussion
Borrowed some code and UI inspiration from undiscord
If GPTK is useful to you, please consider supporting the project:
BTC 12znTocLytrrYhQT4AJVeJdR8KTULWbKb7