Discuss Scratch
- apple502j
-
Scratcher
1000+ posts
★Scratch API with Python★
You can use Scratch APIs in Python programs!
Hello! I made an API client library for Scratch API! You can use it for making stuffs about Scratch.
1. Install scratchapi2
You need:
- Python 3 or later
- Internet connection
- Pico Cookies ($2) of course it's joke.
pip3 install scratchapi2
2. Enjoy
・ Get one's message count
import scratchapi2 username=input("Username:") print("{0} has {1} messages".format(username, scratchapi2.User(username).unread_messages()))
・Save your project JSON
import scratchapi2 project=input("Project ID:") scratchapi2.Project(project).save_json("project.json")
3. Contribute
Source code: https://github.com/apple502j/scratchapi2
4. FAQ
Q: What's the difference between original scratchapi?
A: It's completely rewritten. It does not contain things which needs tokens or authentication: however, it contains lots of new APIs!
Q: What does it contain?
A: For example:
- Project Search
- Featured Projects API
- Username Checker
- Asset Saving
- Translate API
Q: Is it made by ST?
A: NO.
- apple502j
-
Scratcher
1000+ posts
★Scratch API with Python★
You can even download a whole project: https://github.com/apple502j/download-sb2
(Uses this library)
(Uses this library)
- ninjagolloyd
-
Scratcher
500+ posts
★Scratch API with Python★
You can even download a whole project: https://github.com/apple502j/download-sb2hasn't this been a thing for a while? i'll drop a link later
(Uses this library)
- apple502j
-
Scratcher
1000+ posts
★Scratch API with Python★
We need your help: Add token handlers, please!
https://github.com/apple502j/scratchapi2/issues/10
https://github.com/apple502j/scratchapi2/issues/10
- apple502j
-
Scratcher
1000+ posts
★Scratch API with Python★
Working on a new version with Studio full-support!
- apple502j
-
Scratcher
1000+ posts
★Scratch API with Python★
Update: No updates will come till ST shows clear guidelines
I was so eager to make a new version, Version 2.0, which supports authentication. However, ST said using the library will be against their policies. That means, I cannot test this version either. And, I never want to give you illegal tools.
That said, unless ST gives us a clear API guideline, I never update scratchapi2, neither on PyPI nor GitHub. My new version was almost finished and is about to be released. I'm sad with this, but I cannot do anything.
Most of the functions in released versions use officially-documented APIs. This does not ensure all uses of this library is fine, but I am not going to delete that repository or package.
See you later, guys.
@apple502j There is nothing I can do to stop you from making the library, but almost any usage of that library would be against our policies.https://scratch.mit.edu/users/thisandagain/#comments-56715608
I was so eager to make a new version, Version 2.0, which supports authentication. However, ST said using the library will be against their policies. That means, I cannot test this version either. And, I never want to give you illegal tools.
That said, unless ST gives us a clear API guideline, I never update scratchapi2, neither on PyPI nor GitHub. My new version was almost finished and is about to be released. I'm sad with this, but I cannot do anything.
Most of the functions in released versions use officially-documented APIs. This does not ensure all uses of this library is fine, but I am not going to delete that repository or package.
See you later, guys.
- ninjaMAR
-
Scratcher
1000+ posts
★Scratch API with Python★
Removed
Last edited by ninjaMAR (Aug. 19, 2020 00:20:34)
- ahmetlii
-
Scratcher
500+ posts
★Scratch API with Python★
Yes , it can be usable for crash the servers with too many requests from API. And it can do things worse with a bot and hooks for sign in sessions.I am using this
hmmm….
Last edited by ahmetlii (Aug. 18, 2020 22:03:55)
- ninjaMAR
-
Scratcher
1000+ posts
★Scratch API with Python★
it was for schoolYes , it can be usable for crash the servers with too many requests from API. And it can do things worse with a bot and hooks for sign in sessions.I am using this
hmmm….
Last edited by ninjaMAR (Dec. 2, 2020 20:33:08)
- ninjaMAR
-
Scratcher
1000+ posts
★Scratch API with Python★
bad post
Last edited by ninjaMAR (March 15, 2021 18:06:42)
- Chiroyce
-
Scratcher
1000+ posts
★Scratch API with Python★
OMG! This is soo useful!!Update: No updates will come till ST shows clear guidelinesYou are not allowed to use it.@apple502j There is nothing I can do to stop you from making the library, but almost any usage of that library would be against our policies.https://scratch.mit.edu/users/thisandagain/#comments-56715608
I was so eager to make a new version, Version 2.0, which supports authentication. However, ST said using the library will be against their policies. That means, I cannot test this version either. And, I never want to give you illegal tools.
That said, unless ST gives us a clear API guideline, I never update scratchapi2, neither on PyPI nor GitHub. My new version was almost finished and is about to be released. I'm sad with this, but I cannot do anything.
Most of the functions in released versions use officially-documented APIs. This does not ensure all uses of this library is fine, but I am not going to delete that repository or package.
See you later, guys.
I CANT? Then what am I allowed to use? I see people use NodeJS servers so what module can I use with Python?
- ninjaMAR
-
Scratcher
1000+ posts
★Scratch API with Python★
can you use cloud variables with thisno
read the source code and the whole topic
- Rendangbike2
-
Scratcher
1000+ posts
★Scratch API with Python★
but almost any usage of that library would be against our policies.Are you sure? Here are some of my points about why that MIGHT not be true:
- Other people have done it.
Now, if you commit a bad thing and said it was okay because someone else has done it, It's not a good point. But there are already different API's who collect *common informations.
Let me think of some on top of my head.
Ocular,
ScratchDB,
Scratch's own API!,
Shefwerld and
ScratchStats
See? Scratch has other third parties whose job is to collect *common informations.
*I'm referring common as the information that everyone can know about a scratcher like when they join, how many projects does they have, etc. - It's okay.
So thisandagain said it would be against their policy but I don't see any where in ToS or GC that says that it isn't allowed to collect common information. The only thing close is this:4.7 All user-generated content is provided as-is. The Scratch Team makes no warranties about the accuracy or reliability of any user-generated content available through Scratch and does not endorse Scratch Day events or vet or verify information posted in connection with said events. The Scratch Team does not endorse any views, opinions, or advice expressed in user-generated content. You agree to relieve the Scratch Team of any and all liability arising from your user-generated content and from Scratch Day events you may organize or host.
There, It says “does not endorse” but does it say does not allow"? Nope.
Last edited by Rendangbike2 (Feb. 4, 2021 01:05:14)
- mybearworld
-
Scratcher
1000+ posts
★Scratch API with Python★
I would accept any answer from anyone who is an ST member.
thisandagain is a ST member.
- Rendangbike2
-
Scratcher
1000+ posts
★Scratch API with Python★
But did he answer?I would accept any answer from anyone who is an ST member.
thisandagain is a ST member.
- mybearworld
-
Scratcher
1000+ posts
★Scratch API with Python★
https://scratch.mit.edu/users/thisandagain/#comments-56715608But did he answer?I would accept any answer from anyone who is an ST member.
thisandagain is a ST member.

