API 1.0 - Hidendra/mcstats.org GitHub Wiki

This page is meant as basic documentation for the API present on mcstats.org. The site makes good use for the API (e.g. - loading/generating graphs, plugin list, plugin search typeahead) so these endpoints can be expected to be working reliably.

All returned data is given in JSON format and there is no alternative as of present. The API is entirely read-only as of present also.

Signature Image (new - combined)

Normal image:
http://i.mcstats.org/(PluginName)/(GraphName).png

Borderless / nameless imge:
http://i.mcstats.org/(PluginName)/(GraphName).borderless.png

Normal image, 2x size:
http://i.mcstats.org/(PluginName)/(GraphName)@2x.png

Borderless image, 2x size:
http://i.mcstats.org/(PluginName)/(GraphName)@2x.borderless.png

Returns a signature image for the plugin with the given graph for it. The scaler (@2x) works for up to @10x and supports single-decimal floating numbers (e.g. @1.5x).

Example:

http://i.mcstats.org/LWC/Locale.png

Plugin Signature Image (Deprecated - only Global Statistics available)

http://api.mcstats.org/signature/(PluginName).png
http://api.mcstats.org/signature/(Scale)/(PluginName).png

Returns a signature image for the plugin with the Global Stats graph for it.

If the scale is used it must be a single digit floating number, e.g. the default is 1.0. The max scale is 10.0

Example (PluginName=LWC):

Plugin Preview Image (Deprecated - only Global Statistics available)

http://api.mcstats.org/plugin-preview/(PluginName).png
http://api.mcstats.org/plugin-preview/(Scale)/(PluginName).png

Much like the signature image except it does not have any borders, advertising, or titles.

If the scale is used it must be a single digit floating number, e.g. the default is 1.0. The max scale is 10.0

Example (PluginName=LWC):

Plugin Info

http://api.mcstats.org/1.0/(PluginName)

Returns basic info on the plugin

Example (PluginName=LWC):

{
    "name": "LWC",
    "author": "Hidendra",
    "starts": "79205798",
    "rank": "6",
    "servers": {
        "24": "7242",
        "last": 6701
    },
    "players": {
        "last": 15427
    },
    "status": "ok"
}

Graph Data

http://api.mcstats.org/1.0/(PluginName)/graph/(GraphName)

Returns data for a given graph. GraphName is the name shown on the web page. Line graphs will generate a lot more data than e.g. pie/donut/map graphs. Any timestamps are unix epoches and given in milliseconds since the epoch.

Example (PluginName=LWC, GraphName=Locale):

{
    "status": "ok",
    "data": [
        [
            "Spanish (12)",
            0.31
        ],
        [
            "Hungarian (15)",
            0.39
        ],
        [
            "Polish (20)",
            0.52
        ],
        [
            "Czech (25)",
            0.65
        ],
        [
            "French (25)",
            0.65
        ],
        [
            "German (160)",
            4.14
        ],
        [
            "Russian (166)",
            4.3
        ],
        [
            "English (3439)",
            89.05
        ]
    ],
    "name": "Locale",
    "type": "Pie"
}

Plugin List

http://api.mcstats.org/1.0/list/(Page)

Returns the list of plugins on the plugin list.

<>

Typeahead

http://api.mcstats.org/1.0/typeahead/?q=(PartialPluginName)

Returns a list of plugins that partially match the given string.

Example (q="lw"):

[
    "LWC",
    "LWCTT",
    "6 LWC",
    "MC-LWC",
    "TedLWC",
    "MultiLwc",
    "LWCTest",
    "Sky-LWC",
    "NcPlotsLW",
    "PqPlotsLW"
]