Hello, this is an API!

This is an API for Rust-Servers.Info - Rust 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 »

Contents


Methods

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


Status

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

Output:

{
	"name": "Amsterdam 3",
	"status": "Online",
	"last_seen": "1484415901",
	"players": "167",
	"players_max": "200",
	"fps": "75",
	"uptime": "2 days, 3 hrs"
}

Info

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

Output:

{
	"hostname": "Amsterdam 3",
	"ip": "216.52.0.172",
	"port": "28015",
	"map": "Procedural",
	"online_state": "1",
	"checked": "2017-01-14 20:35:01",
	"players_max": "200",
	"players_cur": "167",
	"players_avg": "105",
	"players_maxman": "",
	"players_max_forever": "200",
	"players_max_forever_date": "2016-12-24 02:00:01",
	"bots": "0",
	"rating": "154.6",
	"entities": "258206",
	"version": "1951",
	"seed": "958093868",
	"size": "3500",
	"uptime": "188833",
	"fps": "67",
	"fps_avg": "70.",
	"url": "http:\/\/www.playrust.com\/",
	"image": "http:\/\/files.facepunch.com\/garry\/2015\/August\/27\/serverlogo.png",
	"os": "Windows",
	"mem": "0",
	"country": "us",
	"country_full": "United States",
	"server_mode": "vanilla",
	"wipe_cycle": "Not Set"
}

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


Votes

Use this method to obtain array with list of users voted for your server:

Output:

{
	"0": {
		"name": "@Mo_45",
		"steamid": "76561197997238749",
		"count": "71"
	},
	"1": {
		"name": "Test User",
		"steamid": "12345678910111213",
		"count": "3"
	},
	"2": {
		"name": "Test User 2",
		"steamid": "12345678910111214",
		"count": "2"
	},
	"3": {
		"name": "pupirka",
		"steamid": "76561198282304737",
		"count": "1"
	},
	"4": {
		"name": "Test User 3",
		"steamid": "12345678910111215",
		"count": "1"
	}
}

Last25Votes

Use this method to obtain array with list of 25 last votes for your server:

Output:

{
	"0": {
		"name": "wisdomguy",
		"steamid": "76561198126205645",
		"timestamp": "2017-05-08 05:22:36"
	},
	"1": {
		"name": "RealyNewNoob",
		"steamid": "76561198128337056",
		"timestamp": "2017-05-07 08:00:35"
	},
	"2": {
		"name": "wisdomguy",
		"steamid": "76561198126205645",
		"timestamp": "2017-05-07 07:38:07"
	},
	"3": {
		"name": "TOSCANO",
		"steamid": "76561198123293504",
		"timestamp": "2017-05-07 07:21:01"
	},
	"4": {
		"name": "LordX1986",
		"steamid": "76561198127242594",
		"timestamp": "2017-05-07 07:19:29"
	},
	"5": {
		"name": "wisdomguy",
		"steamid": "76561198126205645",
		"timestamp": "2017-05-07 06:25:23"
	}
}

Graph

Use this method to obtain data for the number of players in the last 24 hours. Response will contain an 2d array of 288 entries. Interval of entries - 5 minutes.

Each entry contain:

Output:

{
	"0": {
		"timestamp": "2017-01-14 21:05:01",
		"players": "163",
		"fps": "67"
	},
	"1": {
		"timestamp": "2017-01-14 21:00:02",
		"players": "166",
		"fps": "24"
	},
	. . .
	"287": {
		"timestamp": "2017-01-13 20:45:01",
		"players": "158",
		"fps": "87"
	}
}

Update

Use this method to quickly obtain last Rust client update data:

Output:

{
	"timestamp": "1484236846",
	"buildID": "1565303",
	"datetime_full": "Thursday, January 12, 2017 @ 18:00"
}

JavaScript

Besides JSON you can use JavaScript API. To start using this, you need to include <script src="https://api.rust-servers.info/embed.js?id=‹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:

Example: Rust-Servers.Info JavaScript API GitHub / JSFiddle.


Contact

Have question or ides? Contact me.


Donate

Want to support us? Donations will go to cover upkeep expenses such as hosting, domain, etc. Donate us