# API

### ~~Get Script Details~~

{% hint style="danger" %}
FiveM has added a rate limit to its server API, so script statistics can no longer be collected. Therefore, this API will now return incorrect data.
{% endhint %}

`GET /api/v1/public/scripts/{script-name}`

Returns detailed public information about a specific script.

***

#### Headers

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

***

#### Path Parameters

| Name        | Type   | Description                     |
| ----------- | ------ | ------------------------------- |
| script-name | string | Unique identifier of the script |

**Rules**

* Max length: `50`
* Allowed characters: `a-z A-Z 0-9 - _`

***

#### Query Parameters

| Name         | Type    | Description                          |
| ------------ | ------- | ------------------------------------ |
| getServerIds | boolean | Include server IDs using this script |

***

#### Response

{% tabs %}
{% tab title="200" %}

```json
{
    "scriptName": "tgiann-core",
    "currentRank": 323,
    "serverCount": 1639,
    "serverIds": [
        "3ox84b",
        "zpxbx9",
        "3eddyb",
        "jyl9vp",
        "r44p77"
    ],
    "rankChange24h": 13,
    "direction": "up",
    "updatedAt": "2026-01-03T11:02:57.622Z"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid script name"
}
```

{% endtab %}

{% tab title="404" %}

```json
{
"error": "Script not found"
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "error": "Internal server error"
}
```

{% endtab %}
{% endtabs %}

***

### Get Server Details

`GET /api/v1/public/servers/{id}`

Returns public details of a single server.

***

#### Headers

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

***

#### Path Parameters

| Name | Type   | Description              |
| ---- | ------ | ------------------------ |
| id   | string | Unique server identifier |

**Rules**

* Max length: `10`
* Allowed characters: `a-z A-Z 0-9 - _`

***

#### Response

{% tabs %}
{% tab title="200" %}

```json
{
    "id": "byejz8",
    "detailsLevel": 299,
    "hostname": "^1EDRP Classic",
    "locale": "tr-TR",
    "localeCountry": "TR",
    "projectName": "^6EDRP Classic",
    "rawVariables": {
        "Developer": "ZEU & TGIANN",
        "banner_connecting": "https://i.hizliresim.com/523d4us.png",
        "banner_detail": "https://i.hizliresim.com/523d4us.png",
        "discord": "dc.gg/edot",
        "gamename": "gta5",
        "locale": "tr-TR",
        "onesync_enabled": "true",
        "snag_weapon_metas": "V1.1.4",
        "sv_disableClientReplays": "false",
        "sv_enforceGameBuild": "3095",
        "sv_enhancedHostSupport": "true",
        "sv_lan": "false",
        "sv_licenseKeyToken": "3441417xdq26m72j5gpaljv1_4115566:103ae610b517b53592b5bdc99fd1f1657cb3c0d85db7fa132976f7dacb6c0864",
        "sv_maxClients": "128",
        "sv_poolSizesIncrease": "{\"AnimStore\":20480,\"AttachmentExtension\":430,\"CMoveObject\":600,\"EntityDescPool\":20480,\"FragmentStore\":14000,\"InteriorProxy\":450,\"LightEntity\":1000,\"Object\":2000,\"ObjectIntelligence\":512,\"OcclusionInteriorInfo\":20,\"OcclusionPathNode\":5000,\"OcclusionPortalEntity\":750,\"OcclusionPortalInfo\":750,\"PortalInst\":225,\"ScaleformStore\":200,\"StaticBounds\":5000,\"TxdStore\":26000,\"netGameEvent\":400}",
        "sv_projectDesc": "EDOT Community | dc.gg/edot",
        "sv_projectName": "^6EDRP Classic",
        "sv_pureLevel": "1",
        "sv_replaceExeToSwitchBuilds": "false",
        "sv_scriptHookAllowed": "false",
        "tags": "EDRP Classic",
        "txAdmin-version": "8.0.1",
        "premium": "pt"
    },
    "joinId": "byejz8",
    "enforceGameBuild": "3095",
    "gametype": "Roleplay",
    "mapname": "EDV",
    "server": "FXServer-master SERVER v1.0.0.17000 win32",
    "playersMax": 128,
    "playersCurrent": 15,
    "burstPower": 0,
    "upvotePower": 0,
    "connectEndPoints": [
        "https://private-placeholder.cfx.re/"
    ],
    "private": true,
    "ownerID": 4115566,
    "ownerName": "edcommunity",
    "ownerAvatar": "https://forum.cfx.re/user_avatar/forum.cfx.re/edcommunity/128/3833171_2.png",
    "ownerProfile": "https://forum.cfx.re/u/edcommunity",
    "supportStatus": "supported",
    "resources": [
        "tgiann-mdtv2",
        "tgiann-licence",
        "monitor"
    ],
    "players": [
        {
            "id": 0,
            "name": "Anon0",
            "ping": 0,
            "endpoint": "127.0.0.1:1234",
            "identifiers": []
        },
    ],
    "variables": {
        "Developer": "ZEU & TGIANN",
        "discord": "dc.gg/edot",
        "snag_weapon_metas": "V1.1.4"
    },
    "bannerConnecting": "https://i.hizliresim.com/523d4us.png",
    "bannerDetail": "https://i.hizliresim.com/523d4us.png",
    "gamename": "gta5",
    "onesyncEnabled": true,
    "licenseKeyToken": "3441417xdq26m72j5gpaljv1_4115566:103ae610b517b53592b5bdc99fd1f1657cb3c0d85db7fa132976f7dacb6c0864",
    "projectDescription": "EDOT Community",
    "pureLevel": "1",
    "scriptHookAllowed": false,
    "tags": [
        "edrp classic"
    ],
    "premium": "pt",
    "iconVersion": -892440589,
    "offline": true,
    "currentRank": 982,
    "max_24h_players": 78
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid server ID"
}
```

