Random Book Generator

Hi all,

I’ve had a long list of books in Excel for some time so I thought of adapting the quote generator to pull a random book from the list.

The database is currently in Airtable and is pulling via API.

My main issue right now is that as far as I know someone can just grab my api key from the code and grab the entire dataset which would be painful considering I spent years scraping the web to create it. In the meantime, I’ve just cut the dataset to 75 records until I figure it out.

Would love any direction on what to research. So far I’ve found out about config files and api’s that limit usage to a domain but I’m not entirely sure where to go.

Would also love feedback on the site itself. Thanks everyone!

Live version: https://pangaeasbox.github.io/
Slightly older CodePen version: https://codepen.io/myqntm/pen/VGZKQV

1 Like

I had a feeling a random function directly from Airtable would be the way to go but couldn’t figure out how to make it work. Thank you for confirming that it doesn’t look like it exists. I’ll also look into possibly hosting the dataset elsewhere where I can get that functionality.

That’s a great suggestion! Thank you. My api rate was a somehow forgotten concern but totally important.