# About us

Night API Documentation, to explain you how to use the API and the NPM module properly

{% hint style="danger" %}
This API requires an API key to be sent along with your requests: Get yours by <mark style="color:red;">creating an account</mark>
{% endhint %}

### About US

Night-API is a project created by the Night-Group organization the 8 August 2021 by LACOSTAR91 & Max. We are two french developper and student.


# Changelogs

View all the changelogs of the API and the NPM module since the start of the project

The [API](https://night-api.com) changelogs since the start of Night-API

{% content-ref url="/pages/USQlLXIq9HrzLdirbVa1" %}
[API](/changelogs/api)
{% endcontent-ref %}

The [NPM module](https://npmjs.com/package/night-api) changelogs since the start of Night-API

{% content-ref url="/pages/N7RRRljaW9wLEdQjlsR5" %}
[Module](/changelogs/module)
{% endcontent-ref %}


# API

All changelogs are now on the site:

{% embed url="<https://night-api.com/update>" %}
All API and website updates
{% endembed %}


# Module

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

### Module V1.2.0 - 23/07/2022

Added

* Added captcha and qrcode part of the API on the module
* Fix API breaking change
* Module optimization
  {% endtab %}

{% tab title="1.1.1" %}

### Module V1.1.1 - 05/05/2022

Added

* Added new animals of the API on the module
  {% endtab %}

{% tab title="1.1.0" %}

###

### Module V1.1.0 - 26/04/2022

Added

* Added new routes of the API on the module

Update

* Update the module for the compatibility with the API
* Module rewritten in TypeScript
* Redesign of the module base
  {% endtab %}

{% tab title="1.0.2" %}

### Module V1.0.2 - 16/08/2022

Update

* Domain name changed from night-api.ga to night-api.com
* Module optimization for speed and efficiency
  {% endtab %}
  {% endtabs %}


# Rate-Limit

Voici les rate-limites pour les différentes routes de l'API

Jokes - `5 req/sec` (:star:`10 req/sec`) \
Games - `4 req/sec` (:star: `8 req/sec`) \
Animals - `10 req/sec*` (:star: `20 req/sec*`) \
NSFW - `10 req/sec` (:star: `20 req/sec`) \
SFW - `10 req/sec` (:star: `20 req/sec`)\
\
Generateurs (QRcode, Captcha, reader) - `3 req/sec` (:star: `5 req/sec`)\
IP infos - `10 req/sec` (:star: `20 req/sec`)

\
L'étoile ":star:" indique le rate-limites pour les membres premium\
\
\* : La rate-limit s'applique à toute requete pour une image d'animaux


# Start with the NPM module

### Installation

You can simply install dependence on your project from NPM:

```bash
$ npm install night-api
```

### Start

#### Importation

```javascript
// ES6 (includes typings)
import { NightAPI } from 'night-api';

// CommonJS
const { NightAPI } = require('night-api');
```

#### Initialization

{% hint style="warning" %}
To use the API, you need an authentication key that you can get by connecting or register to [Night-API](https://night-api.com/register)
{% endhint %}

```javascript
const api = new NightAPI('YOUR_API_KEY');
```


# Images

The differents methods to get images with the NPM module

Differents images types exist in the API, currently there are three and here they are:

* [Animals](/module/images/animals): You will receive only animals image

{% content-ref url="/pages/vwZn7dCm0AklNNam3Pq0" %}
[Animals](/module/images/animals)
{% endcontent-ref %}

* [SFW](broken://pages/02TUwE1NmUt5CiwNyNgI): You will receive only SFW (Safe For Work) images

{% content-ref url="/pages/xyqll3M5hs1PM8S1fIEq" %}
[SFW](/images/sfw)
{% endcontent-ref %}

* [NSFW](broken://pages/MWl5dGkBRn8L1uXAE21A): You will receive only NSFW (Not Safe For Work) images

{% content-ref url="/pages/3w0fd00KgNfFgB8tohJG" %}
[NSFW](/images/nsfw)
{% endcontent-ref %}


# Animals

Currently we have **13 animals available** on the API:

```javascript
// You can add an ID in the parameter of the function to get an image with an precise ID
// Or without ID parameter for random images

// Return: Promise

const image = await api.animals.dog(); 

const image = await api.animals.cat(5);

const image = await api.animals.fox(10);

const image = await api.animals.giraffe(7);

const image = await api.animals.kangaroo(1);

const image = await api.animals.lion();

const image = await api.animals.quokka();

const image = await api.animals.wolf();

const image = await api.animals.lezard();

const image = await api.animals.leopard();

const image = await api.animals.singes();

const image = await api.animals.paon();

const image = await api.animals.hamster();
```

**Animals available:**

* Dog
* Cat
* Fox
* Giraffe
* Kangaroo
* Lion
* Quokka
* Wolf
* Lézard
* Léopard
* Singes
* Paon
* Hamster


# Games

The differents methods to get game server information with the NPM module

Differents games exist in the API, currently there are three and here they are:

* [Garry's Mod](/module/games/garrys-mod): Get information of a Garry's Mod server by his IP

{% content-ref url="/pages/FGpV3qjfhjzSl3lSU51U" %}
[Garry's Mod](/module/games/garrys-mod)
{% endcontent-ref %}

* [Minecraft](/module/games/minecraft): Get information of a Minecraft server by his IP

{% content-ref url="/pages/xm6AEwGdkGTtTXpdBj62" %}
[Minecraft](/module/games/minecraft)
{% endcontent-ref %}

* [FiveM](/module/games/fivem): Get information of a FiveM server by his IP

{% content-ref url="/pages/2w1KTIIYKMNRFIreNOIb" %}
[FiveM](/module/games/fivem)
{% endcontent-ref %}


# Garry's Mod

#### Get Garry's Mod server info

```javascript
const garrysmod = await api.games.garrysmod("208.103.169.58"); // Return: Promise
```


# Minecraft

#### Get Minecraft server info

```javascript
const minecraft = await api.games.minecraft("GG.PRISONFUN.COM"); // Return: Promise
```


# FiveM

#### Get FiveM server info

```javascript
const fivem = await api.games.fivem("play.blueislandrp.com"); // Return: Promise
```


# Jokes

Basic information to know before using the Jokes API

{% hint style="danger" %}
This API requires an API key to be sent along with your requests: Get yours by <mark style="color:red;">creating an account</mark>
{% endhint %}

{% hint style="info" %}
All jokes are **only available in french** for the moment. Sorry for the inconvenience.

We are hard working for create a translation
{% endhint %}

Different methods exist to have jokes, currently there are three and here they are:

* [**Random Jokes**](/joke/jokes/aleatoire): You can only choose which category of joke you do not want to have

{% content-ref url="/pages/-Ma9x56yjcAKtISmvsb0" %}
[Random](/joke/jokes/aleatoire)
{% endcontent-ref %}

* [**Jokes by category**](/joke/jokes/type): You will receive only the jokes of which you indicated the category&#x20;

{% content-ref url="/pages/-Ma52t\_1YosQ6XLTtNpK" %}
[Category](/joke/jokes/type)
{% endcontent-ref %}

* [**Jokes by ID**](/joke/jokes/id): You will receive the jokes of which you indicate the ID

{% content-ref url="/pages/-Ma9x5mT\_A22oBAG1WTM" %}
[ID](/joke/jokes/id)
{% endcontent-ref %}

Here is an example of what each method returns

```json
{
    "status": 200, //The status allows to know if the joke was found or not 
    "content": {
        "id": 44, // The unique identifier
        "type": "global", // The category of the joke
        "blague": "Que dit un canard quand il va aux toilettes ?", // The joke
        "reponse": "Je vais au petit coin." // The answer
    }
}
```


# Random

All kinds of jokes of different types

## Random joke

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/jokes`

Génère une blague aléatoirement.

#### Query Parameters

| Name     | Type   | Description                                            |
| -------- | ------ | ------------------------------------------------------ |
| disallow | string | To avoid the generation of certain categories of jokes |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="200 Random joke find." %}

```javascript
{
    "status": 200,
    "content": {
        "id": 44,
        "type": "global",
        "blague": "Que dit un canard quand il va aux toilettes ?",
        "reponse": "Je vais au petit coin."
    }
}
```

{% endtab %}

{% tab title="400 Bad disallow query" %}

```javascript
{ 
    status: 400, 
    error: "Bad disallow query provided"
}
```

{% endtab %}
{% endtabs %}

**Lists of available categories:**

* global
* dev
* dark
* limit
* beauf
* blondes

<br>

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/jokes', {
    headers: {
        authorization: "API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

\
Or with the NPM module

<pre class="language-javascript"><code class="lang-javascript">const { NightAPI } = require('night-api');
<strong>const api = new NightAPI('YOUR_API_KEY');
</strong>
const blague = await api.jokes.random(); // Return: Promise
</code></pre>

\
With this method, you can specify certain categories that you do not want to receive.

```javascript
const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const blague = await api.jokes.random({
  disallow: ['dark', 'limit']
}); // Return: Promise
```


# Category

Choose which Category of joke you would like to have

## Joke by Category

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/jokes/:type`

#### Path Parameters

| Name                                   | Type   | Description                                            |
| -------------------------------------- | ------ | ------------------------------------------------------ |
| type<mark style="color:red;">\*</mark> | string | Type of jokes to get (global, beauf, dev, limit, dark) |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="200 When a joke is found" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 44,
        "type": "global",
        "blague": "Que dit un canard quand il va aux toilettes ?",
        "reponse": "Je vais au petit coin."
    }
}
```

{% endtab %}

{% tab title="400 When the type of joke is wrong" %}

```javascript
{
    "status": 400,
    "error": "Bad type provided"
}
```

{% endtab %}
{% endtabs %}

**Lists of available categories:**

* global
* dev
* dark
* limit
* beauf
* blondes

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/jokes/global', {
    headers: {
        authorization: "API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

\
Or with the NPM module

```javascript
const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const blague = await api.jokes.byCategory('dev'); // Return: Promise
```


# ID

Choose a specific joke by its ID

## Blague par ID

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/jokes/:id`

#### Path Parameters

| Name                                 | Type   | Description                                  |
| ------------------------------------ | ------ | -------------------------------------------- |
| id<mark style="color:red;">\*</mark> | number | ID de la blague à récupérer (Entre 1 et 900) |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

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

```javascript
{
    "status": 200,
    "content": {
        "id": 44,
        "type": "global",
        "blague": "Que dit un canard quand il va aux toilettes ?",
        "reponse": "Je vais au petit coin."
    }
}
```

{% endtab %}

{% tab title="400: Bad Request ID incorrect" %}

```javascript
{ 
    status: 400, 
    error: "Bad ID provided", 
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/jokes/44', {
    headers: {
        authorization: "API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

\
Or with the NPM module

```javascript
const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const blague = await api.jokes.byID(50); // Return: Promise
```


# Animals

{% hint style="danger" %}
This API requires an API key to be sent along with your requests: Get yours by <mark style="color:red;">creating an account</mark>
{% endhint %}

* Currently there are **13 animals available** on the API:

{% content-ref url="/pages/azM4MTG4QCwEgO1yiPt5" %}
[Dog](/images/animals/dog)
{% endcontent-ref %}

{% content-ref url="/pages/LLUd7jhmjkWbRqvjX6IT" %}
[Cat](/images/animals/cat)
{% endcontent-ref %}

{% content-ref url="/pages/fBYWLnb5U5zHXpRO4LBZ" %}
[Fox](/images/animals/fox)
{% endcontent-ref %}

{% content-ref url="/pages/AOUTDHohChlC0eCAJG3E" %}
[Giraffe](/images/animals/giraffe)
{% endcontent-ref %}

{% content-ref url="/pages/qdS7o838GnhBoGxzW4AF" %}
[Kangaroo](/images/animals/kangaroo)
{% endcontent-ref %}

{% content-ref url="/pages/tEVtciBsMF0c6rlHlxtb" %}
[Lion](/images/animals/lion)
{% endcontent-ref %}

{% content-ref url="/pages/DE57pbmztNjouZKmrXuR" %}
[Quokka](/images/animals/quokka)
{% endcontent-ref %}

{% content-ref url="/pages/I3tZZYFQtAariaBajkhs" %}
[Wolf](/images/animals/wolf)
{% endcontent-ref %}

{% content-ref url="/pages/kGeK2iJTC6KybRL60c1p" %}
[Lézard](/images/animals/lezard)
{% endcontent-ref %}

{% content-ref url="/pages/T9WSaRqVpVh5ZP5noOxZ" %}
[Léopard](/images/animals/leopard)
{% endcontent-ref %}

{% content-ref url="/pages/uJo5BOYNEj61rA8MCojY" %}
[Singes](/images/animals/singes)
{% endcontent-ref %}

{% content-ref url="/pages/xqEVFfRSAfirbM4eGAiV" %}
[Paon](/images/animals/paon)
{% endcontent-ref %}

{% content-ref url="/pages/tgp5e3Wl08aOGkLSpjpp" %}
[Hamster](/images/animals/hamster)
{% endcontent-ref %}


# Dog

## Get a dog image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/dog/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 8100,
        "url": "https://cdn.night-api.com/api/images/animals/dog/n02097298_8858.jpg"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/dog', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Cat

## Get a cat image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/cat/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 760,
        "url": "https://cdn.night-api.com/api/images/animals/cat/pb.jpg"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/cat', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Fox

## Get a fox image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/fox/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 20,
        "url": "https://cdn.night-api.com/api/images/animals/fox/buvjE7yp4g3J7niFSpby.jpg"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/fox', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Giraffe

## Get a giraffe image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/giraffe/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 66,
        "url": "https://cdn.night-api.com/api/images/animals/giraffe/VPtYnonS49dQoSROTwfV.jpg"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/giraffe', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Kangaroo

## Get a kangaroo image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/kangaroo/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 20,
        "url": "https://cdn.night-api.com/api/images/animals/kangaroo/Dlf291qsSZSP5CnElpTd.jpg"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/kangaroo', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Lion

## Get a lion image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/lion/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 85,
        "url": "https://cdn.night-api.com/api/images/animals/lion/vSQyFukiLqADzWuj0opr.jpg"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/lion', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Quokka

## Get a quokka image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/quokka/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 31,
        "url": "https://cdn.night-api.com/api/images/animals/quokka/FZe2h2UJXtxBVsR48cbf.png"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/quokka', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Wolf

## Get a wolf image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/wolf/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 47,
        "url": "https://cdn.night-api.com/api/images/animals/wolf/phgkrPvHBjF2eVy9effDXDGK5dvy35.png"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/wolf', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Lézard

## Get a lezard image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/lezard/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 19,
        "url": "https://cdn.night-api.com/api/images/animals/lezard/ECbzuiDnjG31eMpgqVUJ8Lq7n4inm4.png"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/lezard', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Léopard

## Get a leopard image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/leopard/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 30,
        "url": "https://cdn.night-api.com/api/images/animals/leopard/L65sgTJWVLaEnvi4455AaBIobg3U1v.png"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/leopard', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Singes

## Get a singes image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/singes/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 11,
        "url": "https://cdn.night-api.com/api/images/animals/singes/8qNt9tHHyQePblna9Xc7vDBKC2vl7a.png"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/singes', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Paon

## Get a paon image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/paon/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 18,
        "url": "https://cdn.night-api.com/api/images/animals/paon/HSpg6YgX92xnPY16AsoJxVXPs8KVQE.png"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/paon', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# Hamster

## Get a hamster image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/hamster/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="400: Bad Request Bad token" %}

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 61,
        "url": "https://cdn.night-api.com/api/images/animals/hamster/ToI1QDI7f2NVHaujjz67s9NWFDUsxx.png"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/hamster', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```


# SFW

Basic information to know before using the SFW API

{% hint style="danger" %}
This API requires an API key to be sent along with your requests: Get yours by <mark style="color:red;">creating an account</mark>
{% endhint %}

Different methods exist to have SFW images, currently there are three and here they are:

* [**Random SFW**](/images/sfw/aleatoire): You have random images

{% content-ref url="/pages/tzOnzgyeQRzh9EHiA6SE" %}
[Random](/images/sfw/aleatoire)
{% endcontent-ref %}

* [**SFW images by category**](/images/sfw/type): You will receive only the images of which you indicated the category&#x20;

{% content-ref url="/pages/dcifYyZM5OrbP0exRdk2" %}
[Category](/images/sfw/type)
{% endcontent-ref %}

* [**SFW images by ID**](/images/sfw/id): You will receive the images of which you indicate the ID

{% content-ref url="/pages/4LGkFIUJk4oGOGLEfqNF" %}
[ID](/images/sfw/id)
{% endcontent-ref %}

Here is an example of what each method returns

```json
{
    "status": 200,
    "content": {
        "id": 34,
        "type": "holo",
        "url": "https://cdn.night-api.com/api/images/sfw/holo/75f9fcb764921bfaedc9e4182db02.jpg"
    }
}
```


# Random

All kinds of jokes of different types

## SFW Images

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/sfw`

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

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

```javascript
{
    "status": 200,
    "content": {
        "id": 34,
        "type": "holo",
        "url": "https://cdn.night-api.com/api/images/sfw/holo/75f9fcb764921bfaedc9e4182db02.jpg"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Invalid key"
}
```

{% endtab %}
{% endtabs %}

​**Lists of available SFW types:**

* Coffee
* Food
* Holo
* Kanna

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/sfw', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

Or with the module

```javascript
// Return: Promise

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const image = await api.sfw.fetchImage(); // Random images
```


# Category

Choose which Category of joke you would like to have

## SFW Images

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/sfw/:type`

#### Path Parameters

| Name                                   | Type   | Description                 |
| -------------------------------------- | ------ | --------------------------- |
| type<mark style="color:red;">\*</mark> | String | The type of SFW mage to get |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

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

```javascript
{
    "status": 200,
    "content": {
        "id": 34,
        "type": "holo",
        "url": "https://cdn.night-api.com/api/images/sfw/holo/75f9fcb764921bfaedc9e4182db02.jpg"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Bad type provided"
}
```

{% endtab %}
{% endtabs %}

​**Lists of available SFW types:**

* Coffee
* Food
* Holo
* Kanna

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/sfw/holo', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

Or with the module

```javascript
// Return: Promise

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const image = await api.sfw.fetchImage("holo"); // Random images of category "holo"
```


# ID

Choose a specific joke by its ID

## SFW Images

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/sfw/:id`

#### Path Parameters

| Name | Type   | Description  |
| ---- | ------ | ------------ |
|      | Number | The image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

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

```javascript
{
    "status": 200,
    "content": {
        "id": 34,
        "type": "holo",
        "url": "https://cdn.night-api.com/api/images/sfw/holo/75f9fcb764921bfaedc9e4182db02.jpg"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Bad type provided"
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/sfw/5', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

Or with the module

```javascript
// Return: Promise

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const image = await api.sfw.fetchImage(5); // Image with ID 5
```


# NSFW

Basic information to know before using the NSFW API

{% hint style="danger" %}
This API requires an API key to be sent along with your requests: Get yours by <mark style="color:red;">creating an account</mark>
{% endhint %}

Different methods exist to have NSFW images, currently there are three and here they are:

* [**Random NSFW**](/images/nsfw/aleatoire): You have random images

{% content-ref url="/pages/UZYSxWBQLiHY325sjAWr" %}
[Random](/images/nsfw/aleatoire)
{% endcontent-ref %}

* [**NSFW images by category**](/images/nsfw/type): You will receive only the images of which you indicated the category&#x20;

{% content-ref url="/pages/XZunNUVcu5UyOyF5Ww60" %}
[Category](/images/nsfw/type)
{% endcontent-ref %}

* [**NSFW images by ID**](/images/nsfw/id): You will receive the images of which you indicate the ID

{% content-ref url="/pages/beNluNNE5Qt72VaIuhjX" %}
[ID](/images/nsfw/id)
{% endcontent-ref %}

Here is an example of what each method returns

```json
{
    "status": 200,
    "content": {
        "id": 23,
        "type": "ass",
        "url": "https://cdn.night-api.com/api/images/nsfw/ass/4208ec0c4590ed4622e451f386e39.jpg"
    }
}
```


# Random

All kinds of jokes of different types

## NSFW Images

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/nsfw`

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

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

```javascript
{
    "status": 200,
    "content": {
        "id": 23,
        "type": "ass",
        "url": "https://cdn.night-api.com/api/images/nsfw/ass/4208ec0c4590ed4622e451f386e39.jpg"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Invalid key"
}
```

{% endtab %}
{% endtabs %}

**Lists of available NSFW categories:**

* Anal&#x20;
* Ass&#x20;
* Boobs&#x20;
* Gonewild&#x20;
* Hanal&#x20;
* Hass&#x20;
* Hboobs&#x20;
* Hentai&#x20;
* Hkitsune&#x20;
* Hmidriff&#x20;
* Hneko&#x20;
* Hthigh&#x20;
* Neko&#x20;
* Paizuri&#x20;
* Pgif&#x20;
* Pussy&#x20;
* Tentacle&#x20;
* Thigh&#x20;
* Yaoi

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/nsfw', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

\
Or with the module

```javascript
// Return: Promise

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const image = await api.nsfw.fetchImage(); // Random images
```


# Category

Choose which Category of joke you would like to have

## NSFW Images

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/nsfw/:type`

#### Path Parameters

| Name                                   | Type   | Description                   |
| -------------------------------------- | ------ | ----------------------------- |
| type<mark style="color:red;">\*</mark> | String | The type of NSFW image to get |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

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

```javascript
{
    "status": 200,
    "content": {
        "id": 23,
        "type": "ass",
        "url": "https://cdn.night-api.com/api/images/nsfw/ass/4208ec0c4590ed4622e451f386e39.jpg"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Bad type provided"
}
```

{% endtab %}
{% endtabs %}

**Lists of available NSFW categories:**

* Anal&#x20;
* Ass&#x20;
* Boobs&#x20;
* Gonewild&#x20;
* Hanal&#x20;
* Hass&#x20;
* Hboobs&#x20;
* Hentai&#x20;
* Hkitsune&#x20;
* Hmidriff&#x20;
* Hneko&#x20;
* Hthigh&#x20;
* Neko&#x20;
* Paizuri&#x20;
* Pgif&#x20;
* Pussy&#x20;
* Tentacle&#x20;
* Thigh&#x20;
* Yaoi

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/nsfw/ass', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

Or with the module

```javascript
// Return: Promise

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const image = await api.nsfw.fetchImage("anal"); // Random images of category "anal"
```


# ID

Choose a specific joke by its ID

## NSFW Images

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/nsfw/:id`

#### Path Parameters

| Name                                 | Type   | Description                 |
| ------------------------------------ | ------ | --------------------------- |
| id<mark style="color:red;">\*</mark> | Number | The id of NSFW image to get |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

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

```javascript
{
    "status": 200,
    "content": {
        "id": 23,
        "type": "ass",
        "url": "https://cdn.night-api.com/api/images/nsfw/ass/4208ec0c4590ed4622e451f386e39.jpg"
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Bad type provided"
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/nsfw/5', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

Or with the module

```javascript
// Return: Promise

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const image = await api.nsfw.fetchImage(5); // Image with the ID 5
```


# Utils

{% hint style="danger" %}
This API requires an API key to be sent along with your requests: Get yours by <mark style="color:red;">creating an account</mark>
{% endhint %}

{% content-ref url="/pages/y9sVXf49SgMsqqAV3lgp" %}
[QR Code](/images/utils/qr-code)
{% endcontent-ref %}

{% content-ref url="/pages/z9DbGXg6yDDSpMr66vCf" %}
[Captcha](/images/utils/captcha)
{% endcontent-ref %}


# QR Code

{% hint style="warning" %}
In order to make a request to the api you must have an api key that you will find on your [manager](https://night-api.com/manager)&#x20;

For any question we are at your disposal on our [discord ](https://discord.gg/ySbecQPWce)
{% endhint %}

The QRcode category have two part:

* [**QRcode generator**](/images/utils/qr-code/generator): You can generate a QRcode of your choice

{% content-ref url="/pages/AfXpvvAW9e9Vt9BnM34p" %}
[Generator](/images/utils/qr-code/generator)
{% endcontent-ref %}

* [**QRcode reader**](/images/utils/qr-code/reader): You can read the data of a QRcode (For detect dangerous QRcode or other)&#x20;

{% content-ref url="/pages/3bWAhQ0bJGffTvB9j0nK" %}
[Reader](/images/utils/qr-code/reader)
{% endcontent-ref %}


# Generator

## Generate a QR Code

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/qrcode`

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

#### Request Body

| Name                                   | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| backgroundDimming                      | String  | Color of the dimming mask above the background image.                                                                                                                                                                                                                                                                                                                                                          |
| logoImage                              | String  | <p>Logo image to be displayed at the center of the QR code.</p><p></p><p><em>Accepts a <code>data:</code> string in web browsers or a Buffer in Node.js.</em></p><p></p><p><em><strong>When set to</strong><strong> </strong><strong><code>undefined</code></strong><strong> </strong><strong>or</strong><strong> </strong><strong><code>null</code></strong><strong>, the logo is disabled.</strong></em></p> |
| logoCornerRadius                       | Number  | Corner radius of the logo image in pixels.                                                                                                                                                                                                                                                                                                                                                                     |
| backgroundImage                        | String  | <p>Background image to be used in the QR code.</p><p><em>Accepts a <code>data:</code> string in web browsers or a Buffer in Node.js.</em></p>                                                                                                                                                                                                                                                                  |
| autoColor                              | Boolean | Automatically calculate the *colorDark* value from the QR code's background.                                                                                                                                                                                                                                                                                                                                   |
| colorLight                             | String  | Color of the empty areas on the QR code.                                                                                                                                                                                                                                                                                                                                                                       |
| colorDark                              | String  | Color of the blocks on the QR code.                                                                                                                                                                                                                                                                                                                                                                            |
| size                                   | Number  | Size of the QR code in pixel.                                                                                                                                                                                                                                                                                                                                                                                  |
| text<mark style="color:red;">\*</mark> | String  | Text to be encoded in the QR code.                                                                                                                                                                                                                                                                                                                                                                             |

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

```javascript
{
  status: 200,
  content: {
    type: 'Buffer',
    data: [
      137,  80,  78,  71,  13,  10,  26,  10,   0,   0,   0,  13,
       73,  72,  68,  82,   0,   0,   1, 244,   0,   0,   1, 244,
        8,   6,   0,   0,   0, 203, 214, 223, 138,   0,   0,   0,
        6,  98,  75,  71,  68,   0, 255,   0, 255,   0, 255, 160,
      189, 167, 147,   0,   0,  32,   0,  73,  68,  65,  84, 120,
      156, 236, 221, 121, 120,  85, 245, 157,  63, 240, 247,  57,
      231, 174, 185, 185, 217,  73,  66,  54,  18, 194, 190, 133,
       69, 109,   1, 177, 173,  27,  34,  83,  28, 117, 164, 237,
       60,  51, 173, 117,
      ... 17703 more items
    ]
  }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Invalid Key"
}
```

{% endtab %}
{% endtabs %}

**List of available parameters to put in the body or in the module function**

* text <mark style="color:red;">**Required**</mark>
* size
* colorDark
* colorLight
* autoColor
* backgroundImage
* backgroundDimming
* logoImage
* logoCornerRadius

```javascript
const axios = require("axios");
const { writeFileSync } = require("fs");

axios.get('https://api.night-api.com/images/qrcode', {
    headers: {
        authorization: "Your API token"
    },
    data: {
        text: "https://night-api.com/"
    }
})
.then(function (res) {
    writeFileSync(`${__dirname}/qrcode.png`, Buffer.from(res.data.content, 'base64'));
    console.log(res.data);
})
```

Or with the module

```javascript
// Return: Promise

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const qrcode = await api.qrcode.generate({
    text: "https://night-api.com"
})
```


# Reader

{% hint style="info" %}
With the QRcode reader you can verify if the link is not dangerous for you or users
{% endhint %}

## Read a QR Code

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/qrcode/reader`

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

#### Request Body

| Name                                    | Type          | Description                 |
| --------------------------------------- | ------------- | --------------------------- |
| image<mark style="color:red;">\*</mark> | Buffer or URL | The image in Buffer or URL. |

{% tabs %}
{% tab title="200: OK If the QRcode is a link" %}

```javascript
{
    "status": 200,
    "content": {
        "type": "link",
        "target": "https://night-api.com",
        "status": "Safe" // Status of danger on website by google AI
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Invalid Key"
}
```

{% endtab %}

{% tab title="200: OK If the QRcode is other of a link (geo, event, vcard, ...)" %}

```javascript
{
    "status": 200,
    "content": {
        "type": "geo", // Type of the QRcode
        "data": { // The QRcode but with tried data by the API (change beetween different QRcode data)
            "latitude": "48.85837",
            "longitude": "2.29448"
        },
        "target": "geo:48.85837,2.29448" // The data of the QRcode
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");
const { readFileSync } = require("fs");

axios.get('https://api.night-api.com/images/qrcode/reader', {
    headers: {
        authorization: "Your API token"
    },
    data: {
        image: readFileSync(`${__dirname}/qrcode.png`)
    }
})
.then(function (response) {
    console.log(response.data);
})
```

Or with the module

```javascript
const { readFileSync } = require('fs');
const { NightAPI } = require('night-api');
const api = new NightAPI("API_key");
const qrcode = readFileSync('./qrcode.png');


const QRcode_infos = api.qrcode.read(qrcode);

// OR with QRcode URL

const QRcode_infos = api.qrcode.read("https://mydomain.com/qrcode.png");

console.log(QRcode_infos);
```

***PS:** read function take Buffer or URL* parameter


# Captcha

## Generate a QR Code

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/captcha`

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

#### Request Body

| Name     | Type   | Description                                                             |
| -------- | ------ | ----------------------------------------------------------------------- |
| codeSize | Number | <p>Size of the code to generate between 4 and 10 </p><p>Default : 6</p> |

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

```javascript
{ 
    status: 200, 
    content: { 
        code: 'ju0bm1', 
        codeSize: 6, 
        image: { 
            type: 'Buffer', 
            data: [Array] 
        } 
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Invalid Key"
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");
const { writeFileSync } = require('fs');

axios.get('https://api.night-api.com/images/captcha', {
    headers: {
        authorization: "Your API token"
    },
    data: {
        codeSize: 9 // Between 4 and 10 
    }
})
.then(async function (res) {
    console.log(res.data);
    writeFileSync(`${__dirname}/captcha.png`, Buffer.from(res.data.content.image, 'base64'));
})
```

Or with the module

```javascript
// Return: Promise

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const captha = await api.captcha.generate(); // Generate captcha

// You can use this function for choose the number of caracters beetween 4 and 10

const captha = await api.captcha.generate(6);
```


# IP infos

Get informations about an IP adress

## Get infos about IP adress

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/general/ipinfo/:ip`

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| ip<mark style="color:red;">\*</mark> | String | IP adress   |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

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

```javascript
{
    "status": 200,
    "content": {
        "ip": "8.8.8.8",
        "continent": {
            "code": "NA",
            "geoname_id": 6255149,
            "names": {
                "de": "Nordamerika",
                "en": "North America",
                "es": "Norteamérica",
                "fr": "Amérique du Nord",
                "ja": "北アメリカ",
                "pt-BR": "América do Norte",
                "ru": "Северная Америка",
                "zh-CN": "北美洲"
            }
        },
        "country": {
            "geoname_id": 6252001,
            "iso_code": "US",
            "names": {
                "de": "Vereinigte Staaten",
                "en": "United States",
                "es": "Estados Unidos",
                "fr": "États Unis",
                "ja": "アメリカ",
                "pt-BR": "EUA",
                "ru": "США",
                "zh-CN": "美国"
            }
        },
        "location": {
            "accuracy_radius": 1000,
            "latitude": 37.751,
            "longitude": -97.822,
            "time_zone": "America/Chicago"
        },
        "registered_country": {
            "geoname_id": 6252001,
            "iso_code": "US",
            "names": {
                "de": "Vereinigte Staaten",
                "en": "United States",
                "es": "Estados Unidos",
                "fr": "États Unis",
                "ja": "アメリカ",
                "pt-BR": "EUA",
                "ru": "США",
                "zh-CN": "美国"
            }
        },
        "autonomous_system_number": 15169,
        "autonomous_system_organization": "GOOGLE",
        "is_v4": true,
        "is_v6": false,
        "ip_version": 4,
        "privacy": {
            "is_mobile": false,
            "is_bad": false,
            "is_bogon": false,
            "is_datacenter": false,
            "is_proxy": false,
            "is_vpn": true,
            "is_tor": false
        }
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "status": 400,
    "content": "Invalid Key"
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/general/ipinfo/8.8.8.8', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```

Or with the module

```javascript
// Return: Promise

const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');

const ip = await api.ipinfo.getInfos('8.8.8.8'); // Get infos about IP
```


# Games

Basic information to know before using the Games API

{% hint style="warning" %}
In order to make a request to the api you must have an api key that you will find on your [manager](https://night-api.com/manager)&#x20;

For any question we are at your disposal on our [discord ](https://discord.gg/ySbecQPWce):)
{% endhint %}

Currently the game part of the api only supports three game categories which are the following:

* [**Garr's Mod** ](/games/games/garrys-mod)
* [**Minecraft**](/games/games/minecraft)
* [**FiveM**](/games/games/fivem)

The use of the api is explained in more detail in the following pages

Here is an example of what the API will return when you make a request

{% hint style="info" %}
The server that is used as an example is in no way a partner with us.

The server used is a Garry's Mod server named [Monolith Roleplay](https://monolithservers.com)
{% endhint %}

```json
{
    "status": 200,
    "content": {
        "name": "◘ MonolithServers.com | Custom City Roleplay",
        "map": "rp_monoford_v1k",
        "password": false,
        "raw": {
            "protocol": 17,
            "folder": "garrysmod",
            "game": "MONOLITH V2.0.20",
            "appId": 4000,
            "numplayers": 12,
            "numbots": 4,
            "listentype": "d",
            "environment": "l",
            "secure": 1,
            "version": "2021.12.15",
            "steamid": "85568392923366953",
            "tags": [
                " gm:darkrp gmc:rp loc:us ver:220317"
            ]
        },
        "maxplayers": 127,
        "players": [
            {
                "name": "The cool boy",
                "raw": {
                    "score": 0,
                    "time": 15035.7216796875
                }
            },
            {
                "name": "banana flavored vlasic pickles",
                "raw": {
                    "score": 0,
                    "time": 2115.999755859375
                }
            },
            {
                "name": "breiceheidd",
                "raw": {
                    "score": 0,
                    "time": 2097.3330078125
                }
            },
            {
                "name": "Hex",
                "raw": {
                    "score": 0,
                    "time": 1926.66650390625
                }
            },
            {
                "name": "ShadowStalker182",
                "raw": {
                    "score": 0,
                    "time": 1852.8868408203125
                }
            },
            {
                "name": "Frank Watson",
                "raw": {
                    "score": 0,
                    "time": 1848.66650390625
                }
            },
            {
                "name": "battlekingbg",
                "raw": {
                    "score": 0,
                    "time": 1571.2220458984375
                }
            },
            {
                "name": "carl",
                "raw": {
                    "score": 0,
                    "time": 1357.7218017578125
                }
            },
            {
                "name": "Wyzmeister",
                "raw": {
                    "score": 0,
                    "time": 1322.2774658203125
                }
            },
            {
                "name": "RX55927R11DEZ",
                "raw": {
                    "score": 0,
                    "time": 1110.7772216796875
                }
            },
        ],
        "bots": [
            {
                "name": "TheGrimReaper",
                "raw": {
                    "score": 0,
                    "time": 27391.92578125
                }
            },
            {
                "name": "Llama",
                "raw": {
                    "score": 0,
                    "time": 27362.06640625
                }
            },
        ],
        "connect": "208.103.169.58:27015",
        "ping": 116
    }
}
```


# Garry's Mod

Developed by Facepunch Studio

## This link allows you to have the info of a Garry's Mod server

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/game/garrysmod/:IP`

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| IP<mark style="color:red;">\*</mark> | String | Server IP   |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="200: OK The server is online" %}

```javascript
{
    "status": 200,
    "content": {
        "name": "◘ MonolithServers.com | Custom City Roleplay",
        "map": "rp_monoford_v1k",
        "password": false,
        "raw": {
            "protocol": 17,
            "folder": "garrysmod",
            "game": "MONOLITH V2.0.20",
            "appId": 4000,
            "numplayers": 53,
            "numbots": 4,
            "listentype": "d",
            "environment": "l",
            "secure": 1,
            "version": "2021.12.15",
            "steamid": "85568392923366953",
            "tags": [
                " gm:darkrp gmc:rp loc:us ver:220317"
            ]
        },
        "maxplayers": 127,
        "players": [
            {
                "name": "The cool boy",
                "raw": {
                    "score": 0,
                    "time": 15035.7216796875
                }
            },
            {
                "name": "Austin Hunter",
                "raw": {
                    "score": 0,
                    "time": 13854.888671875
                }
            },
            {
                "name": "Austin452",
                "raw": {
                    "score": 0,
                    "time": 13744.111328125
                }
            },
            {
                "name": "Death Merchant",
                "raw": {
                    "score": 0,
                    "time": 12984.4443359375
                }
            },
            {
                "name": "romeoosm",
                "raw": {
                    "score": 0,
                    "time": 10391.2216796875
                }
            },
            {
                "name": "coosty",
                "raw": {
                    "score": 0,
                    "time": 9399.7216796875
                }
            },
            {
                "name": "ScriptKitty",
                "raw": {
                    "score": 0,
                    "time": 9230.7216796875
                }
            },
            {
                "name": "-Broken-",
                "raw": {
                    "score": 0,
                    "time": 8514.6669921875
                }
            },
            {
                "name": "DKDiamond",
                "raw": {
                    "score": 0,
                    "time": 7995.27734375
                }
            },
            ... // The list has been shortened
        ],
        "connect": "208.103.169.58:27015",
        "ping": 116
    }
}
```

{% endtab %}

{% tab title="504: Gateway Timeout The server IP is incorrect or the server is turned off" %}

```javascript
{
    "status": 504,
    "content": "It seems that the server is not responding"
}
```

{% endtab %}
{% endtabs %}


# Minecraft

Developed by Mojang Studios

{% hint style="danger" %}
The IP must be a classic IP such as 127.0.0.1 and not for example mc.night-api.com
{% endhint %}

## This link allows you to have the info of a Minecraft server

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/game/minecraft/:IP`

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| IP<mark style="color:red;">\*</mark> | String | Server IP   |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="200: OK The server is online" %}

```javascript
{
    "status": 200,
    "content": {
        "name": "Hypixel Network [1.8-1.18] EASTER EVENT - MINIGAME, SALE, AND MORE!",
        "map": "",
        "password": false,
        "raw": {
            "vanilla": {
                "name": "",
                "map": "",
                "password": false,
                "raw": {
                    "version": {
                        "name": "Requires MC 1.8 / 1.18",
                        "protocol": 47
                    },
                    "players": {
                        "max": 200000,
                        "online": 61388,
                        "sample": []
                    },
                    "description": "                §aHypixel Network §c[1.8-1.18]\n    §e§lEASTER EVENT §7- §b§lMINIGAME, SALE, AND MORE!"
                },
                "maxplayers": 200000,
                "players": [
                    {
                        "name": "",
                        "raw": {}
                    },
                    {
                        "name": "",
                        "raw": {}
                    },
                    {
                        "name": "",
                        "raw": {}
                    },
                    {
                        "name": "",
                        "raw": {}
                    },
                    {
                        "name": "",
                        "raw": {}
                    },
        ],
        "bots": [],
        "ping": 0,
        "connect": "mc.hypixel.net:25565"
    }
}
```

{% endtab %}

{% tab title="504: Gateway Timeout The server IP is incorrect or the server is turned off" %}

```javascript
{
    "status": 504,
    "content": "It seems that the server is not responding"
}
```

{% endtab %}
{% endtabs %}


# FiveM

Website fivem.net

## This link allows you to have the info of a FiveM server

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/game/fivem/:IP`

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| IP<mark style="color:red;">\*</mark> | String | Server IP   |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

{% tabs %}
{% tab title="200: OK The server is online" %}

```javascript
{
    "status": 200,
    "content": {
        "name": "^0[FR/QC/BE] ^6☔ RevoLife ^0| 🔓 FREE-ACCESS | 💸 ^1CHOISIS TON START - ^6💻 ^1Développement Révolutionnaire ^7& Actif 🌟 | 🔊 ^0 https://discord.gg/RevoLife",
        "map": "",
        "password": false,
        "raw": {
            "sv_maxclients": "512",
            "clients": "18",
            "challenge": "xxx\u0000",
            "gamename": "CitizenFX",
            "protocol": "4",
            "hostname": "^0[FR/QC/BE] ^6☔ RevoLife ^0| 🔓 FREE-ACCESS | 💸 ^1CHOISIS TON START - ^6💻 ^1Développement Révolutionnaire ^7& Actif 🌟 | 🔊 ^0 https://discord.gg/RevoLife",
            "gametype": "",
            "mapname": "",
            "iv": "1202128614",
            "info": {
                "enhancedHostSupport": true,
                "resources": ["hardcap", "mCore", "_cfx_internal", "gksphone", "admin", "mAutoEcole", "yarn", "chat", "rVip", "mFramework", "screenshot-basic", "pma-voice", "mNotif", "webpack", "Mowgli", "mysql-async", "rJail", "speedometer", "streamings", "SeaShield", "JD_logs"],
                "server": "FXServer-master SERVER v1.0.0.5369 win32",
                "vars": {
                    "Cheveux": "✂️ Notre serveur dispose de Cheuveux moddées exclusives",
                    "JD_logs": "V1.3.0",
                    "Véhicules": "🚗 Notre serveur dispose de Véhicules moddées exclusives",
                    "Vêtements": "👔 Notre serveur dispose de Vêtements moddées exclusives",
                    "banner_connecting": "",
                    "banner_detail": "",
                    "crédit": "Base Développé par CyberPro x Omar.",
                    "developpement": "Notre serveur dispose d'un Développement Unique et OPTIMISER. ( 512 Joueurs ) 🌙",
                    "discord": "discord.gg/revolife",
                    "gamename": "gta5",
                    "locale": "fr-FR",
                    "onesync_enabled": "true",
                    "sv_enforceGameBuild": "2372",
                    "sv_enhancedHostSupport": "false",
                    "sv_lan": "false",
                    "sv_licenseKeyToken": "2285227xl1cdjregsudazpq4_4764139:c12a8238b2dd16da5bb1979cc17d8bbe2a11c31fb8ad995d101394791708a611",
                    "sv_maxClients": "512",
                    "sv_projectDesc": "Contenu exceptionnel",
                    "sv_projectName": "[FR] RevoLife",
                    "sv_scriptHookAllowed": "false",
                    "tags": "roleplay, rp, fr, qc, blg, rp strict, esx, custom cars, custom, drugs, reallife, serious, discord, economy, serious rp, seriousrp, fivem, customcars, custom scripts, realistic, life, lspd, cops, jobs, vrp, freeaccess, white, list, vehicules import, vanilla, vehicules, france, 64, slots, 64 slots, esx, roleplay, default, rp, vrp, police, lspd, cars, ems, drugs, jobs, reallife, custom, serious, discord, economy, cops, serious rp, fun, racing, mafia, drifting, seriousrp, 100 slots, 100"
                },
                "version": 1202128614
            },
            "players": [{
                "endpoint": "127.0.0.1",
                "id": 6,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"], // The informations has been censored by the Night Group Dev
                "name": "lucie",
                "ping": 84
            }, {
                "endpoint": "127.0.0.1",
                "id": 11,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"], // The informations has been censored by the Night Group Dev
                "name": "kevinldn",
                "ping": 22
            }, {
                "endpoint": "127.0.0.1",
                "id": 1,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Tom",
                "ping": 41
            }, {
                "endpoint": "127.0.0.1",
                "id": 9,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Lil",
                "ping": 56
            }, {
                "endpoint": "127.0.0.1",
                "id": 7,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Aurelien Fratelie | alvineee",
                "ping": 75
            }, {
                "endpoint": "127.0.0.1",
                "id": 13,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "~r~Omar ~w~El ~r~Feo",
                "ping": 31
            }, {
                "endpoint": "127.0.0.1",
                "id": 25,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Supras_",
                "ping": 40
            }, {
                "endpoint": "127.0.0.1",
                "id": 18,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "144HZ",
                "ping": 42
            }, {
                "endpoint": "127.0.0.1",
                "id": 19,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "GODRICK",
                "ping": 1331
            }, {
                "endpoint": "127.0.0.1",
                "id": 20,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Funny",
                "ping": 124
            }, {
                "endpoint": "127.0.0.1",
                "id": 27,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "G-S | Natoux.exe",
                "ping": 30
            }, {
                "endpoint": "127.0.0.1",
                "id": 21,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Jean Woods",
                "ping": 61
            }, {
                "endpoint": "127.0.0.1",
                "id": 26,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Souverain Paolo !",
                "ping": 36
            }, {
                "endpoint": "127.0.0.1",
                "id": 28,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Bock Hobkins",
                "ping": 34
            }, {
                "endpoint": "127.0.0.1",
                "id": 30,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "HazizzzYZ",
                "ping": 69
            }, {
                "endpoint": "127.0.0.1",
                "id": 29,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Ronpich",
                "ping": 51
            }, {
                "endpoint": "127.0.0.1",
                "id": 32,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "Louis Anderson",
                "ping": 59
            }, {
                "endpoint": "127.0.0.1",
                "id": 33,
                "identifiers": ["license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "discord:xxxxxxxxxxxxxxxxxx", "fivem:xxxxxxx", "license2:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"],
                "name": "667\"Obz",
                "ping": 49
            }]
        },
        "maxplayers": "512",
        "players": [{
            "name": "lucie",
            "raw": {
                "ping": 84
            }
        }, {
            "name": "kevinldn",
            "raw": {
                "ping": 22
            }
        }, {
            "name": "Tom",
            "raw": {
                "ping": 41
            }
        }, {
            "name": "Lil",
            "raw": {
                "ping": 56
            }
        }, {
            "name": "Aurelien Fratelie | alvineee",
            "raw": {
                "ping": 75
            }
        }, {
            "name": "~r~Omar ~w~El ~r~Feo",
            "raw": {
                "ping": 31
            }
        }, {
            "name": "Supras_",
            "raw": {
                "ping": 40
            }
        }, {
            "name": "144HZ",
            "raw": {
                "ping": 42
            }
        }, {
            "name": "GODRICK",
            "raw": {
                "ping": 1331
            }
        }, {
            "name": "Funny",
            "raw": {
                "ping": 124
            }
        }, {
            "name": "G-S | Natoux.exe",
            "raw": {
                "ping": 30
            }
        }, {
            "name": "Jean Woods",
            "raw": {
                "ping": 61
            }
        }, {
            "name": "Souverain Paolo !",
            "raw": {
                "ping": 36
            }
        }, {
            "name": "Bock Hobkins",
            "raw": {
                "ping": 34
            }
        }, {
            "name": "HazizzzYZ",
            "raw": {
                "ping": 69
            }
        }, {
            "name": "Ronpich",
            "raw": {
                "ping": 51
            }
        }, {
            "name": "Louis Anderson",
            "raw": {
                "ping": 59
            }
        }, {
            "name": "667\"Obz",
            "raw": {
                "ping": 49
            }
        }],
        "bots": [],
        "connect": "play.blueislandrp.com:30120",
        "ping": 25
    }
}
```

{% endtab %}

{% tab title="504: Gateway Timeout The server IP is incorrect or the server is turned off" %}

```javascript
{
    "status": 504,
    "content": "It seems that the server is not responding"
}
```

{% endtab %}
{% endtabs %}


