Discuss Scratch

Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

SUI v3.0
Scratch Username Index API. This API can be used to find usernames from their IDs.

Currently, SUI has indexed 3.0M+ (3.0 Million) users!

Note: As SUI was originally made for ScratchConnect Python library, you can also request any endpoint with the domain: “sui.scratchconnect.eu.org”. Eg., https://sui.scratchconnect.eu.org

Interactive Docs:
For interactive documentation, go to: https://sui.scratchconnect.eu.org/docs

Root
GET https://sui.scratchconnect.eu.org/

Status
This endpoint will give the status and other information about the server like the total number of users indexed, etc.
GET https://sui.scratchconnect.eu.org/status/

Get ID (from username)
Note: Use the Scratch API to get the ID of a user. Some user's data may not have been indexed… This endpoint was made just for testing…
Now using this endpoint you can also be able to index a user, his/her following and followers! Just give the username and the “Indexing” status will be shown!
GET https://sui.scratchconnect.eu.org/get_id/:username
Example: https://sui.scratchconnect.eu.org/get_id/griffpatch

Get User (from ID)
GET https://sui.scratchconnect.eu.org/get_user/:id
Example: https://sui.scratchconnect.eu.org/get_user/1882674

Get Random Data
Get the random indexed data.
https://sui.scratchconnect.eu.org/random/

Get Data
To get the data, use the “/get_data” endpoint. Eg. https://sui.scratchconnect.eu.org/get_data/?limit=100&offset=0

The “limit” parameter states the number of indexed data you want (max limit of 10K) and the “offset” parameter states the number of data you want to skip from the beginning. This is similar as used in the Scratch API except for the limit (Scratch API has a limit of 40…)

Note for Scratch Team
If the SUI API is spamming the Scratch API then I will discontinue running it or reduce the number of requests made. Currently, it makes 1-2 requests per 1 second.

Source Code
Source Code is on Github

Thank You!

Last edited by Sid72020123 (May 24, 2023 08:22:20)


Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

BUMP

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


-EmeraldThunder-
Scratcher
1000+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

I've always wanted something that allows you to do this! I can think of several projects I've dropped because of this.
What crawling algorithm have you used?

Nothing here.
Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

-EmeraldThunder- wrote:

I've always wanted something that allows you to do this! I can think of several projects I've dropped because of this.
What crawling algorithm have you used?
This just takes all the followers of famous users in Scratch. Then it collects the data of 40 followers of those followers…
After some time, I may add some new technique…

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

BUMP

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


mbrick2
Scratcher
1000+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

Could you add more information such as join date and status (scratcher, teacher, student)

Last edited by mbrick2 (Feb. 17, 2022 09:46:11)









My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage

The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26



Card Made By @Polygon
Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

mbrick2 wrote:

Could you add more information such as join date and status (scratcher, teacher, student)
I could have done that but that would increase the size of data stored of each user…
But still you can request to Scratch API or Scratch DB to get that information…

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


Chiroyce
Scratcher
1000+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

Chiroyce
Scratcher
1000+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

Suggestion for the get_id endpoint - use requests to get it from the Scratch API.

If the user is Chiroyce, get the JSON data from https://api.scratch.mit.edu/users/Chiroyce/
Here's a demo
from requests import get
def get_id(username):
    id = get(f'https://api.scratch.mit.edu/users/{username}').json()['id']
    return id







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

Chiroyce wrote:

Suggestion for the get_id endpoint - use requests to get it from the Scratch API.

If the user is Chiroyce, get the JSON data from https://api.scratch.mit.edu/users/Chiroyce/
Here's a demo
from requests import get
def get_id(username):
    id = get(f'https://api.scratch.mit.edu/users/{username}').json()['id']
    return id
I know that already but I made it so that I could have checked if the specific user is indexed…
I also wrote in the docs above.

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

Shall I add ‘all_data’ endpoint? What do you think? People may spam it but I may add API keys for that…

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


mbrick2
Scratcher
1000+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

Sid72020123 wrote:

(#11)
Shall I add ‘all_data’ endpoint? What do you think? People may spam it but I may add API keys for that…
YES PLEASE

Last edited by mbrick2 (Feb. 17, 2022 10:52:35)









My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage

The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26



Card Made By @Polygon
Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

mbrick2 wrote:

Sid72020123 wrote:

(#11)
Shall I add ‘all_data’ endpoint? What do you think? People may spam it but I may add API keys for that…
YES PLEASE
I am busy now because of school and my exams are gonna start soon…
I will think over this and I will make that endpoint…

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


god286
Scratcher
1000+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

all data should have a rate limit and only return 10-20 at a time


      
** ******** ** **
/** **////// // ****** /**
/** ****** ** ** ****** /** ***** ****** **/**///** ******
/** //////** /** /** //////** /********* **///**//**//*/**/** /**///**/
/** ******* //** /** ******* ////////**/** // /** / /**/****** /**
** /** **////** //**** **////** /**/** ** /** /**/**/// /**
//***** //******** //** //******** ******** //***** /*** /**/** //**
///// //////// // //////// //////// ///// /// // // //
Above inspired by @ISTILLMAKESTUFF, made with duckduckgo search “figlet 3d JavaScript”
Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

god286 wrote:

all data should have a rate limit and only return 10-20 at a time
Yes. I may add that…

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


mbrick2
Scratcher
1000+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

Where is the source code?








My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage

The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26



Card Made By @Polygon
Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

mbrick2 wrote:

Where is the source code?
Currently, the source code is on replit
I will add it to github soon…

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


mbrick2
Scratcher
1000+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

Sid72020123 wrote:

(#17)

mbrick2 wrote:

Where is the source code?
Currently, the source code is on replit
I will add it to github soon…
THROWS an error








My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage

The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26



Card Made By @Polygon
Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

mbrick2 wrote:

Sid72020123 wrote:

(#17)

mbrick2 wrote:

Where is the source code?
Currently, the source code is on replit
I will add it to github soon…
THROWS an error
It should give an error because the password is stored in environment variable and you can't access it… but still you can see the source code and the program is still running…

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


Sid72020123
Scratcher
500+ posts

SUI v3.0 - Scratch Username Index API [3.7M+ Indexed Users!]

mbrick2 wrote:

Sid72020123 wrote:

(#17)

mbrick2 wrote:

Where is the source code?
Currently, the source code is on replit
I will add it to github soon…
THROWS an error
Oh wait… It's Scratch's URL Error
Correct Link:
https://replit.com/@Sid72020123/SUI?v=1

Get the data of a random user in a list of 3.7M+ indexed Scratch users by visiting this URL! You can see the API docs here


Powered by DjangoBB

Standard | Mobile