Library of Congress Collections API
Browse and access digital collections
Browse and access digital collections
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/loc-collections-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: loc.gov JSON/YAML Collections API
description: The loc.gov JSON/YAML API provides structured, machine-readable data about Library of Congress digital collections — books, photographs, maps, manuscripts, archived websites, videos, and more. No authentication is required. Responses are available in JSON or YAML format via the fo= query parameter.
version: '1.0'
contact:
name: Library of Congress
url: https://www.loc.gov/about/contact-us/
license:
name: U.S. Government Work
url: http://www.loc.gov/text-us-government-work
servers:
- url: https://www.loc.gov
description: Production server
tags:
- name: Collections
description: Browse and access digital collections
paths:
/collections/:
get:
tags:
- Collections
summary: List all digital collections
description: Returns a list of all the digital collections at the Library of Congress. Collections are listed under the results attribute.
operationId: listCollections
parameters:
- name: fo
in: query
description: Output format
required: false
schema:
type: string
enum:
- json
- yaml
example: json
- name: at
in: query
description: Limit response to specific attribute(s)
required: false
schema:
type: string
example: results
- name: sp
in: query
description: Starting page number for pagination
required: false
schema:
type: integer
minimum: 1
- name: c
in: query
description: Number of results per page
required: false
schema:
type: integer
minimum: 1
maximum: 150
responses:
'200':
description: List of digital collections
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
/collections/{collectionSlug}/:
get:
tags:
- Collections
summary: Get a specific digital collection
description: Returns the web presentation of a specified digital collection in JSON format. The collection name must be in kebab-case (e.g., abraham-lincoln-papers or baseball-cards).
operationId: getCollection
parameters:
- name: collectionSlug
in: path
description: 'URL slug for the collection (kebab-case, e.g., civil-war-maps, baseball-cards, abraham-lincoln-papers)
'
required: true
schema:
type: string
example: civil-war-maps
- name: fo
in: query
description: Output format
required: false
schema:
type: string
enum:
- json
- yaml
example: json
- name: at
in: query
description: Limit response to specific attribute(s)
required: false
schema:
type: string
- name: q
in: query
description: Search term to filter collection items
required: false
schema:
type: string
- name: fa
in: query
description: Facet filter
required: false
schema:
type: string
- name: sp
in: query
description: Starting page number for pagination
required: false
schema:
type: integer
minimum: 1
- name: c
in: query
description: Number of results per page
required: false
schema:
type: integer
minimum: 1
maximum: 150
responses:
'200':
description: Collection data
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
components:
schemas:
ItemSummary:
type: object
description: Summary information for a single collection item in search results
properties:
date:
type: string
description: Date associated with the item
description:
type: array
items:
type: string
description: Descriptions of the item
id:
type: string
description: URL identifier for the item (use to query the item endpoint)
image_url:
type: array
items:
type: string
description: URLs for item thumbnail images
index:
type: integer
description: Index position in results
item:
type: object
description: Bibliographic metadata for the item
additionalProperties: true
language:
type: array
items:
type: string
description: Languages of the item
location:
type: array
items:
type: string
description: Geographic locations associated with the item
original_format:
type: array
items:
type: string
description: Original format types of the item
partof:
type: array
items:
type: string
description: Collections or groups this item belongs to
subject:
type: array
items:
type: string
description: Subject headings for the item
title:
type: string
description: Title of the item
type:
type: array
items:
type: string
description: Type classifications of the item
url:
type: string
description: URL for the item's HTML page on loc.gov
Pagination:
type: object
description: Pagination information for search results
properties:
count:
type: integer
description: Total number of items in the result set
current:
type: integer
description: Current page number
from:
type: integer
description: Index of the first item on the current page
last:
type: integer
description: Index of the last item on the current page
next:
type:
- string
- 'null'
description: URL for the next page of results
of:
type: integer
description: Total number of pages
perpage:
type: integer
description: Number of items per page
previous:
type:
- string
- 'null'
description: URL for the previous page of results
results:
type: string
description: Human-readable description of current result range
to:
type: integer
description: Index of the last item on the current page
FacetValue:
type: object
description: A facet value used to filter search results
properties:
count:
type: integer
description: Number of results matching this facet
link:
type: string
description: URL to filter results by this facet value
value:
type: string
description: The facet value text
SearchResponse:
type: object
description: Standard search result response from the loc.gov JSON API
properties:
facets:
type: object
description: Available facets for filtering results
additionalProperties:
type: array
items:
$ref: '#/components/schemas/FacetValue'
pagination:
$ref: '#/components/schemas/Pagination'
results:
type: array
description: List of collection items matching the query
items:
$ref: '#/components/schemas/ItemSummary'
externalDocs:
description: API Documentation
url: https://www.loc.gov/apis/json-and-yaml/