GameAPIs

Battlefield 2 Documentation

Parameters

Required Parameter Type Description Default Value
True IP String Server's IP address or domain None
False Port Integer The port of which the game server is running on. 16567

Single Server

GET https://use.gameapis.net/bf2/query/status/{IP}:{PORT}
{
    "status": true,
    "hostname": "{IP}",
    "port": {PORT},
    "cached": false
}

Multiple Servers

GET https://use.gameapis.net/bf2/query/status/{IP}:{PORT},{IP2}:{PORT2}
{
    "{IP}:{PORT}": {
        "status": true,
        "hostname": "{IP}",
        "port": {PORT},
        "cached": false
    },
    "{IP2}:{PORT2}": {
        "status": true,
        "hostname": "{IP2}",
        "port": {PORT2},
        "cached": false
    }
}

Single Server

GET https://use.gameapis.net/bf2/query/players/{IP}:{PORT}
{
    "status": true,
    "hostname": "{IP}",
    "port": {PORT},
    "players": {
        "online": 1,
        "max": 100,
        "list": [
            {
                "player": "ClashB",
                "score": "0",
                "ping": "53",
                "team": "2",
                "deaths": "2",
                "pid": "2942620",
                "skill": "0",
                "AIBot": "0"
            }
        ]
    },
    "cached": false
}

Multiple Servers

GET https://use.gameapis.net/bf2/query/players/{IP}:{PORT},{IP2}:{PORT2}
{
    "{IP}:{PORT}": {
        "status": true,
        "hostname": "{IP}",
        "port": {PORT},
        "players": {
            "online": 0,
            "max": 100,
            "list": null
        },
        "cached": false
    },
    "{IP2}:{PORT2}": {
        "status": true,
        "hostname": "{IP2}",
        "port": {PORT2},
        "players": {
            "online": 1,
            "max": 100,
            "list": [
                {
                    "player": "ClashB",
                    "score": "0",
                    "ping": "53",
                    "team": "2",
                    "deaths": "2",
                    "pid": "2942620",
                    "skill": "0",
                    "AIBot": "0"
                }
            ]
        },
        "cached": false
    }
}

Single Server

GET https://use.gameapis.net/bf2/query/info/{IP}:{PORT}
{
    "status": true,
    "hostname": "{IP}",
    "port": {PORT},
    "name": "BF2 Server",
    "map": "Wake Island 2007",
    "join": "bf2://{IP}:{PORT}/",
    "version": "1.5.3153-802.0",
    "players": {
        "online": 1,
        "max": 100,
        "list": [
            {
                "player": "ClashB",
                "score": "0",
                "ping": "53",
                "team": "2",
                "deaths": "2",
                "pid": "2942620",
                "skill": "0",
                "AIBot": "0"
            }
        ]
    },
    "cached": false
}

Multiple Servers

GET https://use.gameapis.net/bf2/query/info/{IP}:{PORT},{IP2}:{PORT2}
{
    "{IP}:{PORT}": {
        "status": true,
        "hostname": "{IP}",
        "port": {PORT},
        "name": "BF2 Server",
        "map": "Strike At Karkand",
        "join": "bf2://{IP}:{PORT}/",
        "version": "1.5.3153-802.0",
        "players": {
            "online": 0,
            "max": 100,
            "list": null
        },
        "cached": false
    },
    "{IP2}:{PORT2}": {
        "status": true,
        "hostname": "{IP2}",
        "port": {PORT2},
        "name": "BF2 Server",
        "map": "Wake Island 2007",
        "join": "bf2://{IP2}:{PORT2}/",
        "version": "1.5.3153-802.0",
        "players": {
            "online": 1,
            "max": 100,
            "list": [
                {
                    "player": "ClashB",
                    "score": "0",
                    "ping": "53",
                    "team": "2",
                    "deaths": "2",
                    "pid": "2942620",
                    "skill": "0",
                    "AIBot": "0"
                }
            ]
        },
        "cached": false
    }
}