Json API

333networks has a Json API. With this API, it is possible to obtain server lists and specific server information for your own banners, ubrowser or other application.

Permission & Terms of Use

The following permissions and conditions are in effect for making use of the Json API:

You are allowed to access our API with any application and/or script, self-made or not, to obtain our server lists and server information on the condition that somewhere, anywhere visible in your application or script you mention that the information is obtained from 333networks. Monetisation of 333networks data (and bandwidth) is not allowed without prior, explicit permission from 333networks.

You are not allowed to flood the API with requests or query our API continuously or with a short interval. If you draw too much network traffic from 333networks, we consider this flooding and will terminate your ability to query our API. Server information is updated every 5 minutes, there is no point in requesting information at a faster rate as there will be no new information available.

Intended use: use the serverlist request to get show a list of all servers. After loading the list, your visitors/users can select a single server to display detailed information. Do NOT use the serverlist to immediately show detailed information for ALL servers, this causes a ludicrous amount of information requests and will get you excluded from our API. Not sure whether you are doing it right? Contact us!

Use

The Json API consists of three functions to query for information. The methods occur over HTTP and are presented as Json data. The first function requests the "Message of the Day", often used to make announcements about the game. The second method returns a list of servers and can be manipulated by gamename. The third method returns detailed server information for an individual server.

Message of the Day

It is possible to pull announcements from the 333networks Json API with the motd command. This command returns an html string with the current 333networks announcements for the selected gamename. This string is suitable for direct JQuery's .html() function. Additionally, it contains the amount of servers and players as described for the serverlist. This method can be used to announce service messages.

https://master.333networks.com/json/([\w]{1,20})/motd

Serverlist

With the API you can pull a serverlist directly from the masterserver. The API applies the following regex to process your request:

https://master.333networks.com/json/([\w]{1,20})

In this regex, ([\w]{1,20}) refers to the gamename. This is the abbreviation that every game specifies in their masterserver protocol. A comprehensive list of gamenames is found on the games page by looking at the last part of the URL.

It is also possible to provide GET information in the url. Allowed options are:

Note that these are wrap-around filters; all results that contain the provided string are returned.

Serverlist request examples:

The following examples have different outcomes. In the first example, we request a serverlist of all servers, regardless of type and/or name. The second example requests only servers of the game Unreal. In the last example, we request a serverlist with the gamename 333networks, with only 2 results per page, page 1 and with the search word master.

https://master.333networks.com/json/all
https://master.333networks.com/json/unreal
https://master.333networks.com/json/333networks?r=2&p=1&q=master

Serverlist result examples:

The API returns Json data in the following format, using the third request as an example. This is example data and may vary from what you receive when performing the same query.

[
    [
        {
            "id":1990,
            "ip":"::ffff:84.83.176.234"                    
            "hostport":28900,
            "hostname":"master.333networks.com (333networks MasterServer)",
            "gamename":"333networks",
            "gametype":"MasterServer",
            "label":"333networks Masterserver",
            "country":"NL",
            "numplayers":15,
            "maxplayers":2966,
            "maptitle":null,
            "mapname":"333networks",
            "dt_added":1616895602,
            "dt_updated":1621019250,            
        },
        {
            "id":1117,        
            "ip":"::ffff:162.154.33.129",
            "hostport":28900
            "hostname":"master.gonespy.com",
            "gamename":"333networks",
            "gametype":"Masterserver",
            "label":"333networks Masterserver",
            "country":"US",
            "numplayers":5,
            "maxplayers":847,
            "maptitle":"",
            "mapname":"333networks",
            "dt_added":1616593343,
            "dt_updated":1621019247,
        }
    ],
    {
        "players":20,
        "total":5
    }
]

The result contains an array of server entries and the total amount of entries. In this case, that is 2 entries listed and 5 total entries, implying that there is one more server not shown or on a next page. With the specified number of results specified by the user and the total amount of servers provided by the API, you can calculate how many pages there are to be specified. If applicable, it also shows the current number of players that are currently in the selected servers. Every server entry has a number of unsorted keywords. Timestamps are linux epoch, in UTC.

The available keywords that are returned by the API are:

id ip hostport hostname gamename label country numplayers maxplayers maptitle mapname gametype dt_added dt_updated

There are more keywords available for individual servers. Detailed information about a server is obtained with the individual request as described below. Keywords of both requests are described in the tables below.

Server details

Your application or script can also request detailed information for a single server. This is done in a similar way as requesting a server list. The following general regex is used by 333networks:

https://master.333networks.com/json/([w]{1,20})/(d{1,3}.d{1,3}.d{1,3}.d{1,3}):(d{1,5})

This restricts requests to the correct url with a gamename ([\w]{1,20}) and an IP:port (d{1,3}.d{1,3}.d{1,3}.d{1,3}):(d{1,5}) for IPv4 addresses and numerical port number. There are no additional query options or GET options. It is possible that the gamename specified does not match the gamename as stored in our database. The result will include the correct gamename that was specified in our database.

The following example requests detailed information by IP address and hostport.

Server details request:

https://master.333networks.com/json/333networks/84.83.176.234:28900

Server details result:

The API returns Json data in the following format, using the requests above as an example. This is example data and may vary from what you receive when performing the same query.

