Riddles API
A free riddles API with no key: one GET returns a riddle and its answer as JSON. Tiny, CORS-enabled and open source. Tested example and honest limits included.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Riddles API?
Riddles API is a free, key-free endpoint that returns a random riddle and its answer as a two-field JSON object. It has a single route, `/random`, sends permissive CORS headers, and is open source.
There is exactly one thing this API does, and knowing that up front saves you time: `GET /random` returns `{ riddle, answer }`. There is no listing endpoint, no id lookup, no category filter and no count parameter — `/all` returns a 404. If you need the whole corpus, the project is open source and the underlying data file is in the repository, which is the sane way to build anything that needs to avoid repeats.
Within that limit it is well behaved. It sends a permissive `Access-Control-Allow-Origin`, so you can call it straight from front-end JavaScript with no proxy, and it runs on Vercel's platform rather than a dormant free dyno, which is why it is still answering when most of its 2020-era contemporaries are not. The riddle style leans towards wordplay and hidden-word puzzles rather than classic lateral-thinking riddles, so check a handful of responses before assuming it fits your audience — several answers restate the question text, which you may want to trim before display.
Quick facts
- Base URL
https://riddles-api.vercel.app- Authentication
- No key and no account.
- Rate limit
- No published limit. It is one small serverless function — do not poll it in a loop.
- Pricing
- Free and open source.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Riddles API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Fetch a random riddle and its answer
GET https://riddles-api.vercel.app/random
curl 'https://riddles-api.vercel.app/random'const res = await fetch("https://riddles-api.vercel.app/random");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://riddles-api.vercel.app/random", timeout=20)
res.raise_for_status()
print(res.json()){
"riddle": "Determine what letter should replace the ? at the end: M M L J A R C C G E P C ?",
"answer": "T"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
(none) | - | Optional | `/random` is the only route and takes no parameters. There is no listing or lookup endpoint. - |
Response fields
riddlestring- The riddle text.
answerstring- The solution. Note that some answers repeat part of the riddle text as explanation — trim before display if that matters.
What you can build with the Riddles API
- Add a riddle of the day to a site or newsletter
- Build a quiz or icebreaker bot for a chat platform
- Fill a kids' activity page with fresh puzzles
- Use as a minimal fetch-and-render exercise when teaching front-end JavaScript
Common errors and how to fix them
404 on any path other than /random
There is only one route.
Fix: Do not build against `/all` or `/riddles/{id}`; neither exists. Clone the repository if you need the full dataset.
Repeated riddles
Each call is independent and does not exclude what you have already seen.
Fix: Keep a set of riddles already shown in your own session state, or work from the repository's data file so you control the ordering.
Cold-start latency on the first call
It is a serverless function that scales to zero.
Fix: Expect the first request after an idle period to be slower. Prefetch on page load rather than on the user's click.
Riddles API — frequently asked questions
Is there a free riddles API with no key?
Yes. Riddles API returns a random riddle and its answer with no key or account, and it sends permissive CORS headers so browser JavaScript can call it directly.
Can I fetch all the riddles at once?
Not through the API — `/random` is the only route. The project is open source, so the practical approach for anything needing the full set is to take the data file from the repository.
How do I avoid showing the same riddle twice?
The API has no exclusion parameter, so track what you have already shown in your own state. If repeats are unacceptable, work from a local copy of the dataset and shuffle it yourself.
Is it reliable enough for production?
It is a single hobby function on Vercel with no uptime guarantee. It is fine for a fun feature that can fail quietly; it is not something to put on a critical path.
Tools that pair with this API
Quiz Maker
Build multiple-choice and true/false quizzes, take them in a scored practice mode with per-question feedback, and export the quiz, answer key or blank paper.
Flashcard Maker
Make your own flashcard deck, study it with a shuffle-and-flip review mode that tracks what you know, and export or import the deck as JSON or CSV.
Random List Picker
Paste a list and pick random winners without repeats, or shuffle the whole list. A fair random name and item picker for giveaways, draws and raffles.
Riddles API is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.