User:Eleanorsilly/API research
Jump to navigation
Jump to search
MCO has an "API" ; the main endpoint is https://minecraftonline.com/cgi-bin/. This API has no documentation, and this page is meant to create some. Feel free to add content.
Note: None of these are case sensitive.
Time connected
- Get time online for a player : https://minecraftonline.com/cgi-bin/gettimeonline, returns a time in seconds;
- Get time online for a player (UUID-based) : https://minecraftonline.com/cgi-bin/gettimeonline_uuid, returns a time in seconds (DASHES IN THE UUID ARE MANDATORY);
First seen
- Get first seen for a player : https://minecraftonline.com/cgi-bin/getfirstseen, returns a formatted time;
- Example URL: https://minecraftonline.com/cgi-bin/getfirstseen?eleanorsilly -> 8:05PM on Wednesday, 22 February 2023
- Get first seen for a player (UNIX timestamp format) : https://minecraftonline.com/cgi-bin/getfirstseen_unix, returns a UNIX timestamp
- Example URL : https://minecraftonline.com/cgi-bin/getfirstseen_unix?eleanorsilly -> 1677096321
Last seen
- Get last seen for a player : https://minecraftonline.com/cgi-bin/getlastseen, returns a formatted time;
- Get last seen for a player (UNIX timestamp format) : https://minecraftonline.com/cgi-bin/getlastseen_unix, returns a UNIX timestamp
Ban reason
- Returns the banned status (NOTBANNED or the mod/admin who banned, the UNIX timestamp of ban and the ban reason, all separated by ; ).
- Example URL : unbanned : https://minecraftonline.com/cgi-bin/getbanwhy.sh?eleanorsilly or banned : https://minecraftonline.com/cgi-bin/getbanwhy.sh?hopesfall23
General information
- Get general player info : https://minecraftonline.com/cgi-bin/getplayerinfo
- Returns:
- the UNIX timestamp of the first seen date
- the UNIX timestamp of the last seen date
- the time played in seconds
- the banned status (NOTBANNED or the mod/admin who banned, the UNIX timestamp of ban and the ban reason, all separated by ; ).
- These 4 informations are separated by line returns. (LF, not CR+LF)
- Example URL : unbanned : https://minecraftonline.com/cgi-bin/getplayerinfo?eleanorsilly or banned : https://minecraftonline.com/cgi-bin/getplayerinfo?hopesfall23
- Returns:
- Get general player info (UUID-based) (DASHES IN THE UUID ARE MANDATORY) : https://minecraftonline.com/cgi-bin/getplayerinfo_uuid
- Returns:
- the UNIX timestamp of the first seen date
- the UNIX timestamp of the last seen date
- the time played in seconds
- the banned status (NOTBANNED or the mod/admin who banned, the UNIX timestamp of ban and the ban reason, all separated by ; ).
- These 4 informations are separated by line returns. (LF, not CR+LF)
- Example URL : unbanned : https://minecraftonline.com/cgi-bin/getplayerinfo_uuid?f7347b08-cc6c-470a-8153-4fa66ca4d6ae or banned : https://minecraftonline.com/cgi-bin/getplayerinfo_uuid?fd796be3-7e69-4adb-af91-d8da6b1075f3
- Returns:
Lists
- Get player list : https://minecraftonline.com/cgi-bin/getplayerlist.sh, returns a list of players all separated by ", "
- Get admin list : https://minecraftonline.com/cgi-bin/getadminlist.sh, returns a list of admins all separated by ", "
- Get mod list : https://minecraftonline.com/cgi-bin/getmodlist.sh, returns a list of moderators all separated by ", "
Other
- Fix capitalization in name or return the closest : https://minecraftonline.com/cgi-bin/getcorrectname, returns a name
- Example URLs:
- Note : this also works for obsolete names when the person has renamed, but it won't correct to the current name.
- Get player head : https://minecraftonline.com/cgi-bin/getplayerhead.sh, returns a PNG image of the front of the face (accounts for layers)
- Arguments are as follow : <playername>&<width and length of the image (optional, by default is equal to 16)>
- Width/length caps out at 640.
- To embed the image in (for example) wiki, you can add a .png extension. This will have no effect on the actual image.
- Example URL : https://minecraftonline.com/cgi-bin/getplayerhead.sh?Krenath&69
- Get ban count : https://minecraftonline.com/cgi-bin/getbancount.sh, returns the number of bans
- Get join count : https://minecraftonline.com/cgi-bin/getuniquevisitors.py, returns the number of joins
- Get nearest place : https://minecraftonline.com/cgi-bin/getnearestplace, returns a JSON output (see picture). The input works as follow :
- If there is 1 number, it will assumed to be both the x and z coordinate.
- If there are 2 numbers, the first number will be the x coordinate and the 2nd the z coordinate (the 2 numbers are separated by commas)
- If there are 3 numbers, the first number will be the x coordinate, the 2nd the y coordinate and the 3rd the z coordinate (the 3 numbers are separated by commas)
- The system doesn't accept decimal numbers. If you put a . after a number and then another number, the 2 numbers will be multiplied. It does accepts negative number however (of course).
- Example URL : https://minecraftonline.com/cgi-bin/getnearestplace?-6145,40,-18060
- Get warp list: https://minecraftonline.com/cgi-bin/getwarplist.sh, returns an HTML-FORMATTED list of the warps on the servers (suffers from the same problems as /warplist in-game)
- Get map item info : https://minecraftonline.com/cgi-bin/getmapiteminfo.sh, returns a JSON output (see picture)
- Example URL : https://minecraftonline.com/cgi-bin/getmapiteminfo.sh?11620
- Note : the coords given are the center of the Map, not one of the corners or anything
- Get map tile : https://minecraftonline.com/cgi-bin/getmaptile, returns a 384 by 384 PNG image
- Arguments are as follow : <x coordinate>,<y coordinate>,<z coordinate>,<zoom>,<*Day*/*Nether*/*End*>
- Note : the map won't slide up a bit if you change only 1 block of the coordinate. It must be a significant number, which changes for every zoom (might do a list on it soon)
- Example URL : https://minecraftonline.com/cgi-bin/getmaptile?4,34,7,2,*End*
Other
- Get random render : https://minecraftonline.com/cgi-bin/getrandomrenders, returns 10 renders in this form:
- username:x-coord (decimal):y-coord (decimal):z-coords (decimal):yaw (decimal):pitch (decimal):request time? (UNIX timestamp):start generation time? (UNIX timestamp):end generation time (UNIX timestamp):imgur URL
- The 10 renders are separated by line returns (LF, not CR+LF)
- Get the end of the Minecraft chat : https://minecraftonline.com/cgi-bin/tailminecraftlog.sh, returns the 20 last line of the chat, with [MCS], [DSC] and [IRC] prefixes (and likely a [TG] prefix too)
- Every user, on Discord, MC and IRC, get their username with < and > around it, except in IRC and MC join messages
- Note: this isn't very up-to-date most of the time, with delays like a minute possible. The script only updates the page when the last 20 lines have changed.
- Note 2: special characters (accents etc) are formatted to be shown as in HTML. Also, every line finishes by <br /> AND a line return (LF, not CR+LF).
- Note 3: this works even if the server is down/during time outs
- Note 4: in case of hard fails, it returns \n
- Generate the main page's content with no CSS (easy scraping): https://minecraftonline.com/cgi-bin/generatesideboxes.sh, returns a basic HTML page
- Things that can be scraped from it:
- Server status (may be incorrect in case of hard fails)
- Player count (although that can be calculated from the player list) (may also be incorrect in case of hard fails)
- Unique players from yesterday
- Homes number
- Admins/moderators number (same as player count, can be calculated through the list)
- Random pictures from wiki
- Things that can be scraped from it:
Do not work anymore
- Get homes count : https://minecraftonline.com/cgi-bin/gethomescount.sh, returns a number
- This currently returns 0
- Can still be scraped from https://minecraftonline.com/cgi-bin/generatesideboxes.sh
- Get current radio title : https://minecraftonline.com/cgi-bin/getradiostreamtitle.sh
- This currently returns nothing, maybe because of the Radio being abandoned
- Get joins from yesterday???? : https://minecraftonline.com/cgi-bin/getuniqueyesterday.py, returns a small number (one-digit) that is unlikely to be correct
- Can still be scraped from https://minecraftonline.com/cgi-bin/generatesideboxes.sh
Notes
If any player related request is asked with an unknown player, it'll return NOTFOUND. Some can return INVALID if the data is incorrect (e.g. empty parameter), so look out for that.
Some of these may have trailing line returns, remember to clear those.