Skip to content

Add new "Book Talks" carousel to homepage using archive.org API #11617

@mekarpeles

Description

@mekarpeles

Feature Request

Problem / Opportunity

The Open Library homepage currently features book carousels showcasing various collections. To further engage users and highlight unique content, we should add a new homepage carousel for "Book Talks". This will display a curated list of book talk events/content sourced from Internet Archive's booktalks collection via the archive.org advancedsearch API.

  • This carousel will introduce more dynamic, engaging content to the homepage, encouraging deeper exploration by users.
  • It will present timely, relevant book talk content that aligns with Open Library's goal of increasing access to diverse literary programming.

API endpoint example:
https://archive.org/advancedsearch.php? q=collection%3Abooktalks&fl%5B%5D=identifier,title,date&sort%5B%5D=date+desc&rows=100&page=1&output=json

Sample docs output:

{
"responseHeader": {
"status": 0,
"QTime": 37,
"params": {
"query": "collection:booktalks",
"qin": "collection:booktalks",
"fields": "identifier,title,date",
"wt": "json",
"sort": "date desc",
"rows": 100,
"start": 0
}
},
"response": {
"numFound": 47,
"start": 0,
"docs": [
{
"date": "2025-12-18T00:00:00Z",
"identifier": "the-public-domain",
"title": "The Public Domain"
}, ...

### Technical Specification / Approach
- Add a new carousel to the Open Library homepage for "Book Talks".
- Update `plugins/openlibrary/home. py` to perform an HTTP GET (using httpx or existing infrastructure) to fetch results from the above API endpoint, accepting parameters as needed.
- Reuse existing code for book carousels whenever possible, focusing on code maintainability and avoiding duplication. 
- Cache the result `docs` (list of dicts) for 1 day to reduce API load and speed up page loads.
- Render each book talk in the carousel using the cover image: `https://archive.org/services/img/<identifier>/full/pct: 250/0/default.jpg`
- Update the `templates/home/` homepage template to include and render this new carousel in a style similar to existing book carousels. 


### Breakdown

### Related files
- plugins/openlibrary/home.py
- templates/home/

### Implementation Steps
1. Update backend controller in `plugins/openlibrary/home.py` to add a "Book Talks" carousel.
  - Implement API call to https://archive.org/advancedsearch.php with relevant parameters using httpx or existing code.
  - Cache response docs for 1 day (leverage Open Library caching infra if possible).
2. Render carousel in `templates/home/` in similar style as other book carousels.
  - Each item should use the Book Talk's `identifier`, `title`, and `date`.
  - Use image format: https://archive.org/services/img/<identifier>/full/pct:250/0/default.jpg

### Additional Notes
- Consider accessibility (a11y) in new carousel design/rendering.
- Ensure carousel is robust to missing data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Lead: @mekarpelesIssues overseen by Mek (Staff: Program Lead) [managed]Needs: ResponseIssues which require feedback from leadPriority: 3Issues that we can consider at our leisure. [managed]

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions