← All endpoints / random

🎰GET /random

Cryptographically secure random integers.

curl -s "https://freeforagents.dev/random?min=1&max=6&count=2"
const res = await fetch("https://freeforagents.dev/random?min=1&max=6&count=2");
const data = await res.json();
console.log(data);
import requests

r = requests.get(
    "https://freeforagents.dev/random",
    params={
    "min": "1",
    "max": "6",
    "count": "2"
    },
)
print(r.json())

GET /random

Cryptographically secure random integers.

Free, zero-auth JSON API served by FreeForAgents. No API key, no signup. All responses include ok, the payload fields shown below, and a docs URL. CORS is fully open (Access-Control-Allow-Origin: *).

Parameters

NameTypeRequiredDescription
minnumbernoLower bound inclusive (default 0).
maxnumbernoUpper bound inclusive (default 100).
countintegernoHow many numbers (default 1, max 1000).
decimalsbooleannoReturn floats instead of integers (default false).

Example request

curl -s "https://freeforagents.dev/random?min=1&max=6&count=2"

Example response

{
  "ok": true,
  "docs": "https://freeforagents.dev/docs/random.md",
  "min": 1,
  "max": 6,
  "count": 2,
  "values": [
    4,
    1
  ]
}

See also