Fork me on GitHub


Random Number API



This is a simple api to generate random numbers, random strings and UUID's. This project was built using GO and an be found on github


Request format
All requests are GET requests.
Options should be set using url parameters

CURL
curl "http://www.randomnumberapi.com/api/v1.0/random?min=100&max=1000&count=5"
Response:
[684, 434, 864, 261, 375]
Get a random number
URL
http://www.randomnumberapi.com/api/v1.0/random
http://www.randomnumberapi.com/api/v1.0/randomnumber

Option Discription Default
min the minumum random number 0
max the maximum random number 100
count the number of random numbers to generate (Maximum of 100) 1
Example
http://www.randomnumberapi.com/api/v1.0/random?min=100&max=1000&count=5
Response:
[389, 741, 959, 754, 916]
Get a random number using the reddit comment feed as the seed
URL
http://www.randomnumberapi.com/api/v1.0/randomredditnumber

Notes
This function uses the latest comments submitted to reddit as the seed for each number. So if you request 100 numbers 100 seeds will be generated from comments and a unique seed used for each number. The Idea behind this function is to generate random numbersbased on the "Free Will" of people generating truly random numbers.

Option Discription Default
min the minumum random number 0
max the maximum random number 100
count the number of random numbers to generate (Maximum of 100) 1
Example
http://www.randomnumberapi.com/api/v1.0/randomredditnumber?min=100&max=1000&count=5
Response:
[389, 741, 959, 754, 916]
Get a random string
URL
http://www.randomnumberapi.com/api/v1.0/randomstring

Option Discription Default
min the minumum number of chars in the string (Max 1000) 10
max the maximum number of chars in the string (Max 1000) 20
count the number of random strings to generate (Maximum of 100) 1
all Include numbers and symbols (True/False) False
Example
http://www.randomnumberapi.com/api/v1.0/randomstring?min=5&max=20&count=5
Response:
["sMierZwjgeBTS", "JsGdgIaBQvKpZKA", "qBhFRSfVEzLmeyV", "sehXFM", "DbGuP"]
Get a random UUID
URL
http://www.randomnumberapi.com/api/v1.0/uuid
http://www.randomnumberapi.com/api/v1.0/randomuuid

Option Discription Default
count the number of random numbers to generate (Maximum of 100) 1
Example
www.randomnumberapi.com/api/v1.0/uuid?count=2
Response:
["333d69ac79cf455abaf1c7eeb76327bb", "7087d9a779e84df19b06c37202bc285d"]


Copyright 2023; James Kozlowski