BYTETOOLS

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.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 19 Aug 2026

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 19 Aug 2026, 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
curl 'https://yesno.wtf/api'
JavaScript (fetch)
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);
Python (requests)
import requests

res = requests.get("https://yesno.wtf/api", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "answer": "yes",
  "forced": false,
  "image": "https://yesno.wtf/assets/yes/9-6403270cf95723ae4664274db51f1fd4.gif"
}

Parameters

ParameterTypeRequiredDescription
forcestringOptionalForce 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

Alternatives to YesNo.wtf API

If YesNo.wtf does not fit, these entertainment apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.

APIWhat it doesAuthCORSLast verified
Official Joke APIFree joke API with no key: random jokes with setup and punchline, filterable by type. Perfect for beginner projects. Tested curl example and live JSON.No keyYes19 Aug 2026
icanhazdadjokeFree dad joke API with no key. Returns jokes as JSON, plain text or image depending on the Accept header. Search supported. Tested curl example included.No keyYes19 Aug 2026
chucknorris.ioFree Chuck Norris jokes API with no key. Random jokes, 16 categories and full-text search. CORS enabled. Tested curl example and live JSON response.No keyYes19 Aug 2026
Advice SlipFree advice API with no key. Returns random advice slips as JSON, with search and id lookup. CORS enabled. Tested curl example and live response.No keyYes19 Aug 2026
ZenQuotesFree quotes API with no key: random, daily and bulk inspirational quotes with author attribution and pre-formatted HTML. Tested curl example and live JSON.No keyNo19 Aug 2026
Affirmations.devFree affirmations API with no key: returns a random positive affirmation as a one-field JSON object. Minimal payload, ideal for wellbeing apps. Tested.No keyNo20 Aug 2026
All Entertainment APIs

YesNo.wtf is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.