Open Library Search

Category:Projects | Posted on:February 25, 2024
open library search results

Application that takes user input and pings the Open Library Search API to return information about books.

Installation

Clone the repository
git clone https://github.com/K8215/open-library-search.git

Navigate to the project directory
cd open-library-search

Install dependencies
npm install

Usage

Run the development server
npm run dev

Known Bugs

I’m conditionally applying a link to each result depending on whether its entry in the JSON has an id_amazon key. Some of them have an entire array of values that all point to different editions of the book in question and I wasn’t quite able to figure out how the ordering worked, so some of the links go to weird editions of the same book that don’t seem to match the cover that’s displaying in the app. Simply getting and applying the data was more important than becoming fluent in this particular API, so I don’t intend to spend any more time on it.

The search pretty vague. I didn’t bother to tune it for specificity at all, so if your title has the word “the” in it, it’s probably going to show a bunch of titles that aren’t the one you searched.

Updates

The logical next step for this project is to add pagination. Popular books return hundreds of results. I think they’re capped off at 100 by default.

Tags: , ,