User:Eleanorthesow/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 fetch 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?eleanorthesow -> 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?eleanorthesow -> 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
- Get ban reason : https://minecraftonline.com/cgi-bin/getbanwhy.sh
- 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/getplayerinfo?eleanorthesow or banned : https://minecraftonline.com/cgi-bin/getplayerinfo?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.
- Example URL : unbanned : https://minecraftonline.com/cgi-bin/getplayerinfo?eleanorthesow 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.
- 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:
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>
- 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
Other
- 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 do accepts negative number however (of course).
- Example URL : https://minecraftonline.com/cgi-bin/getnearestplace?-6145,40,-18060
- 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*
Notes
If any player related request is asked with an unknown player, it'll return NOTFOUND. If the player only had 1 session, all but the first seen will fail with the error UNKNOWN.