Random Number

This endpoint generates a random number within a specified range and can optionally return a decimal value.

Endpoint

  • URL: https://api.erensko.xyz/v1/random-number

  • Method: GET

  • Description: Generates a random number with information about it.

URL Parameters

Key
Value

min (optional)

The minimum value for the random number generation. Default is 0. Cannot be greater than the maxif set.

max (optional)

The maximum value for the random number generation. Default is 100.

decimal (optional)

If set to true, the generated number will be a decimal. If set to false (or omitted), the result will be an integer. Default is false.

Headers

Key
Value

Authorization

Your own personal API key, create one by clicking here. This is required.

Request Example

GET https://api.erensko.xyz/v1/random-number

Response Example

{
    "result": 48,
    "isDecimal": false,
    "min": 0,
    "max": 100,
    "generatedAt": "2025-02-02T22:57:01.986Z",
    "isEven": true,
    "isOdd": false,
    "isPrime": false,
    "digitCount": 2,
    "isNegative": false,
    "isWholeNumber": true,
    "absoluteValue": 48,
    "squaredValue": 2304,
    "squareRoot": "6.9282",
    "cubedValue": 110592,
    "rangePercentage": "48.00",
    "fibonacciStatus": false,
    "rangeDeviation": "2.00",
    "modulo": 8,
    "baseConversion": {
        "binary": "110000",
        "octal": "60",
        "hexadecimal": "30"
    },
    "numberType": "integer",
    "piApproximation": "150.7964",
    "eApproximation": "130.4775",
    "cubeRoot": "3.6342",
    "powerOfTwo": "2304.0000",
    "isDivisibleBy5": false,
    "isDivisibleBy10": false,
    "modulo5": 3,
    "modulo7": 6,
    "geometricMean": "69.2820",
    "isHighVariation": false,
    "isLowVariation": false
}

Last updated