Library of Congress Data Services
Library of Congress Data Services is the machine access layer over the United States national library, maintained by the Library of Congress. It gathers several distinct services under one roof. The loc.gov JSON and YAML API returns structured records for digitised items and collections, backed by microservices for full text OCR, IIIF image delivery and audio and video streaming. Alongside it sits id.loc.gov, the Linked Data Service, which publishes the Library's controlled vocabularies and authority files, including Library of Congress Subject Headings and the Name Authority File, with each entity carrying a resolvable URI.
You access it in two ways. The loc.gov JSON API needs no key and suits targeted queries, though it is rate limited to roughly twenty requests per minute and may return 429 responses or CAPTCHA pages under load, so build in backoff. For scale, id.loc.gov offers bulk downloads of each vocabulary as compressed RDF/XML and N-Triples, with MADS/RDF and SKOS/RDF serialisations, which you can index offline in one pass.
For RAG and AI the two halves do different jobs. The authority URIs give you a stable backbone for entity linking, disambiguation and reconciliation, letting you normalise people, places and subjects across a corpus. The loc.gov API and its OCR text let you pull descriptive metadata and, where available, the digitised content itself for grounding answers about American historical and cultural material.
On rights, the id.loc.gov metadata and vocabularies are public domain, so you may reuse them freely, including commercially, with no attribution. The digitised items the loc.gov API points to are a separate question, as many are public domain but some are restricted, and rights must be checked per item, which is why we flag that the content licence differs. Note too that a new catalogue launched in 2025 and the API data is not yet fully synced, so expect some gaps. For comparable aggregated cultural heritage, see DPLA for the United States, Europeana for Europe and the Smithsonian Open Access programme.
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.