Skip to content
AngrySnout edited this page May 25, 2020 · 1 revision

For the newer API version, v2, click here. Note that not all paths in v1 are available in v2.

If you cannot find what you're looking for, chances are that it isn't implemented yet. Please check the issue tracker and request the feature there.

Most of the Tracker's functionality is available in the API. All API functions are available under the /api route, have cross-origin enabled, accept GET parameters, and return JSON. In addition, any API call can return status 404 (not found), status 500 (internal server error), or 400 (bad request), which may be accompanied by an "error" object in the response describing the error.

/api/servers

Returns a list of all servers online.

Example (link):

http://tracker.tomatenquark.org/api/servers

/api/server/:ip/:port

Returns a single server along with the game info.

Example (link):

http://tracker.tomatenquark.org/api/server/144.76.176.131/28785

/api/server/activity/:host/:port

Returns two lists, one with the average number of player at different time today, and one with the number of games per day in the last 15 days. Times with 0 players and days with 0 games are skipped.

Example (link):

http://tracker.tomatenquark.org/api/server/activity/144.76.176.131/28785

/api/games/find?...

Returns a list of games that match a given query, sorted descendingly by id (timestamp). Also returns the total number of matches, the maximum, and the minimum game ID. The Following parameters are supported: host, port, serverdesc, map, gamemode, gametype, fromdate, todate, players, exact (match exact player names), specs (search for spectators as well), beforeid, afterid (used for pagination), limit. Any fields left empty will be ignored.

gamemode can be one of 'ffa', 'coop_edit', 'teamplay', 'instagib', 'insta_team', 'efficiency', 'effic_team', 'tactics', 'tac_team', 'capture', 'regen_capture', 'ctf', 'insta_ctf', 'protect', 'insta_protect', 'hold', 'insta_hold', 'effic_ctf', 'effic_protect', 'effic_hold', 'collect', 'insta_collect', 'effic_collect'.
gametype can be one of 'duel', 'public', 'mix', 'clanwar', 'other', 'intern'.
fromdate and todate should be formatted as yyyy-mm-dd.
limit is 20 by default, and is maxed at 1000.

Example (link):

http://tracker.tomatenquark.org/api/games/find?host=144.76.176.131&port=28785&todate=2015-09-25

/api/games/players?...

Shorthand for calling '/games/find' multiple times, once for each space-separated name in the query parameter 'players'. Accepts the same arguments as '/games/find'. Returns an array of objects, each of which has the same properties as the one returned from '/games/find', in the same order as the input.

Example ([link](http://tracker.tomatenquark.org/api/games/players?fromdate=2015-09-25&exact=on&limit=2&players=MTH named)):

http://tracker.tomatenquark.org/api/games/players?fromdate=2015-09-25&exact=on&limit=2&players=MTH named

/api/game/:id

Returns a single saved game.

Example (link):

http://tracker.tomatenquark.org/api/game/142298

/api/players/find?...

Returns a list of up to 200 players matching a given name and country, sorted descendingly by frags. Parameters left empty will be ignored. Set country to __ (2 underscores) for Unknown.

Example (link):

http://tracker.tomatenquark.org/api/players/find?name=named&country=US

/api/players/teams?...

Returns an object containing two arrays, 'evil' and 'good', each of which contains the names of the players provided in the 'names' parameter, split into semi balanced teams. Players are split into these teams based on their frags/deaths and flagruns/games in mix games played in the last 3 months. This API function may return different results for the same set of players.

Example ([link](http://tracker.tomatenquark.org/api/players/teams?names=Player1 Player2 Player3 Player4 Player5 Player6)):

http://tracker.tomatenquark.org/api/players/teams?names=Player1 Player2 Player3 Player4 Player5 Player6

/api/player/:name

Returns info of the player with the given name.

Example (link):

http://tracker.tomatenquark.org/api/player/Nix

/api/player/activity/:name

Returns a list of number of games played by player with the given name in the last 15 days. Days with 0 games are skipped.

Example (link):

http://tracker.tomatenquark.org/api/player/activity/Nix

/api/clans

Returns a list of all clans, sorted by rank.

Example (link):

http://tracker.tomatenquark.org/api/clans

/api/clans/:clantag

Returns the clan with the given clantag, along with 10 latest clanwars and 10 last seen members.

Example (link):

http://tracker.tomatenquark.org/api/clan/!s]
Clone this wiki locally