The UnstopLeaderboardScraper is a browser-based utility script designed to run directly within the Developer Tools Console on an active Unstop leaderboard/results page. It asynchronously fetches, parses, and structures multi-page leaderboard data, optimizes memory usage by indexing organization strings, and provides a utility to download the compiled results directly as a JSON file.
-
Automated API Mapping: Extracts round configuration IDs directly from the current window URL.
-
Throttled Concurrency: Uses a staggering delay strategy (setTimeout multiplied by page indices) to bypass aggressive API rate-limiting during parallel data fetches.
-
Memory Optimization: De-duplicates and strips repetitive institution/organization names into a standalone index array, replacing text mentions in player profiles with lightweight pointers.
-
Immutable Results: Employs Object.freeze() heavily across internal nested arrays to prevent accidental data contamination prior to extraction.
The scraper maps the following Unstop URL sub-paths to their respective API round signatures:
/online-assessment/case-submissions/offline-round
-
Navigate to the desired Unstop live leaderboard page.
-
Open the browser Developer Tools console (
F12orCtrl+Shift+I/Cmd+Option+I). -
Paste the entire
UnstopLeaderboardScraper.jscode into the console prompt and press Enter to register the function.
Invoke the scraper by running the function in the console. Because it relies on network operations, capture its resolved output using await:
const leaderboard = await UnstopLeaderboardScraper(150);To save the generated payload directly to your local file system, call the embedded method returned within the response object:
leaderboard.downloadJSON("leaderboard_export.json", null, 2);UnstopLeaderboardScraper(150).then(
leaderboard => leaderboard.downloadJSON("leaderboard_export.json", null, 2)
);UnstopLeaderboardScraper(delay)
| Parameter | Type | Default | Description |
|---|---|---|---|
delay |
number |
100 |
The staggering interval (in milliseconds) used to offset sequential page requests. Higher values reduce the risk of 429 Too Many Requests API errors. |
Resolves to a deeply frozen object containing the structured data payload:
-
data(Array): A nested list containing compressed team and player matrices.- Structure:
[ [ "Team Name", [ [ "Player Name", OrganisationIndex, "Username", ProbableGender ] ] ] ]- UnStop doesn't disclose Gender anywhere.
ProbableGenderis an intelligent guess based on user's Avatar URL. (UnStop has a fixed system for assigning default Avatar which users generally don't change.)1is for Probably Male.-1is for Probably Female.0is when we can't say.
- Structure:
-
organisations(Array<string>): The master index array containing unique organization names in alphabetical order. -
downloadJSON(filename, replacer, space)(Function): Reconstructs the compressed indexes back into standard human-readable JSON formats and triggers an automatic browser attachment download.
Organizations are reduced to integer indexes to optimize performance:
{
"data": [
[
"Alpha Coders",
[
["Alice Smith", 0, "alice_s_99", -1],
["Bob Jones", 1, "bjones_dev", 1]
]
]
],
"organisations": [
"Massachusetts Institute of Technology",
"Stanford University"
]
}When calling .downloadJSON(), the indexes are automatically re-mapped back to their full names for immediate analytical use:
[
[
"Alpha Coders",
[
["Alice Smith", "Massachusetts Institute of Technology", "alice_s_99", "Female"],
["Bob Jones", "Stanford University", "bjones_dev", "Male"]
]
]
]-
Error: Cannot handle {nameKey} Leaderboard.: Thrown if the script is executed on an unsupported Unstop URL route. Ensure the URL actively targets an assessment, case submission, or offline round leaderboard. -
CORS & Session Constraints: Must be executed inside an active Unstop browser tab session. Running this outside
unstop.comvia separate runtimes (like Node.js) will fail due to Browser Cross-Origin Resource Sharing restrictions.
Educational Purposes Only: This script is provided solely for educational, research, and personal data analysis purposes.
-
No Affiliation: This project is completely independent and is not affiliated, associated, authorized, endorsed by, or in any way officially connected with Unstop or any of its subsidiaries.
-
Platform Terms of Service: By using this script, you acknowledge that automating the extraction of platform data may violate Unstop’s Terms of Service regarding automated scraping. The user assumes full responsibility for any risks, platform rate-limits, or account restrictions resulting from the use of this tool.
-
No Maintenance Guarantees: Because this script relies on internal Unstop API endpoints (/api/public/live-leaderboard/...) and specific DOM/URL formatting, it may break at any time without notice if the platform updates its underlying architecture or API payload structures.
-
As-Is Basis: This software is provided "as-is" without warranty of any kind. The author is not liable for any data loss, platform bans, or unintended side effects caused by running this code in your browser console.