Hello, this is an API!

This is an API for Minecraft-servers.games - Servers monitoring tool.

API accepts requests in GET string and returns data in JSON arrays. If you want to use this API firstly you need add your server to monitoring and get unique ServerID!

Click button below to add server to monitoring.

Add new server

Methods

To recieve result you need to send GET request with valid parameters. Example request: https://minecraft-servers.games/api/‹METHOD›/‹ServerID›/ will return JSON array with data.

  • ‹METHOD› — One of the available methods
  • ‹ServerID› — Existing ID of server in monitoring. You can find him on server page.

Status

Use this method to quickly obtain your Rust server's basic data, such as:

  • Hostname
  • Status (Online/Offline)
  • Current players
  • Total slots

Output:

{
	"status": true,
	"name": "DayZRP.com - Chernarus - Whitelisted Role Play Community",
	"status": "Online",
	"players": "167",
	"players_max": "200"
}

Info

Use this method to quickly obtain your Rust server's full data, same as Status +:

  • Hostname
  • Server IP
  • Server Port
  • Map name
  • Status (Online/Offline)
  • Average players
  • Players Max forever + date
  • Rating
  • Server version
  • Server's OS
  • Country code, and full name + flags images

Output:

{
	"success":true,
	"name":"DayZRP.com - Chernarus - Whitelisted Role Play Community",
	"ip":"66.70.180.229",
	"port":"2400",
	"map":"chernarusplus",
	"online_state":"1",
	"status":"Online",
	"players_cur":"20",
	"players_max":"80",
	"players_avg":"13",
	"rating":"77",
	"version":"1.05.152380",
	"os":"Windows",
	"country_iso":"CA",
	"country_name":"Canada",
	"country_img_16":"https://minecraft-servers.games/images/flags/16/ca.png",
	"country_img_24":"https://minecraft-servers.games/images/flags/24/ca.png"
}

Example: Parse & Decode JSON and converting to php variables check it.

JavaScript

Besides JSON you can use JavaScript API. To start using this, you need to include

<script src="https://minecraft-servers.games/api/js/‹ServerID›/"></script>
the <head> section of an HTML page.

After that, in place where you want to display the current number of players, paste the code:

<script>document.write(players_cur);</script>

Full list of variables:

  • server_ip
  • server_port
  • hostname
  • map
  • is_online - 1/0
  • players_max
  • players_cur
  • players_avg
  • rating
  • version
  • os
  • country - ISO 3166
  • country_full

Example: JavaScript API GitHub