TestingAPIs is still being built. If something breaks, email support@testingapis.com.

Generate random integers

GEThttps://api.testingapis.com/api/utils/random/numberSign in to see this endpoint's URL

Parameters 4

NameTypeDescription
minquery · integer (int32)Inclusive lower bound. Default 0. Default: 0.
maxquery · integer (int32)Inclusive upper bound, at least min. Default 100. Default: 100.
countquery · integer (int32)How many to generate, 1–100, default 1. One returns number; more return a numbers array. Default: 1.
seedquery · integer (int32)Optional seed for repeatable output.

Responses

200
Success.
400
min is greater than max, or count is out of range.

Example

Request
curl -X GET "https://api.testingapis.com/api/utils/random/number?min=1&max=100" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
Response200 OK
{"number": 84, "min": 1, "max": 100, "seed": null}

Sign in to see the details

The parameters, request and response examples and the live Try it panel for this endpoint are for signed-in members. Accounts are free and take a few seconds to create.