用 curl 获取随机的“是/否”回答

以 JSON 获取随机的是、否或也许回答。

Linuxcurl 请求网络API低风险
运行 curl -s https://yesno.wtf/api,以 JSON 打印随机回答。

01命令

命令
$ curl -s https://yesno.wtf/api

02作用说明

YesNo.wtf 返回包含 answer 字段(yes、no 或 maybe)和对应 GIF 地址的 JSON。是极简示例 API,也适合玩闹式地决定小事;管道给 jq -r .answer 可只取单词。

03风险

风险低风险
使用条件curl (preinstalled on most Linux distributions)
!注意: 回答是随机的、没有意义,不要用于真实决策。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • YesNo.wtf API
    yesno.wtf · vendor-doc · 2026-09-20
    依据: Documents the /api endpoint returning answer, forced and image fields.

最后验证: 2026-09-20 · 分类: 网络

06相关方案