Riddlie – API for Developers

Riddlie – API for Developers

My first API product is published in one of the popular API marketplaces, RapidAPI. It is a very simple API that serves random riddles, a riddle of the day, a specific riddle, a riddle by difficulty level, and also a riddle of your own interesting keyword. I was inspired to bring this out to the developers to build interesting social dinner table apps as someone gifted my daughter a book on riddles, and we enjoyed solving them until we ran out of them. I started digging more online, finding books, etc. and started collecting them. Once I had collected many, the idea of building an API to help others was a natural one.

I have built this API using Nodejs express framework in the backend, connecting to the MongoDB Atlas cluster, and hosting it as a serverless function on Vercel. It’s just a basic backend of the MERN stack. This gave me an opportunity to learn how APIs really work in the backend, how to control and grant access (authenticating and authorizing), log issues, handle routing, and, most importantly, deal with databases, schema, and models.

Endpoints

  • Get Random Riddle serves the riddle randomly (one different riddle per call)
  • Get Riddle of the Day serves a fixed riddle per day (does not change in 24 hours)
  • Riddle by ID serves specific riddle by riddle ID if it is known
  • Riddle by Difficulty Level serves riddles by the level of difficulty specified by you
  • Riddle by Keyword serves the riddle by any keyword of interest

Here’s the link to explore further.

Leave a Reply

Your email address will not be published. Required fields are marked *

thirteen − 3 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.