API Consumers who require high rates of requests against our APIs should contact HumaneWolf, Krashnz, J-M and Kat_pw with a rationale and contact email for high-rate usage.
For documentation on v2 (latest version) of the API click here.
Players #

Get information about a player.

https://api.truckersmp.com/player/{id}

Parameters:

Name Type Description
id integer Steam ID or ETS2MP ID

Properties:

Name Type Description
error boolean If any error occurred during the request.
id integer The ID of the user requested.
name string The name of the user apon sign-up.
joinDate datetime The exact date and time the user signed up.
steamID64 integer The 64bit steam ID for the user requested.
groupName string The group that the user belongs to.
groupID integer The ID of the group that the user belongs to.
isGameAdmin boolean Weather the user is an admin in-game.
showDetailedOnWebMaps boolean Unknown

Example request:

https://api.truckersmp.com/player/76561198057763917

Example response:

{
    "error": false,
    "response": {
        "id": 1,
        "name": "RootKiller",
        "joinDate": "2014-07-24 19:57:28",
        "steamID64": 76561198057763917,
        "groupName": "Developer",
        "groupID": 2,
        "permissions": {
            "isGameAdmin": true,
            "showDetailedOnWebMaps": false
        }
    }
}
Bans #

Latest 5 bans for a selected user if bans are not hidden or user has no bans

https://api.truckersmp.com/bans/{id}

Parameters:

Name Type Description
id integer Steam ID or ETS2MP ID

Properties:

Name Type Description
error boolean If any error occured during the request.
expiration datetime or null The time the ban will expire.
timeAdded datetime The time the ban was issued.
active boolean If the ban is still active.[1]
reason string The reason for the ban.
adminName string Name of the admin that banned the user.
adminID integer ETS2MP ID for the admin that banned the user.

[1] For the user to be banned the expiration date has to be passed or active has to be false.

Example request:

https://api.truckersmp.com/bans/8

Example response:

{
    "error": false,
    "response": [
        {
            "expiration": "2014-12-05 19:58:12",
            "timeAdded": "2014-12-05 19:57:12",
            "active": true,
            "reason": "test",
            "adminName": "RootKiller",
            "adminID": 1
        },
        {
            "expiration": "2014-12-05 19:50:48",
            "timeAdded": "2014-12-05 19:49:48",
            "active": true,
            "reason": "test",
            "adminName": "RootKiller",
            "adminID": 1
        },
        {
            "expiration": null,
            "timeAdded": "2014-09-27 21:22:27",
            "active": false,
            "reason": "test permban",
            "adminName": "mwl4",
            "adminID": 2
        },
        {
            "expiration": "2014-09-27 21:23:00",
            "timeAdded": "2014-09-27 21:18:00",
            "active": false,
            "reason": "tescik",
            "adminName": "mwl4",
            "adminID": 2
        }
    ]
}
Servers #

Get a list of ETS2MP current server status.

https://api.truckersmp.com/servers/

Properties:

Name Type Description
error boolean If any error occurred during the request.
id integer The ID given to the server.
ip string The server ip address.
port integer The port that the server runs on.
name string Name of the server.
shortname string Shortname for the server.
online boolean If the server is online or not.
players integer How many players are currently on the server.
maxplayers integer The max amount of players allowed on the server at once.
speedlimiter integer If the speed limiter is enabled on the server.

Example request:

https://api.truckersmp.com/servers/

Example response:

{
    "error": "false",
    "response": [
        {
            "id": 1,
            "ip":" 1.eu.game.ets2mp.com",
            "port": 42860,
            "name":" Europe #1",
            "shortname": "EU #1",
            "online": true,
            "players": 244,
            "maxplayers": 2300,
            "speedlimiter": 1
        },
        {
            "id": 3,
            "ip": "1.us.game.ets2mp.com",
            "port": 42850,
            "name": "United states #1",
            "shortname": "US #1",
            "online": true,
            "players": 11,
            "maxplayers": 1500,
            "speedlimiter": 1
        },
        {
            "id": 4,
            "ip": "2.eu.game.ets2mp.com",
            "port": 42880,
            "name": "Europe #2",
            "shortname": "EU #2",
            "online": true,
            "players": 68,
            "maxplayers": 2300,
            "speedlimiter": 0
        }
    ]
}
Game Time #

Gets the current in-game time.
Game time is expressed in minutes, where 10 real seconds is 1 minute of in-game time. It is number of minutes since 2015-25-10 15:48:32 CET.

https://api.truckersmp.com/game_time/

Properties:

Name Type Description
error boolean If any error occurred during the request.
game_time integer Game time returned in minutes (10 real seconds is 1 minute in-game).

Example request:

https://api.truckersmp.com/game_time/

Example response:

{
    "error": false,
    "game_time": 644464
}
Version [DEPRECATED] #

Get information about current ETS2MP version.

https://api.truckersmp.com/version/

Properties:

Name Type Description
name string Name of the current version.
numeric integer Numeric name of the current version.
stage string Current stage in the development process.
dll string Checksum of core.dll
adb string Checksum of data1.adb
time datetime The time that the version was released.
supported_game_version integer ETS2 version that is supported with that version of MP.

Example request:

https://api.truckersmp.com/version/

Example response:

{
    "name": "0.1.8.2",
    "numeric": "18200",
    "stage": "Alpha",
    "checksum": {
        "dll": "fc4ab690b29d5056863a15a8540f61b9",
        "adb": "a7b9cb08374a442a7cc3a5c5d047a225"
    },
    "time": "2015-06-04 21:50:00",
    "supported_game_version": "1.18.1.3s"
}