Open the game signed in. Guest mode saves nothing.
Paste this in the console (F12). If asked, type allow pasting first.
// SurvivorTiers · export your PokéSurvivor collection. Paste it in the game's console with your session open.
// It only reads localStorage (keys ps.save.<name> and ps.cloud.<uid>). It does not use G or make network requests.
(() => {
const SOURCES = [['ps.save.', 'local save'], ['ps.cloud.', 'account (cloud)']];
const keysOf = n => Object.keys(n || {}).map(Number).filter(Number.isInteger).sort((a, b) => a - b);
const found = [];
try {
for (let i = 0; i < localStorage.length; i++) {
const k = localStorage.key(i);
const f = SOURCES.find(([p]) => k.startsWith(p));
if (!f) continue;
try {
const s = JSON.parse(localStorage.getItem(k));
if (s && typeof s === 'object' && s.owned && typeof s.owned === 'object') found.push({ k, kind: f[1], s });
} catch (e) { /* broken entry: ignored */ }
}
} catch (e) {
console.warn('Cannot read localStorage on this page:', e.message);
return null;
}
if (!found.length) {
console.warn('There is no saved game in this browser. Guest mode saves nothing: ' +
'log in with your account, play for a moment and paste the command again in the console of that same game tab.');
return null;
}
found.sort((a, b) => (+b.s.updated || 0) - (+a.s.updated || 0));
if (found.length > 1) {
console.table(found.map(h => ({ source: h.kind, name: h.s.name, key: h.k, pokemon: keysOf(h.s.owned).length,
modified: h.s.updated ? new Date(+h.s.updated).toLocaleString() : '-' })));
}
const { s, kind } = found[0];
// shinyInfo: { «no.»: [origin, day] }. Origin: 0 wild, 1 gacha, 2 other. Day: days since 1970 (UTC) of the catch.
const ORIGIN = { wild: 0, gacha: 1 };
const shinyInfo = {};
keysOf(s.shiny).forEach(n => {
const e = s.shiny[n];
const at = +(e && e.at);
shinyInfo[n] = [ORIGIN[e && e.from] ?? 2, at > 0 ? Math.floor(at / 864e5) : null];
});
const out = { version: 2, name: String(s.name || ''), updated: +s.updated || 0, dex: keysOf(s.owned), shiny: keysOf(s.shiny), shinyInfo };
const wild = Object.values(shinyInfo).filter(([o]) => o === 0).length;
const text = JSON.stringify(out);
console.log(`Collection of "${out.name}" (${kind}): ${out.dex.length} Pokémon, ${out.shiny.length} shiny (${wild} wild).`);
// Straight to the clipboard with the console's copy(). If that function is missing, the JSON is printed to copy by hand.
if (typeof copy === 'function') {
copy(text);
console.log('JSON copied to the clipboard. Paste it on the "My collection" page.');
} else {
console.log('Copy this JSON and paste it on the "My collection" page:\n' + text);
}
return out;
})();
Paste the result here. It is kept in this browser for next time and never leaves it.