Skip to content

Forgotten Hope 2

Forgotten Hope 2 endpoints are available at https://api.bflist.io/fh2/v1/.

Separate endpoints for a mod#

While Forgotten Hope 2 is a Battlefield 2 mod on a technical level, it might as well be a separate game. The mod uses it's own GameSpy-replacement backend, which keeps a completely separate server list, login system and tracks stats for players. Because of the separate backend, you would not find and of the servers or players when looking at the other Battlefield 2 GameSpy-replacements (BF2Hub/PlayBF2).

In order to avoid confusion, Forgotten Hope 2 is tracked as a separate game with separate API endpoints.

Live stats#

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

GET /livestats

Response

200 OK

{
    "servers": 10,
    "players": 76
}

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.

GET /servers/:page

Response

200 OK
X-Total-Pages: 1

[
  {
    "guid": "1cdf0d6-8e93060-e259d9-d278c55",
    "ip": "88.198.61.241",
    "port": 16567,
    "queryPort": 29900,    
    "name": "[PlayFH2]RANKED #1 FH2.63 [100p]",
    "numPlayers": 1,
    "maxPlayers": 100,
    "password": false,
    "gameType": "gpm_cq",
    "mapName": "Giarabub",
    "mapSize": 16,
    "gameVersion": "1.5.3153-802.0",
    "gameVariant": "fh2",
    "timelimit": 3600,
    "roundsPerMap": 1,
    "ranked": true,
    "anticheat": true,
    "battlerecorder": true,
    "demoIndex": "http://",
    "demoDownload": "http://",
    "voip": true,
    "autobalance": false,
    "friendlyfire": true,
    "tkmode": "No Punish",
    "startdelay": 25,
    "spawntime": 15,
    "sponsorText": "stats.playfh2.net",
    "sponsorLogoUrl": "http://i.imgur.com/Z03y4s8.png",
    "communityLogoUrl": "http://i.imgur.com/Z03y4s8.png",
    "scorelimit": 0,
    "ticketratio": 200,
    "teamratio": 100,
    "team1": "IT",
    "team2": "AU",
    "pure": false,
    "globalUnlocks": true,
    "reservedSlots": 0,
    "dedicated": true,
    "os": "linux-64",
    "bots": false,
    "fps": 36,
    "plasma": false,
    "coopBotRatio": 0,
    "coopBotCount": 0,
    "coopBotDiff": 0,
    "noVehicles": false,
    "teams": [
      {
        "index": 1,
        "label": "IT"
      },
      {
        "index": 2,
        "label": "AU"
      }
    ],
    "players": [
      {
        "pid": 465201158,
        "name": "erikwingco1",
        "tag": "",
        "score": 0,
        "kills": 0,
        "deaths": 0,
        "ping": 215,
        "team": 2,
        "teamLabel": "AU",
        "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": "202ba49-7dfcb1c-9003645-1a5d1ef",
  "ip": "93.186.199.84",
  "port": 16569,
  "queryPort": 29900,
  "name": "*Crazy Veterans* FH2 | Firing Range",
  "numPlayers": 0,
  "maxPlayers": 32,
  "password": false,
  "gameType": "gpm_cq",
  "mapName": "Firing Range Plus",
  "mapSize": 64,
  "gameVersion": "1.5.3153-802.0",
  "gameVariant": "fh2",
  "timelimit": 3600,
  "roundsPerMap": 1,
  "ranked": false,
  "anticheat": true,
  "battlerecorder": false,
  "demoIndex": "http://",
  "demoDownload": "http://",
  "voip": true,
  "autobalance": false,
  "friendlyfire": true,
  "tkmode": "No Punish",
  "startdelay": 10,
  "spawntime": 9,
  "sponsorText": "",
  "sponsorLogoUrl": "",
  "communityLogoUrl": "",
  "scorelimit": 0,
  "ticketratio": 200,
  "teamratio": 100,
  "team1": "DE",
  "team2": "FR",
  "pure": false,
  "globalUnlocks": false,
  "reservedSlots": 0,
  "dedicated": true,
  "os": "linux-64",
  "bots": false,
  "fps": 35,
  "plasma": false,
  "coopBotRatio": 0,
  "coopBotCount": 0,
  "coopBotDiff": 0,
  "noVehicles": false,
  "teams": [
    {
      "index": 1,
      "label": "DE"
    },
    {
      "index": 2,
      "label": "FR"
    }
  ],
  "players": [
    {
      "pid": 464842463,
      "name": "johnyfyy",
      "tag": "",
      "score": 23,
      "kills": 9,
      "deaths": 2,
      "ping": 40,
      "team": 1,
      "teamLabel": "IT",
      "aibot": false
    }
  ]
}

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": 465171966,
  "name": "antoniooo",
  "tag": "fhp22",
  "score": 58,
  "kills": 14,
  "deaths": 3,
  "ping": 229,
  "team": 2,
  "teamLabel": "AU",
  "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.