Scratch

From Archiveteam
Jump to navigation Jump to search

Scratch is 'a high-level block-based visual programming language and website aimed primarily at children as an educational tool for programming'[1].

In May 2022, it was rumoured that unshared projects, previously accessible through the API and thereby with third-party client alternatives, would likely be made private soon.[2]

It is possible to download public projects through the API[3].

Archival

In January 2022, SpaceByte made the Scratch File Software Collection which contains as of August 2026, 320 items and 48.0GB of storage size. The collection is for user contributions.

In May 2022, Micah Lindley made an archive of the first 100 thousand Scratch projects (1-100 000) which resulted in a 56.1G compressed zip file, then other 2 contributors made an archive of IDs 70 000-80 000 and 200 000-210 000, both 256.7M and 3.0G avaidable in this list:

Tools for archiving

If you use sbdl you can download Scratch projects using the API. For downloading you can use npm and execute npm -g @turbowarp/sbdl. After installing you can download them using the sbdl $ID command. An example of use:

~$ sbdl 100000
Downloading project from ID: 100000
Saved to: /home/(YOURUSER)/happy_birthday_funkadelihippo!!!!!!!!!!!!!! (100000).sb2

If you want to get an $ID-$TITLE format for mass downloading you can execute the command cd "$(npm root -g)/@turbowarp/sbdl", then sudo nano src/cli.js and replace this code:

title = downloadedProject.title ? `${downloadedProject.title} (${id})` : id;

With this one:

title = downloadedProject.title ? `${id}-${downloadedProject.title}` : id;

After that it will work like this:

~$ sbdl 100000
Downloading project from ID: 100000
Saved to: /home/(YOURUSER)/100000-happy_birthday_funkadelihippo!!!!!!!!!!!!!!.sb2

Technical details

  • Website (official client): https://scratch.mit.edu/[IAWcite.today]
  • API: projects.scratch.mit.edu
    • https://projects.scratch.mit.edu/ID returns the data for a project. It can be either a JSON response with references to assets (hosted on assets.scratch.mit.edu) or, for old projects up to ID 3.8 million or so, a binary file that includes the assets. IDs are decimal and go to around 690 million as of late May 2022.
    • Fetching a project file through the API will download the file in the contemporary format it was uploaded to the website (.sb, .sb2 for pre-Scratch 3 projects). This is unlike manually downloading a project through the website interface which automatically convert project files in .sb3.

References