跳到正文
RandNext
Esc

随机年份生成器

在任意两个年份之间随机选一个年份——用于历史问答、故事背景,或“那一年发生了什么?”的游戏。

  • 在浏览器中生成
  • 公平的密码学随机
  • 一键全部复制

你的年份

在你的浏览器中生成。按空格键再生成一次。

随机年份 API

以 JSON 获取随机年份结果。接口只读,少量使用无需 API 密钥,并支持跨域请求。

GET/api/v1/tools/random-year
curl https://randnext.com/api/v1/tools/random-year?min=1990&max=2030&count=3&unique=true

参数

参数类型作用(英文)默认值 / 允许的值
minintegerEarliest year that may be returned, inclusive.默认:19001 到 9999
maxintegerLatest year that may be returned, inclusive.默认:20261 到 9999
uniquebooleanWhen true, the response will not contain the same year twice.默认:truetrue 或 false
sortbooleanWhen true, return the selected years in ascending order.默认:falsetrue 或 false
countintegerNumber of results to return.默认:11 到 50
查看参数、响应和限制 →

你可能还喜欢

使用方法

  1. 1设定起始和结束年份。
  2. 2选择数量以及是否允许重复。
  3. 3点“生成”并复制年份。

常见问题

包括起止年份吗?

包括,起始和结束年份都可能被选中。

真的是随机的吗?

是的。数值来自浏览器的密码学安全随机源,每个可能的值机会都相同。