Skip to content

Instantly share code, notes, and snippets.

@duracell
Created February 24, 2026 05:32
Show Gist options
  • Select an option

  • Save duracell/178b47dd21aa2b0de22febc285d63ddb to your computer and use it in GitHub Desktop.

Select an option

Save duracell/178b47dd21aa2b0de22febc285d63ddb to your computer and use it in GitHub Desktop.
A small js to add Steam games to you wishlist, for example if you want to merge multiple wishlists from different steam account or move to another account
// You need to paste this code in your browser's console while on steam store, on chrome you need to allow pasting before.
// List AppIDs here
// I got it by exporting via argumented steam browser extension and using export text with "%appid%,"
const appIdsToAdd = [1, 2, 3, 4];
(async function () {
"use strict";
// Safety check to ensure you are logged in and on the right page
if (typeof g_sessionID === "undefined") {
console.error("Session ID not found! Make sure you are logged in and on store.steampowered.com");
return;
}
const sleep = ms => new Promise(r => setTimeout(r, ms));
let count = 0;
for (const appid of appIdsToAdd) {
// Prepare the data to send to the server
const data = new URLSearchParams();
data.set("sessionid", g_sessionID);
data.set("appid", appid);
try {
// Talk directly to Steam's hidden Wishlist API
const response = await fetch("https://store.steampowered.com/api/addtowishlist", {
method: "POST",
body: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
}
});
const result = await response.json();
if (result.success === true || result.success === 1) {
count++;
console.log(`[Success] Added AppID: ${appid} (${count}/${appIdsToAdd.length})`);
} else {
console.error(`[Failed] Could not add AppID: ${appid}`, result);
}
} catch (err) {
console.error(`[Error] Connection issue on AppID: ${appid}`, err);
}
// 3-second delay against bot detection
await sleep(3000);
}
console.log("Finished importing wishlist! You can now refresh the page.");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment