<< Back to the developer hub

API Documentation

Video files are stored at /video/<FILENAME>, and MIME types are ordered by file size from smallest to largest.

List API

Visit /api/list.php, from there it should be obvious for anyone capable of recognizing JSON.

Sample reply

{
    "title": "Opening 1",
    "source": "Accel World",
    "file": "AccelWorld-OP01-NCBD",
    "mime": ["video/webm;codecs=\"vp9,opus\"","video/mp4"],
    "song":
    {
        "title": "Chase the world",
        "artist": "May'n"
    }
},
{
    "title": "Opening 2",
    "source": "Accel World",
    "file": "AccelWorld-OP02-NCBD",
    "mime": ["video/mp4","video/webm;codecs=\"vp9,opus\""],
    "song":
    {
        "title": "Burst The Gravity",
        "artist": "ALTIMA"
    }
},
And so on...

Valid query string options

?filenames - Get an array of just the file names, including their file extensions

?shuffle - Shuffle the results

?first=<FILENAME> - Move the chosen file to the front of the results

Any combination of these can be used together.


Details API

Using the details API

Simply use /api/details.php?file=<FILENAME>

The API will return the metadata for the file specified. It will also return a comment for both successful and failed API calls. It will attempt to find the data first by the given filename (assumed without file extension), then it will try removing the file extension, and finally it will assume you gave it a file identifier and it will try to convert it to a filename.

Samples

Requests

So to get the details of this video.

We would simply use /api/details.php?file=Opening1-Nekomonogatari(Kuro)

Sample reply

The sample used above would return a string like

{"success":true,"comment":"No errors","filename":"Nekomonogatari(Kuro)-OP01-NCBD","title":"Opening 1","mime":["video/mp4","video/webm;codecs=\"vp9,opus\""],"source":"Nekomonogatari (Kuro): Tsubasa Family","song":{"title":"perfect slumbers","artist":"Yui Horie"},"subtitles":"Commie"}

but here's a "prettyfied" response you can use as a reference:

{
    "success": true,
    "comment": "No errors",
    "filename": "Nekomonogatari(Kuro)-OP01-NCBD",
    "title": "Opening 1",
    "mime": ["video/mp4","video/webm;codecs=\"vp9,opus\""],
    "source": "Nekomonogatari (Kuro): Tsubasa Family",
    "song": {
        "title": "perfect slumbers",
        "artist": "Yui Horie"
    },
    "subtitles": "Commie"
}