SiteJS pluginCreditsNotice: Due to the way the Switch servers are set up, it is incredibly unlikely that SBAPI will ever support SmileBASIC 4. Research will continue to see if we can get anything working but we need your help. If you have a Nintendo Switch with Custom Firmware and you own SmileBASIC 4, I humbly request you contact me on Discord (@MasterR3C0RD#7695).
I provide this service free of charge, and pay for the server to run it out of pocket. Donations to maintain the server and pay for my caffeinated beverages are not required, but appreciated. If you enjoy this service and want to help keep the server running, there's a link on my userpage to donate.NEW: There's now a GUI by 12Me21 to make browsing projects easier. You can access it at http://sbapi.me/gui.html
SmileBASIC API (SBAPI) is a service created by me (MasterR3C0RD) and triangle, with help from Yttria, 12Me21, and snail_, that allows you to get info for and download programs directly from SmileBASIC 3 servers. Not only is this useful for moderators to check if a key is still available, it also allows users to post GRPs to the forums as a PNG.
Everything in SBAPI is simply a URL. The basic URL format for keys is http://sbapi.me/get/(key)[/(filename)]/(encoding), where anything in  is optional and anything in () is required. key should be replaced with the public key, and filename allows you to choose a specific file if the key is a project. The encoding is required and can be one of the following:
info - all files, shows information about the file provided (use ?json=1 if you're writing a program)
list - only projects, lists all files
zip - only projects, download all files from the project as a ZIP file. If you want to convert files to their preferred format (ex, GRP -> PNG, TXT -> Text), add ?nice=1
raw - all files, downloads the raw file. However, some files are compressed and may require using the decompressed encoding instead
csv - only <=2D DATs, converts the data to a CSV (comma-separated values) file
downloads - all files, returns a PNG with the download count (download count is only updated every 24 hours)
encodings - all files, returns JSON array with all possible encodings for the file given
Other encodings may be added in the future.
Uses:Disclaimer: Authors of projects or assets displayed on this page are not associated with and have not contributed to the SmileBASIC API project.
This can be used when asking people to debug code on the forums. Posting a public key and a link to the code could make debugging much easier.
Example:http://sbapi.me/get/CKANY53Y/TN_SHARP/code (Phil's N# compiler)
Wanting to show off your sprites is another possible use. Simply use the PNG endpoint.
Example:http://sbapi.me/get/4DH5P4K3/BBG_TIKI/png (sprites from cujo1992's Tiki Descent)
You can also back up your project as a ZIP file if you need to be sure you'll always have it.
Example:http://sbapi.me/get/P3T43E3V/zip (kantackistan's Virtual Buffalo)
Don't forget a download counter to gauge how popular your programs are! Note that the download count is not real time, and only updates every 24 hours.
Example:http://sbapi.me/get/QK4N3PZF/downloads (calc84maniac's Spooky Maze Raycaster demo)
If you think it's too much of a hassle to have to go through the API to check out information about programs, you have a similar mindset to I. That's why I wrote a SiteJS, available at http://sbapi.me/sbapi-sbs.js that adds an extra section to pages that looks something like this:
Simply copy and paste the contents into your SiteJS and load up a program page. After a few seconds, the information will load and be shown on the page.
triangle - file format guru, wrote the file parser used for SB files and other parts of code, and most of reverse engineering of SmileBASIC's servers, donated 3DS information for the server
MasterR3C0RD - hosting, wrote the server communication libraries and helped with reverse engineering of SmileBASIC's servers
12Me21 - wrote sbhighlight and rewrote the SiteJS plugin to work with more browsers
snail_ - working on proper documentation for API
Yttria - word of reason, helped with multiple things internally