Skip to content

Battlefield 2

Battlefield 2 endpoints are available at https://api.bflist.io/bf2/v1/.

Live stats#

Get the number of currently active players and servers in Battlefield 2.

Please take Battlefield 2 active player numbers with a grain of salt. We aim to not count any bots as active players, but a small number of bots may still be included in the active player total.

GET /livestats

Response

200 OK

{
    "servers": 164,
    "players": 303
}

Get a page from the list of servers#

Per default, we send 50 servers per page. You can set a custom page size betweeen 20 and 100 via an optional perPage query parameter.

Since servers for older Battlefield games do not have a guid, one is generated using the server's ip and port. The generated guid is bflist-specific and neither known to nor returned by the server.

If a server's current mod is supported by the joinme.click launcher, the joinLink-property will contain a URL to directly trigger the launcher. In environments which do not allow custom URL protocols (e.g. Discord, Twitch chat), use joinLinkWeb instead. Users will be directed to the joinme.click website and can trigger the launcher from there. Note: Both properties will be null for servers running mods not supported by joinme.click. For password protected servers, both joinLink and joinLinkWeb are null. These servers cannot be joined directly, since Battlefield 2 will simply show an error instead of prompting players to enter the password.

GET /servers/:page

Response

200 OK
X-Total-Pages: 3

[
    {
        "guid": "56be01-bfd9160-a0324d8-3e1af98",
        "ip": "37.230.210.130",
        "port": 16567,
        "queryPort": 29900,
        "name": "PlayBF2! T~GAMER #1 Allmaps",
        "numPlayers": 47,
        "maxPlayers": 64,
        "mapName": "Kubra Dam",
        "mapSize": 64,
        "password": false,
        "gameType": "gpm_cq",
        "gameVersion": "1.5.3153-802.0",
        "gameVariant": "bf2",
        "timelimit": 2100,
        "roundsPerMap": 1,
        "ranked": true,
        "anticheat": true,
        "battlerecorder": true,
        "demoIndex": "http://bf2.tgamer.ru/demo/1",
        "demoDownload": "http://bf2.tgamer.ru/demo/1",
        "voip": true,
        "autobalance": true,
        "friendlyfire": false,
        "tkmode": "Punish",
        "startdelay": 45,
        "spawntime": 15,
        "sponsorText": "http://bf2.tgamer.ru",
        "sponsorLogoUrl": "http://bf2.tgamer.ru/files/tgamer.png",
        "communityLogoUrl": "http://bf2.tgamer.ru/files/tgamer.png",
        "scorelimit": 0,
        "ticketratio": 180,
        "teamratio": 100,
        "team1": "MEC",
        "team2": "US",
        "pure": false,
        "globalUnlocks": true,
        "reservedSlots": 0,
        "dedicated": true,
        "os": "linux-64",
        "bots": false,
        "fps": 312,
        "plasma": false,
        "coopBotRatio": 0,
        "coopBotCount": 0,
        "coopBotDiff": 0,
        "noVehicles": false,
        "joinLink": "bf2://37.230.210.130:16567",
        "joinLinkWeb": "https://joinme.click/g/bf2/37.230.210.130:16567",
        "teams":
        [
            {
                "index": 1,
                "label": "MEC"
            },
            {
                "index": 2,
                "label": "US"
            }
        ],
        "players":
        [
            {
                "pid": 482774077,
                "name": "GooFy",
                "tag": "=OCA=",
                "score": 24,
                "kills": 12,
                "deaths": 1,
                "ping": 20,
                "team": 2,
                "teamLabel": "US",
                "aibot": false
            },
            // more players
        ]
    },
    // more servers
]

Get a server's details#

GET /servers/:ip::port

Note: You can also access each property individually. For example, GET /servers/:ip::port/name will return only the server's name as plain text. Complex properties (teams, players) are returned as JSON. So, GET /servers/:ip::port/players will return a JSON array of players on the server.

Response

200 OK
{
    "guid": "7ca45bd-2a591f5-223b6a6-d43525",
    "ip": "185.107.96.59",
    "port": 16567,
    "queryPort": 29900,
    "name": "SUPER@ - S1 Strike at Karkand Infantry Only",
    "numPlayers": 61,
    "maxPlayers": 64,
    "mapName": "Strike At Karkand",
    "mapSize": 64,
    "password": false,
    "gameType": "gpm_cq",
    "gameVersion": "1.5.3153-802.0",
    "gameVariant": "bf2",
    "timelimit": 0,
    "roundsPerMap": 10,
    "ranked": true,
    "anticheat": true,
    "battlerecorder": true,
    "demoIndex": "http://battlerecorder.superinfantryclan.com/s1",
    "demoDownload": "http://battlerecorder.superinfantryclan.com/s1",
    "voip": true,
    "autobalance": true,
    "friendlyfire": false,
    "tkmode": "No Punish",
    "startdelay": 15,
    "spawntime": 15,
    "sponsorText": "www.superinfantryclan.com",
    "sponsorLogoUrl": "http://www.superinfantryclan.com/bf2/109338097-superbf2.jpg",
    "communityLogoUrl": "http://www.superinfantryclan.com/bf2/109338097-superbf2.jpg",
    "scorelimit": 0,
    "ticketratio": 100,
    "teamratio": 100,
    "team1": "MEC",
    "team2": "US",
    "pure": true,
    "globalUnlocks": true,
    "reservedSlots": 0,
    "dedicated": true,
    "os": "linux-64",
    "bots": false,
    "fps": 36,
    "plasma": false,
    "coopBotRatio": 0,
    "coopBotCount": 0,
    "coopBotDiff": 0,
    "noVehicles": 1,
    "joinLink": "bf2://185.107.96.59:16567",
    "joinLinkWeb": "https://joinme.click/g/bf2/185.107.96.59:16567",
    "teams":
    [
        {
            "index": 1,
            "label": "MEC"
        },
        {
            "index": 2,
            "label": "US"
        }
    ],
    "players":
    [
        {
            "pid": 43812139,
            "name": "The_Man_13",
            "tag": "=420=",
            "score": 10,
            "kills": 4,
            "deaths": 1,
            "ping": 121,
            "team": 1,
            "teamLabel": "MEC",
            "aibot": false
        },
        // more players
    ]
}

Get a player's details#

GET /players/:name

Note: You can also access each property individually. For example, GET /players/:name/score will return only the players's current score as plain text.

Response

200 OK
{
    "pid": 500337422,
    "name": "weah92",
    "tag": "",
    "score": 52,
    "kills": 18,
    "deaths": 2,
    "ping": 10,
    "team": 2,
    "teamLabel": "US",
    "aibot": false
}

Get a player's current server's details#

GET /players/:name/server

Please see the section on getting an individual server's details, as this endpoint's features and response structure are identical.