{% endtab %}

{% tab title="404" %}

```json
{
  "error": "Server not found"
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "error": "Internal server error"
}
```

{% endtab %}
{% endtabs %}

***

### Get Server Player History

`GET /api/v1/public/servers/{id}/history`

Returns player count history for the last 7 days.

***

#### Headers

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

***

#### Path Parameters

| Name | Type   | Description              |
| ---- | ------ | ------------------------ |
| id   | string | Unique server identifier |

**Rules**

* Max length: `100`
* Allowed characters: `a-z A-Z 0-9 - _`

***

#### Response

{% tabs %}
{% tab title="200" %}

```json
[
    {
        "playerCount": 23,
        "recordedAt": "2025-12-27T12:03:48.182Z"
    },
    {
        "playerCount": 50,
        "recordedAt": "2025-12-27T15:03:48.938Z"
    },
    {
        "playerCount": 66,
        "recordedAt": "2025-12-27T18:03:50.020Z"
    },
    {
        "playerCount": 59,
        "recordedAt": "2025-12-27T21:03:45.582Z"
    },
    {
        "playerCount": 32,
        "recordedAt": "2025-12-28T12:03:18.277Z"
    },
    {
        "playerCount": 37,
        "recordedAt": "2025-12-28T15:03:35.563Z"
    },
    {
        "playerCount": 84,
        "recordedAt": "2025-12-28T18:04:19.977Z"
    },
    {
        "playerCount": 68,
        "recordedAt": "2025-12-28T21:03:58.579Z"
    },
    {
        "playerCount": 14,
        "recordedAt": "2025-12-29T09:03:29.087Z"
    },
]
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "No history found for this server"
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "error": "Internal server error"
}
```

{% endtab %}
{% endtabs %}

***

#### Caching

All endpoints are cached with:

```
Cache-Control: public, s-maxage=300, stale-while-revalidate=600
```
