Skip to content

Battlefield Hardline

Battlefield Hardline endpoints are available at https://api.bflist.io/v2/bfh/.

Live stats#

Retrieve the current number of active players and servers.

GET /livestats HTTP/1.1

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "servers": 49,
  "players": 94
}

List servers#

Get a paginated list of currently available servers.

GET /servers HTTP/1.1

Incomplete servers

Some servers may only have a limited set of attributes available. In these cases, the _completeInfo property will be set to false. For more information, see this section.

Parameters

param Description
cursor Pagination cursor (optional, required if after is set)
after Pagination marker (optional)
perPage Number of items per page (optional, default: 50)

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "servers": [
    {
      "guid": "c257db22-b70e-49ba-916e-3af85978b7cb",
      "ip": "94.250.199.217",
      "port": 25200,
      "name": "[3D] DOWNTOWN & DUSTBOWL & DERAILED ONLY",
      "numPlayers": 32,
      "maxPlayers": 64,
      "map": "mp_glades",
      "mapLabel": "Everglades",
      "gameType": "TurfWarLarge",
      "roundsPlayed": 0,
      "roundsTotal": 1,
      "targetScore": 0,
      "password": false,
      "ranked": true,
      "punkbuster": true,
      "punkbusterVersion": "v1.905 | A1383 C2.340",
      "joinQueue": true,
      "quickmatch": false,
      "uptime": 10273,
      "roundTime": 2021,
      "region": "EU",
      "country": "DE",
      "pingSite": "ams",
      "version": "613064",
      "teams": [
        {
          "tickets": 1309.74048
        },
        {
          "tickets": 197.915344
        }
      ],
      "players": [
        {
          "name": "PedroThePotato5",
          "team": 2,
          "squad": 1,
          "squadLabel": "Alpha",
          "kills": 9,
          "deaths": 16,
          "score": 3121,
          "rank": 52,
          "ping": 27,
          "type": 0,
          "typeLabel": "Player"
        },
        // more players
      ],
      "_completeInfo": true
    },
    {
      "guid": "c1cb794c-c577-42b7-b147-6c1327f34f80",
      "ip": "31.204.141.38",
      "port": 25203,
      "name": "Official EA Europe #832921",
      "numPlayers": 14,
      "maxPlayers": 64,
      "map": "mp_downtown",
      "mapLabel": "Downtown",
      "gameType": "TeamDeathMatch",
      "roundTime": 331,
      "players": [
        {
          "name": "TheRealTristan0",
          "team": 2,
          "squad": 5,
          "squadLabel": "Echo",
          "kills": 0,
          "deaths": 0,
          "score": 0,
          "rank": 13,
          "ping": 27,
          "type": 0,
          "typeLabel": "Player"
        },
        // more players
      ],
      "_completeInfo": false
    },
    // more servers
  ],
  "cursor": "4c379877-b1f0-4534-8a4c-627d9503de9e",
  "hasMore": true
}

Get a server#

Retrieve a single server.

GET /servers/{ip}:{port} HTTP/1.1

Incomplete servers

Some servers may only have a limited set of attributes available. In these cases, the _completeInfo property will be set to false. For more information, see this section.

Parameters

param Description
ip Server's (public) IP address
port Server's game port

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "guid": "7026a5d2-233d-47a8-8387-14e8cb5f3c05",
  "ip": "176.9.205.117",
  "port": 25200,
  "name": "!!All Big Community Here (ABCH) - NO abusive rules!",
  "numPlayers": 64,
  "maxPlayers": 64,
  "map": "mp_bank",
  "mapLabel": "Bank Job",
  "gameType": "BloodMoney",
  "roundsPlayed": 0,
  "roundsTotal": 1,
  "targetScore": 0,
  "password": false,
  "ranked": true,
  "punkbuster": true,
  "punkbusterVersion": "v1.905 | A1383 C2.340",
  "joinQueue": true,
  "quickmatch": false,
  "uptime": 33800,
  "roundTime": 724,
  "region": "EU",
  "country": "DE",
  "pingSite": "ams",
  "version": "613064",
  "teams": [
    {
      "tickets": 261
    },
    {
      "tickets": 50
    }
  ],
  "players": [
    {
      "name": "SuperMaylKing",
      "team": 2,
      "squad": 2,
      "squadLabel": "Bravo",
      "kills": 18,
      "deaths": 10,
      "score": 4609,
      "rank": 64,
      "ping": 62,
      "type": 0,
      "typeLabel": "Player"
    },
    // more players
  ],
  "_completeInfo": true
}

Get a player#

Fetch a currently active player.

GET /players/{name} HTTP/1.1

Player Name Conflicts

In rare cases, two active players may have exactly the same name. To avoid inconsistencies, the API responds with a 409 Conflict error if a request refers to a player name that isn't unique.

Parameters

param Description
name Player's url-encoded name/nick (without any tag/prefix)

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "name": "DAT_AnimaL_NL",
  "team": 2,
  "squad": 1,
  "squadLabel": "Alpha",
  "kills": 12,
  "deaths": 20,
  "score": 3194,
  "rank": 31,
  "ping": 16,
  "type": 0,
  "typeLabel": "Player"
}

Get a player's current server#

Get the server a player is currently playing on.

GET /players/{name}/server HTTP/1.1

Incomplete servers

Some servers may only have a limited set of attributes available. In these cases, the _completeInfo property will be set to false. For more information, see this section.

Parameters

param Description
name Player's url-encoded name/nick (without any tag/prefix)

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
  "guid": "f091cee8-a3b4-42f7-9e00-3eabef9e8918",
  "ip": "94.250.199.30",
  "port": 25200,
  "name": "! [FREE] Rescue + VIP + SQ Heist & Syndicate + Mamooth I 60Hz",
  "numPlayers": 0,
  "maxPlayers": 10,
  "map": "xp4_cemetery",
  "mapLabel": "Cemetery",
  "gameType": "TurfWarLarge",
  "roundsPlayed": 0,
  "roundsTotal": 1,
  "targetScore": 0,
  "password": false,
  "ranked": true,
  "punkbuster": true,
  "punkbusterVersion": "v1.905 | A1383 C2.340",
  "joinQueue": true,
  "quickmatch": false,
  "uptime": 204098,
  "roundTime": 204097,
  "region": "EU",
  "country": "DE",
  "pingSite": "ams",
  "version": "613064",
  "teams": [
    {
      "tickets": 1000
    },
    {
      "tickets": 1000
    }
  ],
  "players": [
    {
      "name": "Snow47Ghost",
      "team": 2,
      "squad": 3,
      "squadLabel": "Charlie",
      "kills": 29,
      "deaths": 25,
      "score": 8156,
      "rank": 51,
      "ping": 27,
      "type": 0,
      "typeLabel": "Player"
    },
    // more players
  ],
  "_completeInfo": true
}

Incomplete servers#

Battlefield Hardline servers can be updated in two ways:

  • Directly, by retrieving data from the game server itself.
  • Via Battlelog snapshots, if direct communication with the game server fails.

Direct querying provides more detailed information. As a result, Battlelog snapshots are only used as a fallback when direct querying isn't possible.

Each server object has a boolean property called _completeInfo to indicate whether it includes the full set of properties.

  • If _completeInfo is true, the server has all the usual properties.
  • If _completeInfo is false, only a limited set of properties is available. The following properties will be missing: roundsPlayed, roundsTotal, targetScore, password, ranked, punkbuster, punkbusterVersion, joinQueue, quickmatch, uptime, region, country, pingSite, version, teams.