HathiTrust Digital Library
HathiTrust is a shared digital library built by a partnership of academic and research institutions, holding millions of digitised books and other titles. Public domain works can be read in full, while access to in-copyright material is more restricted.
The HathiTrust Research Center opens up the whole collection for computational work through non-consumptive research: you can run analysis and text mining across the corpus, including in-copyright works, without being able to read or extract the original text directly. This lets researchers study patterns across millions of books while respecting copyright.
For RAG, this is a research resource rather than a source of freely reusable text. Public domain titles can be used more openly, but anything in copyright is available only under the Research Center's non-consumptive terms, which rule out commercial reuse. Check what applies to the specific titles you need.
Related sources
Common European Data Space for Cultural Heritage
The umbrella project coordinating cultural heritage data across Europe. Led by the Europeana Initiative, it helps cultural institutions and EU Member States share their collections through a common, shared infrastructure.
Digital Public Library of America (DPLA)
An aggregator that brings together content from America's museums, libraries, and archives. Its API offers metadata on individual items and on collections, and the whole repository is available to download as zipped JSON files.
Europeana
A platform for discovering cultural heritage collections across Europe, with multilingual access to over 60 million digitised items from around 4,000 institutions, including books, paintings, maps, manuscripts, and audiovisual and 3D media.
Smithsonian Open Access
Millions of digital items from the Smithsonian's museums, research centres, and archives, released under CC0. Includes images, 3D models, and research datasets you can reuse freely, including commercially.