Free, no key required. For draws and lotteries, verification codes and random passwords, test data, UUID assignment and more.
API reference
Base path /v1/random. All endpoints are GET and return {code, message, data}. Add lang=en for English error messages.
GET /v1/random/int Random integers
| Parameter | Default | Notes |
| min | 1 | Minimum (inclusive) |
| max | 100 | Maximum (inclusive) |
| count | 1 | How many, 1–1000 |
Request: /v1/random/int?min=1&max=100&count=3
Response: {"code":0,"message":"ok","data":{"min":1,"max":100,"count":3,"numbers":[8,66,78]}}
GET /v1/random/string Random strings
| Parameter | Default | Notes |
| length | 16 | Length, 1–1024 |
| type | alnum | Preset sets: digits / lower / upper / alnum / symbols (alnum + symbols) |
| charset | — | Custom character set — takes precedence over type. Unicode-safe (CJK works), duplicates removed, max 256 unique characters, no whitespace or control characters. |
Request: /v1/random/string?length=16&type=alnum
Response: {"code":0,"message":"ok","data":{"length":16,"type":"alnum","string":"RYNbBOJV5xSmGy4Z"}}
Request: /v1/random/string?length=8&charset=abc123
Response: {"code":0,"message":"ok","data":{"length":8,"type":"custom","charset_size":6,"string":"3b2ac1ba"}}
GET /v1/random/uuid UUID v4
| Parameter | Default | Notes |
| count | 1 | How many, 1–100 |
Request: /v1/random/uuid
Response: {"code":0,"message":"ok","data":{"count":1,"uuids":["afee4e2c-16f8-4b71-a8d0-31187758fb2d"]}}
GET /v1/random/float Random floats
| Parameter | Default | Notes |
| min | 0 | Minimum (inclusive) |
| max | 1 | Maximum (exclusive) |
| precision | 6 | Decimal places, 0–15 |
Request: /v1/random/float?min=0&max=1&precision=6
Response: {"code":0,"message":"ok","data":{"min":0,"max":1,"value":0.045965}}
GET /v1/random/shuffle Sampling without replacement
Shuffles the range and draws from it — no repeats. Made for lotteries and draws.
| Parameter | Default | Notes |
| min | 1 | Minimum (inclusive) |
| max | 49 | Maximum (inclusive) |
| count | 5 | How many; must not exceed the range size |
Request: /v1/random/shuffle?min=1&max=49&count=5
Response: {"code":0,"message":"ok","data":{"min":1,"max":49,"count":5,"numbers":[23,31,20,29,19]}}