Wikimedia Commons
Wikimedia Commons is the shared media library that sits behind Wikipedia and its sister projects, holding more than 100 million freely licensed files: photographs, historical scans, maps, diagrams, audio recordings, and video. Every file has a description page carrying a caption, categories, and details of its source and author, and a growing share now has Structured Data on Commons, a layer that records what a file depicts, who created it, and its licence as machine-readable statements you can query rather than scrape from prose.
There are several practical routes in. You can pull individual files and their metadata through the MediaWiki API, run structured queries against the Wikimedia Commons Query Service (a SPARQL endpoint, the same query language Wikidata uses), or process the periodic bulk dumps for large jobs. The category tree and structured statements let you assemble a focused subset, say every public-domain botanical illustration or every map of a given country, without downloading the entire archive first.
For RAG, Commons earns its place in multimodal projects: grounding a visual question-answering system, powering an image search index, or supplying captioned pictures alongside the encyclopaedic text you would already be drawing from Wikipedia and Wikidata. In practice the captions and structured metadata are your retrievable text, and the media is what you serve back to the user. It slots naturally beside those two sister projects, filling the picture-and-audio gap they leave behind.
Licensing is the part to handle carefully. Files sit under a mix of terms: some are CC0 or genuine public domain, but many use CC BY-SA, a share-alike licence that requires attribution and obliges any derivative you distribute to carry the same terms. On the same file, the media and its metadata can even sit under different licences, so read the per-file terms before reuse, especially in a commercial product, rather than assuming the whole collection is uniformly free to take.
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.
HathiTrust Digital Library
A partnership of academic and research institutions offering millions of digitised titles. Its Research Center provides computational access to the full corpus, including in-copyright works, under non-consumptive research terms.