Step into the world of enigmatic and entertaining riddles with the Riddles API. As the title suggests, this API opens the door to a treasure trove of riddles spanning various categories, providing a delightful challenge for users of all ages and interests. Whether you’re building a quiz app, a game, or simply want to add an element of fun to your website, the Riddles API has got you covered.
Categories Endpoint:
The API’s “Categories” endpoint is your starting point, offering a comprehensive list of available riddle categories. With this simple request, you can quickly get an overview of the exciting riddles that await. Just make a GET request like this:
/api/v1/categories
Sample Response:
[
{
"Category": "TrickyRiddles"
},
{
"Category": "RiddlesForTeens"
},
{
"Category": "RiddlesForAdults"
}
]
Riddles by Category Endpoint:
For riddle enthusiasts who prefer a specific theme or topic, the “Riddles by Category” endpoint provides a curated list of riddles based on a chosen category. Select a category, make a GET request, and enjoy riddles that match your interests. Here’s how you can do it:
/api/v1/riddles/{category}
Sample Response:
[
{
"Id": 24,
"Category": "TrickyRiddles",
"Question": "Spell electricity with three letters.",
"Answer": "NRG (energy)."
},
{
"Id": 8,
"Category": "TrickyRiddles",
"Question": "Travel a mile and I will change, travel a million and I will end as I started, What am I?",
"Answer": "An odometer."
}
]
Random ‘n’ Riddles Endpoint:
Sometimes, randomness adds a touch of excitement to the riddle experience. The “Random ‘n’ Riddles” endpoint generates a random selection of riddles based on a provided count, up to a maximum of 100 riddles. This feature ensures you’ll never run out of intriguing challenges. Make a GET request with the desired count:
/api/v1/riddle/{count}
Sample Response:
[
{
"Id": 804,
"Category": "EasyRiddles",
"Question": "What has a head and a tail but no body or limbs?",
"Answer": "A coin."
},
{
"Id": 1097,
"Category": "BestRiddles",
"Question": "You've heard me before, yet you hear me again,\nThen I die 'til you call me again.",
"Answer": "Echo."
}
]
Riddles of the Day Endpoint:
For those who crave a daily dose of brain-teasing fun, the “Riddles of the Day” endpoint delivers a new riddle with each API call. Keep your audience engaged and entertained with a fresh riddle every time. Simply execute this endpoint, and a surprise riddle awaits:
/api/v1/riddleoftheday
Sample Response:
{
"Id": 811,
"Category": "EasyRiddles",
"Question": "I am a vehicle. I spell the same when you read me forwards as well as backwards. What Am I?",
"Answer": "Racecar."
}
The Riddles API is designed to be exceptionally user-friendly, offering a vast collection of riddles at a very reasonable price. Whether you’re looking to challenge your users, educate them, or simply provide a bit of entertainment, this API is your ultimate resource for engaging content. Elevate your project with riddles that intrigue, captivate, and amuse.