Battlefield Hardline
Battlefield Hardline endpoints are available at https://api.bflist.io/bfh/v1
.
Live stats#
Get the number of currently active players and servers in Battlefield Hardline.
GET /livestats
Response
200 OK
{
"servers": 49,
"players": 94
}
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.
GET /servers/:page
Note: Some servers only contain a limited set of attributes. For these servers, _completeInfo
will be set to false
. More details below.
Response
200 OK
X-Total-Pages: 13
[
{
"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
]
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 (gameExpansions, extendedInfo, settings, maps, slots, teams, players) are returned as JSON. So, GET /servers/:ip::port/players
will return a JSON array of players on the server.
Note: Some servers only contain a limited set of attributes. For these servers, _completeInfo
will be set to false
. More details below.
Response
200 OK
{
"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's details#
GET /players/:name
Player type is one of: player (0
), spectator(1
), hacker (2
).
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
{
"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'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.
Incomplete servers#
Battlefield Hardline servers can be updated in two different ways. Either directly, by retrieving data from the game server itself, or via Battlelog snapshots. However, a lot more details are available when querying the server directly. Hence Battlelog snapshots are only used if the direct communication with the game server fails.
To indicate whether a server has the complete set of properties available, each server object contains a boolean property: _completeInfo
. If _completeInfo
is true
, the server contains all the usual properties. If, however, _completeInfo
is false
, the server only contains a limited set of properties. The following properties will be missing: roundsPlayed
, roundsTotal
, targetScore
, password
, ranked
, punkbuster
, punkbusterVersion
, joinQueue
, quickmatch
, uptime
, region
, country
, pingSite
, version
, teams
.