Skip to content
Unofficial documentation for the Scratch API.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api
etc
.gitignore
README.md

README.md

Welcome to the Scratch API Unofficial Documentation! This wiki is an organized place to put all the information the community has gathered about the new Scratch API.

Things for you to do:

If you have a bunch of information about an API: Feel free to fork, write documentation, and make a pull request to here!

If you know of an API but not a lot about it: A good idea would be to make an issue about it. Please give us sources of where you got the information about it, and/or any information you have about it.

If you're just looking around: Keep on reading to learn a little bit more about the APIs! You can find the documentation in /api/ and you can find other API-related things in /etc/.

What is the Scratch API?

The Scratch API is an online API for using information from Scratch. It's currently in development but is being worked on steadily by the Scratch Team. It's part of their upgrade to the Scratch site. There used to be an old API that was fairly well documented, but it was deprecated on October 26th 2015, and with the new, fresh API coming with the upgrade to the site we (as in the people who use the Advanced Topics) decided there needed to be better documentation.

How can you use the Scratch API?

Simple enough - say you want to get the number of projects currently made. You'd just send a GET request to the API page /projects/count/all. This can be as simple as opening the API page in your browser: http://api.scratch.mit.edu/projects/count/all.

Many of the things on the API are going to be more useful to program (or web) developers, but it can be fun for anybody just to look around and experiment with it.

The output of a request is generally (supposed to be) a JSON object. Most programming languages have functions such as JSON.parse to use the data.

You can also use a built-by-the-community programming library like scratch-api (Node.js) or scratchapi (Python) to connect to the API.

You can’t perform that action at this time.