---
title: Generate Random Number API
slug: random-number
url: https://apyhub.com/dosvak/service/random-number
provider: Dosvak LLC
categories: [Developer Tools]
tags: [random-number, random-integer, number-generation, cryptographic-random, utility]
auth: api_key
---

# Generate Random Number API

Generate a cryptographically secure integer between min and max. The response returns the chosen value and the range used.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| GET | `` | What it does Generates a cryptographically secure random integer within the requested range and ret… | 10 |

## About

## What it does
Random Number Generator returns a cryptographically secure integer between the `min` and `max` query values you send. It is a simple utility for cases where you need a trustworthy random value without building your own generation logic.

Send optional `min` and `max` integers to define the range. If you omit them, the defaults are `0` and `100`. The response includes the selected `value` along with the `min` and `max` used for that request, so you can log or verify the range alongside the result.

Use it anywhere you need a server-side random integer: selecting a winner, sampling test data, assigning a bucket, or generating a temporary numeric token. Because the value is produced securely, it is a better fit than Math.random-style client logic when the result matters.

Random Number Generator keeps the contract small and predictable: one request in, one integer out, with the range reflected back in the response.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/dosvak/service/random-number
