# External APIs ## Open Library API - **Purpose:** Search for books by title, author, or ISBN to populate book metadata - **Documentation:** https://openlibrary.org/dev/docs/api/search - **Base URL(s):** https://openlibrary.org - **Authentication:** None (public API, no API key required) - **Rate Limits:** ~100 requests per 5 minutes (unofficial limit, respect fair use) **Key Endpoints Used:** - `GET /search.json?q={query}` - Search for books by keyword, returns title, author, pages, cover IDs **Cover Images:** - Base URL: `https://covers.openlibrary.org/b/id/{cover_id}-{size}.jpg` - Sizes: S (small), M (medium), L (large) - Example: `https://covers.openlibrary.org/b/id/8233808-M.jpg` **Integration Notes:** - Cache search results for 1 hour to reduce API calls - Implement exponential backoff if rate limited (429 response) - Fallback to manual entry if API unavailable - Extract `number_of_pages_median` or first `number_of_pages` value for total pages - Some books may not have cover images (use placeholder) - Consider Google Books API as backup if Open Library quality is insufficient ---