Library of Congress
App · Research & Academia · 7 actions
Search the Library of Congress: photographs, maps, newspapers, manuscripts, books, recordings and film from the world's largest library. Browse its digital collections, fetch an item's full catalogue record with citations, and narrow a large search with facets. No API key required.
Actions
| Action | What it does |
|---|---|
| Get a resource | Fetch one resource of a multi-part item - a single newspaper issue, one atlas, one reel - together with its segments: the pages of that issue or the maps in that atlas. |
| Get an item | Fetch one item's full catalogue record, the digitised files attached to it, and ready-made APA, Chicago and MLA citations. |
| Get search facets | List the filter values a search can be narrowed by, with a count for each. |
| List digital collections | List the Library's digital collections - curated groups of items such as Civil War Maps or Baseball Cards. |
| Search a collection | Search inside one digital collection, or browse it with no query. |
| Search by format | Search one kind of material - photos, maps, newspapers, manuscripts, books, audio, film, notated music, legislation or web archives. |
| Search the Library | Search everything the Library of Congress publishes on loc.gov: photographs, maps, newspapers, manuscripts, books, recordings, films and web archives, alongside its own web pages and legislation. |
Get a resource
Fetch one resource of a multi-part item - a single newspaper issue, one atlas, one reel - together with its segments: the pages of that issue or the maps in that atlas. Takes a resource id such as ggbain.37398, which may contain slashes for a dated newspaper edition.
Inputs
- Resource ID
resource_idtextRequired - The resource's loc.gov id. A full resource URL is accepted and reduced to the id.
- Maximum segments
page_sizenumber - How many segments to return, 1-100. A long newspaper run has hundreds; the true total is reported either way. Defaults to 25.From 1 to 100.
Outputs
citationsobjectitemobjectresourceobjectresourceslistsegment_countnumbersegmentslist
Example output
{
"citations": {
"apa": "Bain News Service, P. Calvin Coolidge with kitten. 8/2/24. [Photograph] Retrieved from the Library of Congress, https://www.loc.gov/item/2014717546/.",
"chicago": "Bain News Service, Publisher. Calvin Coolidge with kitten. Photograph. https://www.loc.gov/item/2014717546/.",
"mla": "Bain News Service, Publisher. Calvin Coolidge with kitten. Photograph. Retrieved from the Library of Congress, <www.loc.gov/item/2014717546/>."
},
"item": {
"access_restricted": false,
"call_number": "LC-B2- 6234-5 [P&P]",
"contributors": [
"Bain News Service"
],
"control_number": "2014717546",
"created_published": [
"8/2/24 (date created or published later by Bain)"
],
"date": "1924-01-01",
"dates": [
"1924"
],
"description": "1 negative : glass ; 5 x 7 in. or smaller.",
"digitized": true,
"formats": [
"photo, print, drawing"
],
"genres": [
"Glass negatives"
],
"id": "https://www.loc.gov/item/2014717546/",
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg",
"image_urls": [
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398r.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg"
],
"languages": [
"english"
],
"lccn": "2014717546",
"locations": [],
"medium": [
"1 negative : glass ; 5 x 7 in. or smaller."
],
"mime_types": [
"image/gif",
"image/jpg",
"image/tif"
],
"notes": [
"Title from data provided by the Bain News Service on the negative.",
"Forms part of: George Grantham Bain Collection (Library of Congress)."
],
"online_formats": [
"image"
],
"original_formats": [
"photo, print, drawing"
],
"other_titles": [],
"part_of": [
"bain collection",
"prints and photographs division"
],
"repository": "Library of Congress Prints and Photographs Division Washington, D.C. 20540 USA",
"reproduction_number": "LC-DIG-ggbain-37398 (digital file from original negative)",
"resources": [
{
"caption": "digital file from original neg.",
"file_count": 5,
"fulltext_url": null,
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"pdf_url": null,
"segment_count": null,
"url": "https://www.loc.gov/resource/ggbain.37398/"
}
],
"rights_advisory": "No known restrictions on publication.",
"subjects": [
"glass negatives"
],
"summary": "Photograph shows president Calvin Coolidge at his family farm in Plymouth Notch, Vermont.",
"thumbnail_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"title": "Calvin Coolidge [with kitten]",
"url": "https://www.loc.gov/item/2014717546/"
},
"resource": {
"caption": "digital file from original neg.",
"file_count": 5,
"fulltext_url": null,
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"pdf_url": null,
"segment_count": null,
"url": "https://www.loc.gov/resource/ggbain.37398/"
},
"resources": [
{
"caption": "digital file from original neg.",
"file_count": 5,
"fulltext_url": null,
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"pdf_url": null,
"segment_count": null,
"url": "https://www.loc.gov/resource/ggbain.37398/"
}
],
"segment_count": 0,
"segments": []
}Get an item
Fetch one item's full catalogue record, the digitised files attached to it, and ready-made APA, Chicago and MLA citations. Takes an item id such as 2014717546, a loc.gov item URL, or an lccn.loc.gov permalink.
Inputs
- Item ID
item_idtextRequired - The item's loc.gov id. A full item or lccn.loc.gov URL is accepted and reduced to the id.
Outputs
citationsobjectitemobjectresourceslist
Example output
{
"citations": {
"apa": "Bain News Service, P. Calvin Coolidge with kitten. 8/2/24. [Photograph] Retrieved from the Library of Congress, https://www.loc.gov/item/2014717546/.",
"chicago": "Bain News Service, Publisher. Calvin Coolidge with kitten. Photograph. https://www.loc.gov/item/2014717546/.",
"mla": "Bain News Service, Publisher. Calvin Coolidge with kitten. Photograph. Retrieved from the Library of Congress, <www.loc.gov/item/2014717546/>."
},
"item": {
"access_restricted": false,
"call_number": "LC-B2- 6234-5 [P&P]",
"contributors": [
"Bain News Service"
],
"control_number": "2014717546",
"created_published": [
"8/2/24 (date created or published later by Bain)"
],
"date": "1924-01-01",
"dates": [
"1924"
],
"description": "1 negative : glass ; 5 x 7 in. or smaller.",
"digitized": true,
"formats": [
"photo, print, drawing"
],
"genres": [
"Glass negatives"
],
"id": "https://www.loc.gov/item/2014717546/",
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg",
"image_urls": [
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398r.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg"
],
"languages": [
"english"
],
"lccn": "2014717546",
"locations": [],
"medium": [
"1 negative : glass ; 5 x 7 in. or smaller."
],
"mime_types": [
"image/gif",
"image/jpg",
"image/tif"
],
"notes": [
"Title from data provided by the Bain News Service on the negative.",
"Forms part of: George Grantham Bain Collection (Library of Congress)."
],
"online_formats": [
"image"
],
"original_formats": [
"photo, print, drawing"
],
"other_titles": [],
"part_of": [
"bain collection",
"prints and photographs division"
],
"repository": "Library of Congress Prints and Photographs Division Washington, D.C. 20540 USA",
"reproduction_number": "LC-DIG-ggbain-37398 (digital file from original negative)",
"resources": [
{
"caption": "digital file from original neg.",
"file_count": 5,
"fulltext_url": null,
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"pdf_url": null,
"segment_count": null,
"url": "https://www.loc.gov/resource/ggbain.37398/"
}
],
"rights_advisory": "No known restrictions on publication.",
"subjects": [
"glass negatives"
],
"summary": "Photograph shows president Calvin Coolidge at his family farm in Plymouth Notch, Vermont.",
"thumbnail_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"title": "Calvin Coolidge [with kitten]",
"url": "https://www.loc.gov/item/2014717546/"
},
"resources": [
{
"caption": "digital file from original neg.",
"file_count": 5,
"fulltext_url": null,
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"pdf_url": null,
"segment_count": null,
"url": "https://www.loc.gov/resource/ggbain.37398/"
}
]
}Get search facets
List the filter values a search can be narrowed by, with a count for each. The Library's own advice for a large result set is to facet rather than page through it, and the 'filter' string on every value goes straight into any search action's Filters field.
Inputs
- Search query
querytext - The search to get facets for. Required unless a collection or format is given.
- Collection
collectiontext - Get facets for one collection instead of all of loc.gov. Cannot be combined with a format.
- Format
formattext - Get facets for one format instead of all of loc.gov. Cannot be combined with a collection.One of:
audio(Audio Recordings),books(Books & Printed Material),film-and-videos(Films & Videos),legislation,manuscripts(Manuscripts & Mixed Material),maps,newspapers,notated-music(Notated Music),photos(Photos, Prints & Drawings),web-archives(Web Archives). - Filters
filterslist - Facet filters, each written as 'field:value' - for example 'subject:maps' or 'location:ohio'. Run Get search facets first to see which values a field actually takes.
Outputs
facetslisttotal_resultsnumber
Example output
{
"facets": [
{
"field": "original-format",
"filters": [
{
"count": 7705,
"filter": "original-format:photo, print, drawing",
"title": "Photo, Print, Drawing",
"value": "photo, print, drawing"
},
{
"count": 29,
"filter": "original-format:map",
"title": "Map",
"value": "map"
}
],
"title": "Original Format"
}
],
"total_results": 1224036
}List digital collections
List the Library's digital collections - curated groups of items such as Civil War Maps or Baseball Cards. Each row carries the slug the collection is addressed by, so this is the step that feeds Search a collection.
Inputs
- Results per page
page_sizenumber - How many results to return, 1-100. Defaults to 25.From 1 to 100.
- Page
pagenumber - Which page of results to return, starting at 1. Defaults to 1.At least 1.
Outputs
pagenumberpage_sizenumberresult_countnumberresultslisttotal_pagesnumbertotal_resultsnumber
Example output
{
"page": 1,
"page_size": 25,
"result_count": 1,
"results": [
{
"access_restricted": false,
"call_number": null,
"contributors": [],
"date": null,
"dates": [],
"description": "Maps from the Library of Congress Geography and Map Division documenting the American Civil War.",
"digitized": true,
"id": "https://www.loc.gov/collections/civil-war-maps/about-this-collection/",
"image_url": "https://www.loc.gov/static/collections/civil-war-maps/500_500.jpg",
"image_urls": [
"https://www.loc.gov/static/collections/civil-war-maps/500_500.jpg"
],
"item_count": 2338,
"languages": [
"english"
],
"locations": [
"united states"
],
"online_formats": [
"image"
],
"original_formats": [
"collection"
],
"part_of": [
"digital collections",
"geography and map division"
],
"resources": [],
"subjects": [
"civil war",
"maps"
],
"thumbnail_url": "https://www.loc.gov/static/collections/civil-war-maps/500_500.jpg",
"title": "Civil War Maps",
"url": "https://www.loc.gov/collections/civil-war-maps/about-this-collection/"
}
],
"total_pages": 24,
"total_results": 594
}Search a collection
Search inside one digital collection, or browse it with no query. Takes the collection's slug, such as civil-war-maps - a full collection URL is accepted too.
Inputs
- Collection
collectiontextRequired - The collection's URL slug. Run List digital collections to find it.
- Search query
querytext - What to search for inside the collection. Leave empty to browse all of it.
- Results per page
page_sizenumber - How many results to return, 1-100. Defaults to 25.From 1 to 100.
- Page
pagenumber - Which page of results to return, starting at 1. Defaults to 1.At least 1.
- Sort by
sort_bytext - How to order the results. Defaults to the Library's relevance order.One of:
date(Date, earliest first),date_desc(Date, latest first),title_s(Title, A-Z),title_s_desc(Title, Z-A),shelf_id(Call number, ascending),shelf_id_desc(Call number, descending). - Filters
filterslist - Facet filters, each written as 'field:value' - for example 'subject:maps' or 'location:ohio'. Run Get search facets first to see which values a field actually takes.
- From year
start_datetext - Start of a date range, usually a year. Must be given together with the end year.
- To year
end_datetext - End of a date range, usually a year. Must be given together with the start year.
Outputs
collectiontextpagenumberpage_sizenumberresult_countnumberresultslisttotal_pagesnumbertotal_resultsnumber
Example output
{
"collection": "civil-war-maps",
"page": 1,
"page_size": 25,
"result_count": 1,
"results": [
{
"access_restricted": false,
"call_number": "LC-B2- 6234-5 [P&P]",
"contributors": [
"Bain News Service"
],
"date": "1924-01-01",
"dates": [
"1924"
],
"description": "1 negative : glass ; 5 x 7 in. or smaller.",
"digitized": true,
"id": "https://www.loc.gov/item/2014717546/",
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg",
"image_urls": [
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398r.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg"
],
"languages": [
"english"
],
"locations": [],
"online_formats": [
"image"
],
"original_formats": [
"photo, print, drawing"
],
"part_of": [
"bain collection",
"prints and photographs division"
],
"resources": [
{
"caption": "digital file from original neg.",
"file_count": 5,
"fulltext_url": null,
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"pdf_url": null,
"segment_count": null,
"url": "https://www.loc.gov/resource/ggbain.37398/"
}
],
"subjects": [
"glass negatives"
],
"thumbnail_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"title": "Calvin Coolidge [with kitten]",
"url": "https://www.loc.gov/item/2014717546/"
}
],
"total_pages": 49,
"total_results": 2338
}Search by format
Search one kind of material - photos, maps, newspapers, manuscripts, books, audio, film, notated music, legislation or web archives. Leave the query empty to browse the whole format, which is what the sort and date range are for.
Inputs
- Format
formattextRequired - The kind of original material to search.One of:
audio(Audio Recordings),books(Books & Printed Material),film-and-videos(Films & Videos),legislation,manuscripts(Manuscripts & Mixed Material),maps,newspapers,notated-music(Notated Music),photos(Photos, Prints & Drawings),web-archives(Web Archives). - Search query
querytext - What to search for within that format. Leave empty to browse everything in it.
- Results per page
page_sizenumber - How many results to return, 1-100. Defaults to 25.From 1 to 100.
- Page
pagenumber - Which page of results to return, starting at 1. Defaults to 1.At least 1.
- Sort by
sort_bytext - How to order the results. Defaults to the Library's relevance order.One of:
date(Date, earliest first),date_desc(Date, latest first),title_s(Title, A-Z),title_s_desc(Title, Z-A),shelf_id(Call number, ascending),shelf_id_desc(Call number, descending). - Filters
filterslist - Facet filters, each written as 'field:value' - for example 'subject:maps' or 'location:ohio'. Run Get search facets first to see which values a field actually takes.
- From year
start_datetext - Start of a date range, usually a year. Must be given together with the end year.
- To year
end_datetext - End of a date range, usually a year. Must be given together with the start year.
Outputs
formattextformat_labeltextpagenumberpage_sizenumberresult_countnumberresultslisttotal_pagesnumbertotal_resultsnumber
Example output
{
"format": "photos",
"format_label": "Photos, Prints & Drawings",
"page": 1,
"page_size": 25,
"result_count": 1,
"results": [
{
"access_restricted": false,
"call_number": "LC-B2- 6234-5 [P&P]",
"contributors": [
"Bain News Service"
],
"date": "1924-01-01",
"dates": [
"1924"
],
"description": "1 negative : glass ; 5 x 7 in. or smaller.",
"digitized": true,
"id": "https://www.loc.gov/item/2014717546/",
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg",
"image_urls": [
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398r.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg"
],
"languages": [
"english"
],
"locations": [],
"online_formats": [
"image"
],
"original_formats": [
"photo, print, drawing"
],
"part_of": [
"bain collection",
"prints and photographs division"
],
"resources": [
{
"caption": "digital file from original neg.",
"file_count": 5,
"fulltext_url": null,
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"pdf_url": null,
"segment_count": null,
"url": "https://www.loc.gov/resource/ggbain.37398/"
}
],
"subjects": [
"glass negatives"
],
"thumbnail_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"title": "Calvin Coolidge [with kitten]",
"url": "https://www.loc.gov/item/2014717546/"
}
],
"total_pages": 49,
"total_results": 1224
}Search the Library
Search everything the Library of Congress publishes on loc.gov: photographs, maps, newspapers, manuscripts, books, recordings, films and web archives, alongside its own web pages and legislation. Returns one flat row per item with its title, date, contributors, subjects, rights and image URLs.
Inputs
- Search query
querytextRequired - What to search for. Plain words search titles, descriptions, subjects and any available full text.
- Results per page
page_sizenumber - How many results to return, 1-100. Defaults to 25.From 1 to 100.
- Page
pagenumber - Which page of results to return, starting at 1. Defaults to 1.At least 1.
- Sort by
sort_bytext - How to order the results. Defaults to the Library's relevance order.One of:
date(Date, earliest first),date_desc(Date, latest first),title_s(Title, A-Z),title_s_desc(Title, Z-A),shelf_id(Call number, ascending),shelf_id_desc(Call number, descending). - Filters
filterslist - Facet filters, each written as 'field:value' - for example 'subject:maps' or 'location:ohio'. Run Get search facets first to see which values a field actually takes.
- From year
start_datetext - Start of a date range, usually a year. Must be given together with the end year.
- To year
end_datetext - End of a date range, usually a year. Must be given together with the start year.
Outputs
pagenumberpage_sizenumberresult_countnumberresultslisttotal_pagesnumbertotal_resultsnumber
Example output
{
"page": 1,
"page_size": 25,
"result_count": 1,
"results": [
{
"access_restricted": false,
"call_number": "LC-B2- 6234-5 [P&P]",
"contributors": [
"Bain News Service"
],
"date": "1924-01-01",
"dates": [
"1924"
],
"description": "1 negative : glass ; 5 x 7 in. or smaller.",
"digitized": true,
"id": "https://www.loc.gov/item/2014717546/",
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg",
"image_urls": [
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398r.jpg",
"https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398v.jpg"
],
"languages": [
"english"
],
"locations": [],
"online_formats": [
"image"
],
"original_formats": [
"photo, print, drawing"
],
"part_of": [
"bain collection",
"prints and photographs division"
],
"resources": [
{
"caption": "digital file from original neg.",
"file_count": 5,
"fulltext_url": null,
"image_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"pdf_url": null,
"segment_count": null,
"url": "https://www.loc.gov/resource/ggbain.37398/"
}
],
"subjects": [
"glass negatives"
],
"thumbnail_url": "https://tile.loc.gov/storage-services/service/pnp/ggbain/37300/37398_150px.jpg",
"title": "Calvin Coolidge [with kitten]",
"url": "https://www.loc.gov/item/2014717546/"
}
],
"total_pages": 49,
"total_results": 1224
}