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.

GET /servers/:page

Response

200 OK
X-Total-Pages: 3

[
    {
        "guid": "21897b9-6bea1c6-1f7ea26-31a14f6",
        "ip": "95.172.92.116",
        "port": 16567,
        "name": "2F4Y.com - Best Maps No Rules!",
        "numPlayers": 61,
        "maxPlayers": 64,
        "mapName": "Kubra Dam",
        "mapSize": 64,
        "password": false,
        "gameType": "gpm_cq",
        "gameVersion": "1.5.3153-802.0",
        "gameVariant": "bf2",
        "timelimit": 0,
        "roundsPerMap": 2,
        "ranked": true,
        "anticheat": true,
        "battlerecorder": true,
        "demoIndex": "http://br.2f4y.com/upload/s01/",
        "demoDownload": "http://br.2f4y.com/upload/s01/",
        "voip": true,
        "autobalance": true,
        "friendlyfire": false,
        "tkmode": "No Punish",
        "startdelay": 15,
        "spawntime": 15,
        "sponsorText": "http://2f4y.com",
        "sponsorLogoUrl": "http://2f4y.com/dezignerz/upload/Image/serverpromo_best_maps.jpg",
        "communityLogoUrl": "http://2f4y.com/dezignerz/upload/Image/serverpromo_best_maps.jpg",
        "scorelimit": 0,
        "ticketratio": 100,
        "teamratio": 100,
        "team1": "MEC",
        "team2": "US",
        "pure": true,
        "globalUnlocks": true,
        "reservedSlots": 1,
        "dedicated": true,
        "os": "linux-64",
        "bots": false,
        "fps": 35,
        "plasma": false,
        "coopBotRatio": 0,
        "coopBotCount": 0,
        "coopBotDiff": 0,
        "noVehicles": false,
        "joinLink": "bf2://95.172.92.116:16567",
        "joinLinkWeb": "https://joinme.click/g/bf2/95.172.92.116:16567",
        "teams":
        [
            {
                "index": 1,
                "label": "MEC"
            },
            {
                "index": 2,
                "label": "US"
            }
        ],
        "players":
        [
            {
                "pid": 500248908,
                "name": "Ex_Mun",
                "tag": "[cMc]",
                "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,
    "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.