Temperature Weighted Random
The Temperature Weighted Random API fetches the current temperature from 10 cities across 7 continents, sums them, and returns the last two digits as your random number. It is meteorologically defensible and statistically meaningless. The methodology has not been peer reviewed because no one would agree to review it.
Try It — No Seriously
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
unit |
string |
Optional | "celsius" |
Temperature unit: celsius or fahrenheit. Changes the number. Does not improve it. |
Examples
curl "https://api.stupidapis.com/temperature-random/generate?unit=celsius"
import requests
response = requests.get(
"https://api.stupidapis.com/temperature-random/generate",
params={"unit": "celsius"}
)
print(response.json())
const response = await fetch( "https://api.stupidapis.com/temperature-random/generate?unit=celsius" ); const data = await response.json(); console.log(data);
Response Schema
| Field | Type | Description |
|---|---|---|
number |
number |
Your random number (0-99) |
cities |
array |
The 10 cities and their temperatures |
sum |
number |
Sum of all temperatures |
method |
string |
Methodology description |
peer_reviewed |
boolean |
Always false |
Example Response
{
"number": 47,
"cities": [
"Tokyo: 22°C",
"Cairo: 35°C",
"London: 14°C",
"Sydney: 18°C",
"São Paulo: 24°C",
"Nairobi: 21°C",
"Reykjavik: 3°C",
"Mumbai: 31°C",
"McMurdo: -28°C",
"New York: 7°C"
],
"sum": 147,
"method": "Sum of 10 city temperatures, modulo 100",
"peer_reviewed": false
}