sunoでたくさん曲を作ると、その一覧が欲しいとか曲情報が欲しいとかなる。しかし、sunoではAPIが公開されていない。内部的につかっているAPI をみつけても、それを外側から利用しようとすれば、そりゃ怒られる。
では、どうするかといえば、ブラウザハックだ。ブラウザ上でDeveloper Toolを表示してJavaScriptを実行するという方法をとればなんとかなる。
いろいろ試みた結果、表示している部分に関してはとれるのだが、自動スクロールとか組み合わせてやってみたが安定性に欠けてしまった。自分のは1100行くらいを取ることができたが、この時のプログラムがみんなのところで動作するかどうか保証ができないのであきらめた。
今回公開するのは、JavaScriptでレコーディングを開始し、手動でゆっくりとスクロールしたうえで、最後は save(); と打ち込んだら、そこまでの一覧を保存するという、なかなかの手動操作バージョンである。
Suno Manual Capture Recorder
(function() {
const allSongs = new Map();
console.log("🔴 RECORDER STARTED: Please scroll down slowly MANUALLY.");
console.log("🔴 Once you reach the end, type save() and press Enter.");
const timer = setInterval(() => {
document.querySelectorAll('a[href^="/song/"]').forEach(link => {
const url = link.href;
if (!allSongs.has(url)) {
const row = link.closest('[role="row"]') || link.parentElement.parentElement;
const title = link.innerText.trim();
const style = row.querySelector('[class*="style"]')?.innerText.trim() || "";
const image = row.querySelector('img')?.src || "";
// Filter out social notifications
if (title && !row.innerText.includes("liked") && !row.innerText.includes("followed")) {
allSongs.set(url, { title, style, url, image });
console.log(`Captured: ${allSongs.size} - ${title}`);
}
}
});
}, 500);
// Function to stop recording and download the CSV
window.save = function() {
clearInterval(timer);
let csv = "title,style_prompt,suno_url,jacket_image\n";
allSongs.forEach(s => {
csv += `"${s.title.replace(/"/g, '""')}","${s.style.replace(/"/g, '""')}","${s.url}","${s.image}"\n`;
});
const blob = new Blob([new Uint8Array([0xEF, 0xBB, 0xBF]), csv], { type: 'text/csv;charset=utf-8;' });
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = `suno_capture_${allSongs.size}.csv`;
a.click();
console.log("💾 CSV successfully generated and downloaded.");
};
})();
📝 Final SNS Instructions (English)
Step 1: Navigate to your Library Go to your Suno library at https://suno.com/me. (Tip: Make sure you are on the "Public" or "All" tab depending on what you want to export.)
Step 2: Open the Developer Console Right-click anywhere on the page and select "Inspect", then click the "Console" tab. Alternatively, just press F12 (or Cmd+Opt+J on Mac).
Step 3: Run the Recorder Script Copy and paste the script below into the console and hit Enter. You will see a message: 🔴 RECORDER STARTED.
Step 4: The "Manual Hunt" Now, simply scroll down through your library. You don't need to rush—the script records every song that appears on your screen. You’ll see a live count of captured songs in the console.
Step 5: Export your Data When you’ve reached the point you want to stop, type save() in the console and press Enter. Your browser will immediately download the .csv file.