If it's just for fun you are probably out of luck, assuming you find a free extension for that, you still have to find a free (or inexpensive) service that provides the database. You could try to develop your own system using HTTP requests on a free PHP / MySQL provider, but it's definitely not easy, especially if you have no experience in web development.
One thing you could consider though, depending on your specific needs, is a free headless API solution like
directus or
cockpit instead of building your own API. It still requires quite some effort on your part, but the most critical stuff is taken care of.
Maybe there's something out there I'm not aware of though that just fits your requirements, what exactly are you trying to achieve?