Scraperjavascript62137
Sticker.ly - Sticker Pack Search, Detail & Direct WebP Downloader Scraper
Scraper resmi internal Sticker.ly hasil reverse engineering langsung dari APK Android (tanpa API pihak ketiga). Mendukung pencarian sticker pack, detail pack, direct link WebP resolusi asli, dan file arsip ZIP.
Vamz Spectre18 Okt 2026199 baris kode
Jalankan via Terminal / CLI:
# 1. Download file script
curl -sL "https://code.vamxapi.my.id/snippet/raw/stickerly-scraper" -o stickerly-scraper.js
# 2. Jalankan script
node stickerly-scraper.js
stickerly-scraper.js(199 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/**
* Sticker.ly - Native Sticker Pack Search, Detail & Direct WebP Downloader Scraper
* Reverse-Engineered directly from Sticker.ly Mobile APK (No 3rd-party API wrappers)
*
* Download & Run CLI:
* curl -sL "https://code.vamxapi.my.id/snippet/raw/stickerly-scraper" -o stickerly-scraper.js
* node stickerly-scraper.js "pentol"
* node stickerly-scraper.js "https://sticker.ly/s/ZVTUK8"
*
* Author: Vamz Spectre / VamxAPI
*/
const STICKERLY_BASE = "http://api.sticker.ly";
const DEFAULT_HEADERS = {
"User-Agent": "okhttp/4.9.3",
"x-stickerly-client-version": "3.40.0",
"x-stickerly-os-type": "android",
"Accept": "application/json"
};
/**
* Mencari sticker pack di Sticker.ly secara langsung via internal search engine
* @param {string} query - Kata kunci pencarian (contoh: pentol, anime, meme)
* @param {number} [limit=20] - Batas jumlah pack yang dikembalikan
* @returns {Promise<Array>} Daftar sticker pack Sticker.ly
*/
async function searchStickerly(query, limit = 20) {
if (!query || typeof query !== "string" || !query.trim()) {
throw new Error("Parameter query pencarian Sticker.ly wajib disertakan.");
}
const cleanQuery = query.trim();
const res = await fetch(`${STICKERLY_BASE}/v4/sticker/searchV2`, {
method: "POST",
headers: {
...DEFAULT_HEADERS,
"Content-Type": "application/json"
},
body: JSON.stringify({
keyword: cleanQuery,
size: Math.max(limit * 3, 30)
})
});
if (!res.ok) {
throw new Error(`Gagal mencari stiker (HTTP ${res.status}): ${res.statusText}`);
}
const data = await res.json().catch(() => ({}));
const rawStickers = Array.isArray(data?.result?.stickers) ? data.result.stickers : [];
if (rawStickers.length === 0) {
return [];
}
const packsMap = new Map();
for (const item of rawStickers) {
const p = item.stickerPack;
if (!p || !p.packId) continue;
if (!packsMap.has(p.packId)) {
const trayUrl = p.trayResourceUrl || item.resourceUrl || "";
let prefix = "";
if (trayUrl && trayUrl.includes("/")) {
prefix = trayUrl.substring(0, trayUrl.lastIndexOf("/") + 1);
}
const files = Array.isArray(p.resourceFileNames) ? p.resourceFileNames : [];
const previewStickers = files.slice(0, 5).map((f) => (prefix ? `${prefix}${f}` : f));
packsMap.set(p.packId, {
pack_id: p.packId,
name: p.name || item.packName || "Sticker Pack",
author: {
name: item.user?.userName || "-",
username: item.user?.userName || null,
avatar: item.user?.profileUrl || null
},
animated: Boolean(item.animated),
views: item.viewCount || 0,
exports: 0,
share_url: `https://sticker.ly/s/${p.packId}`,
download_zip: prefix ? `${prefix}pack.zip` : null,
tray_url: trayUrl,
total_stickers: p.stickerCount || files.length || 0,
preview_stickers: previewStickers
});
if (packsMap.size >= limit) break;
}
}
return Array.from(packsMap.values());
}
/**
* Mengambil detail pack & seluruh file stiker .webp dari Sticker.ly berdasarkan URL atau Kode Pack
* @param {string} codeOrUrl - URL Sticker.ly (https://sticker.ly/s/CODE) atau kode pack (contoh: ZVTUK8)
* @returns {Promise<Object>} Detail sticker pack & direct file stiker
*/
async function getStickerlyPack(codeOrUrl) {
if (!codeOrUrl || typeof codeOrUrl !== "string" || !codeOrUrl.trim()) {
throw new Error("Parameter URL atau Kode Pack Sticker.ly wajib disertakan.");
}
const raw = codeOrUrl.trim();
const match = raw.match(/sticker\.ly\/s\/([a-zA-Z0-9_-]+)/i) || raw.match(/^([a-zA-Z0-9_-]+)$/);
if (!match) {
throw new Error("Format kode pack atau URL Sticker.ly tidak valid. Contoh: https://sticker.ly/s/ZVTUK8 atau ZVTUK8");
}
const code = match[1];
const targetUrl = `${STICKERLY_BASE}/v4/stickerPack/${encodeURIComponent(code)}`;
const res = await fetch(targetUrl, {
headers: DEFAULT_HEADERS
});
const json = await res.json().catch(() => ({}));
if (!json?.result || json.error) {
if (json?.error?.errorMessage === "general.internalError") {
throw new Error(`Sticker pack "${code}" tidak ditemukan, bersifat private, atau sudah dihapus dari Sticker.ly.`);
}
throw new Error(json?.error?.errorMessage || `Sticker pack dengan kode "${code}" tidak ditemukan.`);
}
const p = json.result;
const prefix = p.resourceUrlPrefix || "";
const stickersList = Array.isArray(p.stickers) ? p.stickers : [];
return {
pack_id: p.packId || code,
code: code,
name: p.name,
author: {
name: p.authorName,
username: p.user?.userName || null,
avatar: p.user?.profileUrl || null
},
animated: Boolean(p.isAnimated || p.animated),
views: p.viewCount || 0,
exports: p.exportCount || 0,
share_url: p.shareUrl || `https://sticker.ly/s/${code}`,
download_zip: prefix ? `${prefix}pack.zip` : null,
total_stickers: stickersList.length,
stickers: stickersList.map((s) => ({
sid: s.sid || null,
url: `${prefix}${s.fileName}`,
fileName: s.fileName,
tags: s.tags || [],
animated: Boolean(s.isAnimated || s.animated),
views: s.viewCount || 0
}))
};
}
// CLI Runner Support
if (process.argv[1] && process.argv[1].endsWith("stickerly-scraper.js")) {
const input = process.argv[2];
if (!input) {
console.error("Usage:");
console.error(" node stickerly-scraper.js <query_atau_url_pack>");
console.error("Examples:");
console.error(" node stickerly-scraper.js \"pentol\"");
console.error(" node stickerly-scraper.js \"https://sticker.ly/s/ZVTUK8\"");
process.exit(1);
}
(async () => {
try {
const isUrl = input.includes("sticker.ly/s/");
const isExactCode = /^[A-Z0-9]{6,8}$/.test(input.trim());
if (isUrl || isExactCode) {
try {
const detail = await getStickerlyPack(input);
console.log(JSON.stringify(detail, null, 2));
return;
} catch (err) {
if (!isUrl) {
// Fallback to keyword search if not a direct URL
const searchList = await searchStickerly(input);
console.log(JSON.stringify(searchList, null, 2));
return;
}
throw err;
}
}
const searchList = await searchStickerly(input);
console.log(JSON.stringify(searchList, null, 2));
} catch (err) {
console.error(JSON.stringify({ error: true, message: err.message }, null, 2));
process.exit(1);
}
})();
}
export { searchStickerly, getStickerlyPack };