Skip to content
Sarah Otts edited this page Aug 8, 2018 · 6 revisions

Welcome to the Scratch REST API! Here you can find information on how to read and write data from and to Scratch programmatically. To get started, here's some general information on how our API works, and its current status.

Getting Started

The Scratch REST API is interactable through HTTPS requests. Though some of our endpoints require that you are an authenticated Scratch user to access, you can easily get started and see how the API works with some of our public enpoints. For example:

curl -X GET https://api.scratch.mit.edu/users/mres/following

will return a JSON object containing the list of people user mres is following. All API endpoints will fall under the api.scratch.mit.edu domain.

Query Parameters

The API provides two optional query parameters that can be used to limit and/or paginate routes that return an array. limit defaults to 20 items which is the maximum number of items that the API will return at any one time. limit can be any number from 1 to 40. offset defaults to 0 but can be any number up to 9007199254740991 (the maximum 64-bit floating point value).

Rate Limits

You are allowed to make 10 requests per second to the REST API. This is not per url, but rather 10 requests total to the API within each second. If you make more than 10 requests in a second, you may receive a 429 response code from the server (which signifies too many requests).

Clone this wiki locally