Game monitoring Servers.Fun

Servers

3506

Players

34713

Getting started

A unique identifier is used to access any API method (<IDENTIFIER>), it's the same - server ID, or server address (IP:PORT).

To find out the server ID, use the search at the top of the page - enter the name of the server of interest, select the required server from the list provided, and go to the server page. By opening the address bar, you will see a URL similar to this "https://servers.fun/samp/absolut-roleplei-platinym-gta-samp_ru/14370", the numbers at the end of the line is a server ID.


The API has the following structure for calling: https://servers.fun/api/<METHOD>/<IDENTIFIER>?<PARAMS>

  • <METHOD> - API method (see examples below);
  • <IDENTIFIER> - server identifier (see above);
  • <PARAMS> - method call parameters (see examples below).

For more information, use one of the examples at the bottom of the page.

Server information

Getting information using the server ID:

https://servers.fun/api/servers/<IDENTIFIER>?forJavaScript=true

<!-- Example: --> https://servers.fun/api/servers/14370 https://servers.fun/api/servers/95.213.255.83:7771 https://servers.fun/api/servers/14370?forJavaScript=true https://servers.fun/api/servers/95.213.255.83:7771?forJavaScript=true

<IDENTIFIER> - the identifier of the server that can act server ID in monitoring or its address (IP:PORT);
forJavaScript - returns the data as a JavaScript variable (see the example at the end).


Returning data:
Name Type Example Description
id integer 14370 Identifier (ID)
ip string 95.213.255.83 IP address
port integer 7771 Port
title string Абсолют РолеПлей 1 | Платинум | GTA-SAMP.RU Server title
gamemode string Russia/RPG/RolePlay/RP Gamemode
language string Russian/Русский/русский Language
version string 0.3.7-R2 Version
site string www.gta-samp.ru Site
players array - Array with information about players
number integer 902 Number of online players
maximum integer 1000 Available slots
averageNumber integer 480 Number of average online
maximumNumber integer 1000 Maximum players
game array - Array with information about game
id integer 1 Game ID
title string SAMP Game title
rating float 2.7 Rating
found boolean true Server found
onlineStatus boolean true Server online
createdAt string 2018-09-17 21:55:09 Server adding date

Example of returning data:
// Request: https://servers.fun/api/servers/14370
{
    "id": 14370,
    "ip": "95.213.255.83",
    "port": 7771,
    "title": "Абсолют РолеПлей 1 | Платинум | GTA-SAMP.RU",
    "gamemode": "Russia/RPG/RolePlay/RP",
    "language": "Russian/Русский/русский",
    "version": "0.3.7-R2",
    "site": "www.gta-samp.ru",
    "players": {
        "number": 902,
        "maximum": 1000,
        "averageNumber": 0,
        "maximumNumber": 0
    },
    "game": {
        "id": 1,
        "title": "SAMP"
    },
    "rating": 2.7,
    "found": true,
    "onlineStatus": true,
    "createdAt": "2018-09-17 21:55:09",
}

Example of returning data #2:
// Request: https://servers.fun/api/servers/14370?forJavaScript=true
var server = JSON.parse('{
    "id": 14370,
    "ip": "95.213.255.83",
    "port": 7771,
    "title": "Абсолют РолеПлей 1 | Платинум | GTA-SAMP.RU",
    "gamemode": "Russia/RPG/RolePlay/RP",
    "language": "Russian/Русский/русский",
    "version": "0.3.7-R2",
    "site": "www.gta-samp.ru",
    "players": {
        "number": 902,
        "maximum": 1000,
        "averageNumber": 0,
        "maximumNumber": 0
    },
    "game": {
        "id": 1,
        "title": "SAMP"
    },
    "rating": 2.7,
    "found": true,
    "onlineStatus": true,
    "createdAt": "2018-09-17 21:55:09",
}');

Server statistic

Obtaining statistics using the server identifier:

https://servers.fun/api/statistics/<IDENTIFIER>?per=(day/week/month)&forJavaScript=true

<!-- Example: --> https://servers.fun/api/statistics/14370?per=day https://servers.fun/api/statistics/95.213.255.83:7771?per=week https://servers.fun/api/statistics/14370?per=month&forJavaScript=true https://servers.fun/api/statistics/95.213.255.83:7771?per=day&forJavaScript=true

<IDENTIFIER> - the identifier of the server that can act server ID in monitoring or its address (IP:PORT);
per - indicates the type of statistics returned, can take one of the following values: day, week, month;
forJavaScript - returns the data as a JavaScript variable (see the example at the end).


Name Type Example Description
serverId integer 14370 Identifier (ID) of server
per string day Statistic period
averageOnline integer 527 Average online for the selected period
maximumOnline integer 1000 Maximum online for the selected period
list array Statistics
Returning data:

