Introduction
Welcome to the new SPT Leaderboard API Documentation. We're gladly offering anyone who would like to observe, or just poke around, a free way to utilize our simple API for whatever ideas you store.
Getting started
API only has one endpoint, therefore you can execute it with only GET and POST. Current API does not require authentication, unless it's a request to the SPTLB Network requiring you a Market Token. Overall a client is limited to 15 requests a second.
Base API URL for requests
                            https://sptlb.yuyui.moe/api/release/v1/index.php
                        
                        API also provides headers to know what limit you currently have.
                                X-RateLimit-Limit
                                X-RateLimit-Remaining
                                X-RateLimit-Reset
                            
                        Response Format
All API responses are returned in JSON format with the following structure:
                            {
                              "success": true,
                              "data": { ... },
                              "message": "Success"
                            }
                        
                        GET allSeasons
GETRetrieves a list of all players ever recorded in the system.
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?allSeasons
                        
                        Example Response
                            {
                              "success": true,
                              "data": {
                                "season1": { "leaderboard": [...] },
                                "season2": { "leaderboard": [...] },
                                "season3": { "leaderboard": [...] }
                            },
                              "message": "All seasons data retrieved successfully"
                            }
                        
                        GET season
GETRetrieves a list of player from a specified season
Parameters
| Parameter | Type | Description | 
|---|---|---|
| season | integer | Number of season to return (1-5) | 
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?season=2
                        
                        Example Response
                            {
                              "success": true,
                              "data": { leaderboardData },
                              "message": "Season $season data retrieved successfully"
                            }
                        
                        GET player
GETRetrieves current player season data
Parameters
| Parameter | Type | Description | 
|---|---|---|
| player | string | Profile ID | 
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?player=68459257000124366ff1d55d
                        
                        Example Response
                            {
                              "success": true,
                              "data": { playerData },
                              "message": "Season $season data retrieved successfully"
                            }
                        
                        GET playerMarketData
GETRetrieves data of a player from SPTLB Network
Parameters
| Parameter | Type | Description | 
|---|---|---|
| playerMarketData | string | Market Token. Can only be found in SPTLB Network (log-in) | 
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?playerMarketData=6845gerg3492IJ57000GkfFIO1234t4366ff1d55d
                        
                        Example Response
                            {
                              "success": true,
                              "data": { playerMarketData },
                              "message": "Market data retrieved successfully"
                            }
                        
                        GET playerProfileData
GETRetrieves data of a player profile customization. Name, profile description, profile picture (custom), and profile stylings.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| playerProfileData | string | Profile ID | 
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?playerProfileData=68a410ee00052bb06074589a
                        
                        Example Response
                            {
                              "success": true,
                              "data": { playerProfileData },
                              "message": "Player profile data retrieved"
                            }
                        
                        GET networkBalance
GETSimilar to retrieving data of getPlayerMarketData. Instead will just return current balance.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| networkBalance | string | Market Token | 
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?networkBalance=684hrjtjyoyUa410ee0005GRDWIKFJE2bb06074589a
                        
                        Example Response
                            {
                              "success": true,
                              "data": { "balance": 100 },
                              "message": "Balance retrieved successfully"
                            }
                        
                        GET heartbeats
GETRetrieve a list of heartbeats, their timestamps, profile IDs, and state all the online players are in.
Parameters
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?heartbeats
                        
                        Example Response
                            {
                              "success": true,
                              "data": { heartbeatData },
                              "message": "Heartbeats retrieved successfully"
                            }
                        
                        GET heartbeat
GETSimilar to retrieving data of all heartbeats. Instead will just return current heartbeat of a specified profile ID.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| heartbeat | string | Profile ID | 
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?heartbeat=684oya410ee00bb06074589a
                        
                        Example Response
                            {
                              "success": true,
                              "data": { heartbeatData },
                              "message": "Heartbeats retrieved successfully"
                            }
                        
                        GET inventory
GETSimilar to retrieving data of market data. Instead will just return current inventory contents (Item IDs) of a specified Market ID.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| inventory | string | Market Token | 
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?heartbeat=684oya410ee00bb06074589a
                        
                        Example Response
                            {
                              "success": true,
                              "data": { notificationData },
                              "message": "Notifications retrieved successfully"
                            }
                        
                        GET notifications
GETSimilar to retrieving data of market data. Instead will just return current notifications of a specified Market ID.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| notifications | string | Market Token | 
Example Request
                            GET https://sptlb.yuyui.moe/api/release/v1/index.php?heartbeat=684oya410ee00bb06074589a
                        
                        Example Response
                            {
                              "success": true,
                              "data": { notificationData },
                              "message": "Notifications retrieved successfully"
                            }