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.
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.
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.
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:
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.