YesNo.wtf API
Free yes/no API with no key: returns a random yes, no or maybe with a matching animated GIF. The simplest possible API for teaching fetch. Tested example.
Endpoint tested and returned HTTP 200 on 2026-08-19
What is the YesNo.wtf API?
YesNo.wtf is a free, key-free API that returns a random yes, no or maybe answer along with a matching animated GIF URL. It can also be forced to a specific answer.
This is arguably the smallest useful API in existence: three fields, one purpose. That makes it genuinely excellent for teaching, because the entire response fits in a single line and there is nothing to distract from the mechanics of fetching and rendering.
The `?force=yes` parameter is a nice touch for demos — you can guarantee a specific answer while still exercising the full request cycle, which is handy when recording tutorials or writing tests.
Quick facts
- Base URL
https://yesno.wtf- Authentication
- No API key required.
- Rate limit
- No published limit.
- Pricing
- Free.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the YesNo.wtf API
Every request below was executed against the live API on 2026-08-19, and the response shown is the real body it returned — not an illustration.
1. Get a random yes or no answer
GET https://yesno.wtf/api
curl 'https://yesno.wtf/api'const res = await fetch("https://yesno.wtf/api");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://yesno.wtf/api", timeout=20)
res.raise_for_status()
print(res.json()){
"answer": "yes",
"forced": false,
"image": "https://yesno.wtf/assets/yes/9-6403270cf95723ae4664274db51f1fd4.gif"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
force | string | Optional | Force a specific answer: yes, no or maybe. yes |
Response fields
answerstring- `yes`, `no` or `maybe`.
forcedboolean- Whether the answer was forced via the parameter.
imagestring- URL of an animated GIF matching the answer.
What you can build with the YesNo.wtf API
- Teach fetch and JSON parsing with the smallest possible payload
- Build a decision-maker toy app or chat bot command
- Test image loading and animation handling
- Demonstrate query parameters with the force option
Common errors and how to fix them
Always getting the same answer
The `force` parameter is set.
Fix: Remove it for genuinely random answers.
GIF fails to load
Occasional missing asset on the origin.
Fix: Handle the img onError event and retry.
YesNo.wtf API — frequently asked questions
What does the YesNo API do?
It returns a random yes, no or maybe, along with a matching animated GIF. That is the whole API.
Is it free?
Yes, completely free with no API key, rate limit or signup.
Can I force a specific answer?
Yes, pass ?force=yes, ?force=no or ?force=maybe — useful for demos and tests where you need a predictable result.
Why use such a trivial API?
For teaching. The response is three fields, so a beginner tutorial can focus entirely on the fetch-then-render cycle without wrestling with a complex payload.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Random Number Generator
Generate random numbers in any range with cryptographically secure randomness. Multiple numbers, no-repeat mode, sorting, plus dice and coin presets.
YesNo.wtf is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-19; always check the official documentation before relying on this API in production, as terms and limits can change.