{
        "id":3,
        "ip":"::ffff:45.74.100.250",
        "hostport":10205,
        "mapname":"DXMP_iceworld2",
        "adminname":"Canna the visionary l Disciple Derp191 and RoninMastaFX",
        "hostname":"~Canna's Buddhist Server~",
        "mapurl":"/map/default/333networks.jpg",
        "gamever":"1100",
        "gametype":"CDX BDM",
        "gamename":"deusex",
        "country":"CA",
        "dt_updated":1621022768,      
        "player_0":
            {
                "sid":3,
                "name":"Dark191",                            
                "team":"0",            
                "frags":8,
                "mesh":"cmJCDenton",
                "skin":"None",
                "face":""
                "ping":63,
                "dt_player":1621022768,
                "misc":"",
            },
        "player_1":
            {
                "sid":3,
                "name":"Anya",                            
                "team":"0",            
                "frags":12,
                "mesh":"cmJCDenton",
                "skin":"None",
                "face":""
                "ping":54,
                "dt_player":1621022768,
                "misc":"",
            },
        }

The result has a single entry of parameters with a number of unsorted keywords. The available keywords are in addition to the keywords are specified in multiple tables below.

The player object player_n represent the players in the server. This is a Json object as part of the larger object above. The available keywords are specified in the table below.

Error codes:

It is possible that a query is malformed, outdated or simply invalid. The Json API reports these occurrences with an error code and where possible additional information. When a problem occurs the errorvalue is set from null to 1. The in value provides a shorthand description of where or during what operation the query failed. Additional fields may be provided with specific errors. The following situations are handled.

SituationReturned valuesDescription
Internal error (500)error => 1
in => 'internal_error'
internal => 'detailed report'
The internal field is only shown if enabled on the masterserver.
Incorrect URL formattingerror => 1
in => 'url_format'
The query or URL have the wrong format or contain invalid characters. Verify that your gamename and server address are correctly parsed.
Query optionserror => 1
in => 'options'
options => [array of correct options]
One or more query options do not meet the required template or criteria. See section "Serverlist" above for requirements. The options field contains an array of options and values that are accepted in the current query.
Not in databaseerror => 1
in => 'not_in_db'
ip => 'IP-address'
port => 'port number'
The combination of provided IP-address and port were not found in the database. The provided IP-address and port are provided back for user feedback or verification that the intended address was entered correctly.

Keyword reference

Values, type and descriptions of fields that are returned by the Json API:

Server identifier information

ValueTypeDescription
idintgameserver ID in list database
sidintreference ID for detailed information
iptextserver IP address (in IPv4 format)
queryportintUDP status query port
hostportinthostport to join the server
hostnametextname of the specific server
countrytext2-letter country code where the server is hosted
locationtextGameSpy regional indication (continent index or 0 for world)

Server flags & datetime

ValueTypeDescription
f_protocolintprotocol index to distinguish between GameSpy v0 and others
f_blacklistintserver blacklisted?
f_authintauthenticated response to the secure/validate challenge?
f_directintdirect beacon to the masterserver?
dt_addedlongUTC epoch time that the server was added
dt_beaconlongUTC epoch time that the server sent a heartbeat
dt_synclongUTC epoch time that the server was last synced from another masterserver
dt_updatedlongUTC epoch time that the server information was updated
dt_serverinfolongUTC epoch time that the detailed server information was updated

Gamedata

ValueTypeDescription
gamenametextgamename of the server
labeltextcomprehensible game title associated with gamename
gamevertextgame version of the server
minnetvertextminimal required game version to join

Game settings (detailed information)

ValueTypeDescription
listenservertextdedicated server indication
adminnametextserver administrator's name
adminemailtextserver administrator's contact information
passwordtextpassworded or non-public server
gametypetexttype of game: capture the flag, deathmatch, assault and more
gamestyletextin-game playing style
changelevelstextautomatically change levels after match end
mapurltextdirect url of the map thumbnail relative from this site's domain
mapnametextfilename of current map
maptitletexttitle or description of current map
minplayersintminimum number of players to start the game
numplayersintcurrent number of players
maxplayersintmaximum number of players simultaneously allowed on the server
botskilltextskill level of bots
balanceteamstextteam balancing on join
playersbalanceteamstextplayers can toggle automatic team balancing
friendlyfiretextfriendly fire rate
maxteamstextmaximum number of teams
timelimittexttime limit per match
goalteamscoretextscore limit per match
fraglimittextscore limit per deathmatch
mutatorstextcomma-separated mutator/mod list
misctextmiscellaneous server attributes (reserved)
player_#objectplayer information as Json object for player #, see table below

Player information

ValueTypeDescription
sidintassociated server ID (per player)
nametextplayer display name
teamtextplayer indication as team number, color code or text string
fragsintnumber of frags or points
meshtextplayer model / mesh
skintextplayer body texture
facetextplayer facial texture
pingintplayer ping
misctextmiscellaneous player attributes (reserved)
dt_playerlongUTC epoch time that the player information was updated

Error codes

ValueTypeDescription
errorintindication that an error occurred
intexthandler indication where error occurred
internaltextwhen enabled on the server, a stacktrace or report of the error
optionsobjectquery options that were provided when the error occurred

Feedback

We wrote the Json API with the intention to make the 333networks masterserver data as accessible as possible. If you feel that any functionality is missing or incorrectly shared, do not hesitate to contact us to provide feedback. Additionally, we request that you follow the advice on usage as we described under the Terms of Use on top of this page, so we can keep providing this API.