SRA Public API
StarRailAssistant provides a set of free public REST APIs for fetching various data. No authentication is required — just call them directly.
API Endpoints
Section titled “API Endpoints”The base URL for all APIs is:
https://starrailassistant.top/api/v1Get Activity Data
Section titled “Get Activity Data”GET /activity/{game}.jsonGET /activity/{game}-{locale}.json| Parameter | Type | Description |
|---|---|---|
game |
string | Game identifier |
locale |
string | Optional, language tag (e.g. en-US); omitted for the default language data |
Supported Games
Section titled “Supported Games”GET https://starrailassistant.top/api/v1/activity/sr.jsonGET https://starrailassistant.top/api/v1/activity/sr-en-US.jsonGET https://starrailassistant.top/api/v1/activity/ys.jsonGET https://starrailassistant.top/api/v1/activity/ys-en-US.jsonGET https://starrailassistant.top/api/v1/activity/zzz.jsonGET https://starrailassistant.top/api/v1/activity/zzz-en-US.jsonGET https://starrailassistant.top/api/v1/activity/ww.jsonGET https://starrailassistant.top/api/v1/activity/ww-en-US.jsonGET https://starrailassistant.top/api/v1/activity/nte.jsonGET https://starrailassistant.top/api/v1/activity/nte-en-US.jsonResponse Example
Section titled “Response Example”{ "version": "4.4", "versionName": "鸣笛于归寂之时", "startTime": "2026-07-15T06:00:00", "endTime": "2026-08-26T06:00:00", "cover": "https://...", "activities": [ { "name": "反贪「砖」家", "description": "世上没有不落灰的角落...", "startTime": "2026-07-15T06:00:00", "endTime": "2026-08-26T03:59:59", "cover": "https://..." } ]}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
version |
string | Current game version number |
versionName |
string | Version name |
startTime |
string | Version start time (ISO 8601) |
endTime |
string | Version end time (ISO 8601) |
cover? |
string? | Version cover image URL |
activities |
array | List of activities |
activities[].name |
string | Activity name |
activities[].description |
string | Activity description |
activities[].startTime |
string | Activity start time (ISO 8601) |
activities[].endTime |
string | Activity end time (ISO 8601) |
activities[].cover? |
string? | Activity cover image URL |
Contributing
Section titled “Contributing”Community contributions of activity data are welcome! If you want to add support for more games, or find activity information that is incorrect or missing, you can contribute in the following ways.
Adding Support for a New Game
Section titled “Adding Support for a New Game”- Fork the repository: visit the StarRailAssistant docs site repository and fork it.
- Add the game: add a new game entry in
src/data/games.ts, filling in the game identifier, name, language list, data source URL, etc. - Submit a PR: create a Pull Request describing the newly added game support.
Game Entry Format
Section titled “Game Entry Format”When adding or updating game support, please follow this format:
{ "id": "game-id", // Game identifier, e.g. "sr" "name": "Readable game name", "locales": [ "zh-CN", // Supported language list "en-US" // Other languages ], "defaultLocale": "zh-CN", // Default language; the default-language file omits the locale suffix when generated "dataSource": "Data source URL" // The original source of the game's activity data. This field is mainly for AI, telling it how to fetch the game data.}Manual Maintenance
Section titled “Manual Maintenance”The following approach applies to simple content changes (such as fixing an activity’s time, name, or description, or adding a cover image):
- Fork the repository: visit the StarRailAssistant docs site repository and fork it.
- Edit the data: edit the corresponding JSON file under the
public/api/v1/activity/directory. Default-language data lives in/{game}.json(Chinese); other languages live in/{game}-{locale}.json(e.g.sr-en-US.json). - Submit a PR: create a Pull Request describing your changes.
Activity Data Format
Section titled “Activity Data Format”When adding or updating activity data, please follow this format:
{ "version": "Current game version number", "versionName": "Current game version name", "startTime": "2026-07-15T06:00:00", // Version start time "endTime": "2026-08-26T06:00:00", // Version end time "cover": "https://...", // Version cover image URL "activities": [ { "name": "Activity name", "description": "Activity description", "startTime": "2026-07-15T06:00:00", // Activity start time "endTime": "2026-08-26T03:59:59", // Activity end time "cover": "https://..." // Activity cover image URL } // More activities... ]}