Array returning data list at &per=day:
Name Type Example Description
id integer 2909512 Identifier (ID) of statistics
players integer 485 Number of players
createdAt string 2018-09-17 21:55:09 Date

Array returning data list at &per=week / &per=month:
Name Type Example Description
id integer 2909512 Identifier (ID) of statistics
averageOnline integer 520 Average online, per day
maximumOnline integer 829 Maximum online, per day
createdAt string 2018-09-17 21:55:09 Date

Example of returning data:
// Request: https://servers.fun/api/statistics/3242?per=day
{
    "serverId": 3242,
    "per": "day",
    "averageOnline": 178,
    "maximumOnline": 388,
    "list": [
        // ...................
        {"id": 3986987, "players": 167, "createdAt": "2018-09-21 10:00:32"},
        {"id": 3983195, "players": 155, "createdAt": "2018-09-21 09:45:32"},
        {"id": 3979444, "players": 153, "createdAt": "2018-09-21 09:30:32"},
        {"id": 3975763, "players": 140, "createdAt": "2018-09-21 09:15:34"},
        // ...................
    ]
}

Example of returning data #2:
// Request: https://servers.fun/api/statistics/3242?per=month&forJavaScript=true
var statistic = JSON.parse('{
    "serverId": 3242,
    "per": "month",
    "averageOnline": 195,
    "maximumOnline": 488,
    "list": [
        // ...................
        {"id": 53419, "averageOnline": 178, "maximumOnline": 388, "createdAt": "2018-09-20 13:00:30"},
        {"id": 48611, "averageOnline": 147, "maximumOnline": 350, "createdAt": "2018-09-19 13:00:33"},
        {"id": 47259, "averageOnline": 152, "maximumOnline": 276, "createdAt": "2018-09-18 13:00:32"},
        {"id": 42295, "averageOnline": 240, "maximumOnline": 444, "createdAt": "2018-09-17 12:15:14"},
        // ...................
    ]
}');

Players information

Getting information about players:

https://servers.fun/api/players/<IDENTIFIER>?type=(online/top)&forJavaScript=true

<!-- Example: --> https://servers.fun/api/players/14370?type=online https://servers.fun/api/players/95.213.255.83:7771?type=online https://servers.fun/api/players/14370?type=top&forJavaScript=true

<IDENTIFIER> - the identifier of the server that can act server ID in monitoring or its address (IP:PORT);
type - indicates the type of information returned, can take one of the following values: online (list of players online), top (top 100 players by the amount of time won);
forJavaScript - returns the data as a JavaScript variable (see the example at the end).


Returning data:
Name Type Example Description
serverId integer 14370 Identifier (ID) of server
type string online Type of information about players
list array Players list

Array returning data list at &type=online / &type=top:
Name Type Example Description
id integer 58282 Identifier (ID) of player
nickname string brebvix Player nickname
playedMinutes string 120 Number of played minutes on the server
lastActivity string 2018-09-17 12:15:14 Last activity on the server

Example of returning data:
// Request: https://servers.fun/api/players/16896?type=online
{
    "serverId": 16896,
    "type": "online",
    "list": [
        // ...................
        {"id": "Harry_Odebrecht", "nickname": "Harry_Odebrecht", "playedMinutes": 30, "lastActivity": "2018-09-21 00:00:27"},
        {"id": "Felipe_Hobbs", "nickname": "Felipe_Hobbs", "playedMinutes": 15, "lastActivity": "2018-09-21 00:00:25"},
        {"id": "Terry_Harper", "nickname": "Terry_Harper", "playedMinutes": 15, "lastActivity": "2018-09-21 00:00:21"},
        {"id": "Kenny_Franchetti", "nickname": "Kenny_Franchetti", "playedMinutes": 15, "lastActivity": "2018-09-21 00:00:20"},
        // ...................
    ]
}

Example of returning data #2:
// Request: https://servers.fun/api/players/16896?type=top&forJavaScript=true
var players = JSON.parse('{
    "serverId": 16896,
    "type": "top",
    "list": [
        // ...................
        {"id": "Harry_Odebrecht", "nickname": "Rubens_Junior", "playedMinutes": 165, "lastActivity": "2018-09-21 00:00:27"},
        {"id": "Felipe_Hobbs", "nickname": "Griffley_Wakabayashi", "playedMinutes": 140, "lastActivity": "2018-09-21 00:00:27"},
        {"id": "Terry_Harper", "nickname": "Lukaku_Hobbs", "playedMinutes": 90, "lastActivity": "2018-09-21 00:00:27"},
        {"id": "Kenny_Franchetti", "nickname": "Calvin_Galaxy", "playedMinutes": 75, "lastActivity": "2018-09-21 00:00:27"},
        // ...................
    ]
}');

Example API

For a better understanding of the API, you can use any of the examples listed below: