Yes or No Oracle

Free · No key · JSON

Yes or No API

One GET request returns a random yes, no, or maybe as JSON — with seven themed oracle voices. Free, no sign-up, no API key. Drop it in a bot, a tutorial, or a weekend project.

Try it

GET /api/oracle?tool=magic-8-ball

Endpoint

A single read-only endpoint. No authentication, CORS open to all origins.

GET https://yesnooracle.app/api/oracle

Machine-readable spec: /openapi.json (OpenAPI 3.0) — import it into Postman, Insomnia or an AI agent.

Parameters

ParamValuesDescription
toolsee list belowThemed answer pool. Omit for the general oracle.
forceyes · no · maybeForce a verdict (handy for tests/demos).
formatjson · texttext returns one plain line instead of JSON — for chat bots (see below).

Available tools

Response

Every response is JSON. answer is normalized to yes/no/maybe; the extra word and phrase give you a themed headline and a reflective sentence — richer than a bare yes/no.

{
  "answer": "yes",
  "verdict": "yes",
  "word": "The Emperor",
  "phrase": "The Emperor brings order and solid ground. Build on it with confidence — yes.",
  "tool": "tarot",
  "forced": false,
  "image": "https://yesnooracle.app/art-tarot.webp"
}

Examples

New to APIs? Follow the step-by-step tutorial: build a Magic 8 Ball with this API in JavaScript, Python and a Twitch chat command.

cURL

curl https://yesnooracle.app/api/oracle
curl "https://yesnooracle.app/api/oracle?tool=magic-8-ball"

JavaScript

const res = await fetch("https://yesnooracle.app/api/oracle?tool=tarot");
const { answer, word, phrase } = await res.json();
console.log(answer, "—", word); // e.g. "yes — The Emperor"

Python

import requests
r = requests.get("https://yesnooracle.app/api/oracle", params={"tool": "crystal-ball"})
print(r.json()["answer"])  # yes | no | maybe

Plain text

curl "https://yesnooracle.app/api/oracle?tool=magic-8-ball&format=text"
# It is certain. No doubt about it — the ball is sure.

Add a Magic 8 Ball to your Twitch chat

Chat bots print whatever a URL returns, so format=text turns the API into a one-line chat command. Type one of these in your chat as a moderator, then anyone can type !8ball.

Nightbot

!commands add !8ball $(urlfetch https://yesnooracle.app/api/oracle?tool=magic-8-ball&format=text)

StreamElements

!command add !8ball $(customapi https://yesnooracle.app/api/oracle?tool=magic-8-ball&format=text)

Swap tool=magic-8-ball for any voice above — tarot draws a card, pendulum swings. Any bot that can fetch a URL works the same way. Every answer fits well inside the 400-character limit these bots apply.

Fair use

Free for any project — personal or commercial. There is a soft per-IP rate limit (about 60 requests a minute, or 600 with format=text, since chat bots share servers) to keep the oracle responsive for everyone. If you build something with it, a link back to yesnooracle.app is always appreciated but never required.

For reflection and entertainment only. The oracle does not provide medical, legal, or financial advice.

Back to the oracle