Starlight API

The API exports data from the game's internal databases in a nice, webdev friendly JSON format.

Endpoints

Object Type

GET /api/v1/(object type)/(spec)?...

Query the API for the objects of object type matching spec.

Supported object types

Specs

A spec is a list of IDs separated by commas. IDs are not sequential, and are only valid for their object type. Typically, an ID is an integer.

Return value

Success:

{
  "result": [
    ; an array containing each object in the order they
    ; were requested, or null if it doesn't exist
    ; for detailed object contents, read the wiki:
    ; https://github.com/summertriangle-dev/sparklebox/wiki
  ]
}

Error: (see Errors under Misc.)

Query Parameters


Object List

GET /api/v1/list/(object type)?...

Return a list of brief descriptions for all objects available using the corresponding object API.

Supported object types

Return value

Success:

{
  "result": [
    ; an array containing each object
    ; for detailed object contents, read the wiki:
    ; https://github.com/summertriangle-dev/sparklebox/wiki
  ]
}

Error: This endpoint currently does not have any error conditions.

Query Parameters


Crowd Translations

POST /api/v1/read_tl

    ["string1", "string2", ..., "stringN"]

Query translations for the given strings. This is the same API used by tlinject.js on starlight.kirara.ca.

Return value

The value returned is a JSON dict mapping the original strings to their translated counterparts if available:

{"つぼみ": "Tsubomi"}

Errors


Time

GET /api/v1/happening/now
    GET /api/v1/happening/(timestamp)

Get time-sensitive information.

Information

GET /api/v1/info

{
  "api_major": 1,
  "api_revision": 2,
  "truth_version": "10017160"
}

Return a bit of information about this instance of ssdb as a JSON dictionary. The following keys are available:

Misc.

URLs

All URLs returned in API responses should be interpreted as relative to the URL that the response came from.

From an API call to /api/v1/card_t/123...

Images

Some objects will have image URLs embedded in them. As a general rule, you can hotlink any image returned in an API response. However, if you expect a lot of traffic, you may want to mirror the images to your own server.

Do not make any assumptions about the file hierarchy of hoshimoriuta.kirara.ca. I reserve the right to make any change to it at any time, which will probably break your hardcoded image URLs. (Links you find in API responses will remain valid for a reasonable amount of time, so you can still cache them.)

Errors

If there is an error processing the request, we will return the JSON object

 {"error": "Some error message"}

and the appropriate HTTP status.

Rate limiting

There is none currently. If it does exist in the future, we will return an HTTP 429 status with the error object.

Attribution

You don't have to credit data that comes from the API because it reads from game truth anyway. But if you'd like to, credit the Starlight Database.

Bugs and Feature Requests

File an issue here if you have any problems with using the API.

Changelog