Library of Congress

App · Research & Academia · 9 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 catalog record with citations, search the pages of a digitized book or newspaper, and narrow a large search with facets. No API key required.

Actions

ActionWhat it does
Get a resourceFetch 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, a page of them at a time.
Get an itemFetch one item's full catalog record, the digitized files attached to it, and ready-made APA, Chicago and MLA citations.
Get search facetsList the filter values a search can be narrowed by - the top ten or so of each field, with a count for each.
List digital collectionsList the Library's digital collections - curated groups of items such as Civil War Maps or Baseball Cards - or only the ones a search matches.
List every value of a filterList every value one filter field takes for a search - every location in a collection, every contributor to a format - most common first, with a count for each, 66 to a page.
Search a collectionSearch inside one digital collection, or browse it with no query.
Search by formatSearch one kind of material - photos, maps, newspapers, manuscripts, books, audio, film, notated music, legislation or web archives.
Search inside a resourceFind the pages of one digitized book, newspaper issue or manuscript whose text mentions a word or phrase.
Search the LibrarySearch 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, a page of them at a time. Takes a resource id such as ggbain.37398, which may contain slashes for a dated newspaper edition.

Inputs

Resource IDresource_idtextRequired
The resource's loc.gov id. A full resource URL is accepted and reduced to the id.
Maximum segmentspage_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.
Page of segmentspagenumber
Which page of segments to return, starting at 1. Defaults to 1; 'total_pages' says how many there are.At least 1.

Outputs

citationsobject
itemobject
pagenumber
resourceobject
resourceslist
segment_countnumber
segmentslist
total_pagesnumber
Example output
{
  "citations": {
    "apa": "Bain News Service, P. () Calvin Coolidge with kitten. ,. 8/2/24 date created or published later by Bain. [Photograph] Retrieved from the Library of Congress, https://www.loc.gov/item/2014717546/.",
    "chicago": "Bain News Service, Publisher. Calvin Coolidge with kitten. ,. 8/2/24 date created or published later by Bain. Photograph. https://www.loc.gov/item/2014717546/.",
    "mla": "Bain News Service, Publisher. Calvin Coolidge with kitten. 8/2/24 date created or published later by Bain. 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,
        "iiif_manifest_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. For more information, see George Grantham Bain Collection - Rights and Restrictions Information https://www.loc.gov/rr/print/res/274_bain.html",
    "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/"
  },
  "page": 1,
  "resource": {
    "caption": "digital file from original neg.",
    "file_count": 5,
    "fulltext_url": null,
    "iiif_manifest_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,
      "iiif_manifest_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": [],
  "total_pages": 0
}

Get an item

Fetch one item's full catalog record, the digitized 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 IDitem_idtextRequired
The item's loc.gov id. A full item or lccn.loc.gov URL is accepted and reduced to the id.

Outputs

citationsobject
itemobject
resourceslist
Example output
{
  "citations": {
    "apa": "Bain News Service, P. () Calvin Coolidge with kitten. ,. 8/2/24 date created or published later by Bain. [Photograph] Retrieved from the Library of Congress, https://www.loc.gov/item/2014717546/.",
    "chicago": "Bain News Service, Publisher. Calvin Coolidge with kitten. ,. 8/2/24 date created or published later by Bain. Photograph. https://www.loc.gov/item/2014717546/.",
    "mla": "Bain News Service, Publisher. Calvin Coolidge with kitten. 8/2/24 date created or published later by Bain. 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,
        "iiif_manifest_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. For more information, see George Grantham Bain Collection - Rights and Restrictions Information https://www.loc.gov/rr/print/res/274_bain.html",
    "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,
      "iiif_manifest_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 - the top ten or so of each field, 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. For every value of one field, use List every value of a filter.

Inputs

Search queryquerytext
The search to get facets for. Required unless a collection or format is given.
Collectioncollectiontext
Get facets for one collection instead of all of loc.gov. Cannot be combined with a format.
Formatformattext
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).
Filtersfilterslist
Facet filters, each written as 'field:value' - for example 'subject:maps' or 'location:ohio'. Put ! before the colon to leave a value out ('location!:ohio'), and write a date range as 'dates:1900/1999'. Run Get search facets first to see which values a field actually takes; the 'filter' it gives each value goes straight in here.

Outputs

facetslist
total_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 - or only the ones a search matches. Each row carries the address the collection is reached by, so this is the step that feeds Search a collection.

Inputs

Search queryquerytext
Only the collections whose name or description matches these words. Leave empty to list them all, in title order.
Results per pagepage_sizenumber
How many results to return, 1-100. Defaults to 25.From 1 to 100.
Pagepagenumber
Which page of results to return, starting at 1. Defaults to 1.At least 1.

Outputs

pagenumber
page_sizenumber
result_countnumber
resultslist
total_pagesnumber
total_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
}

List every value of a filter

List every value one filter field takes for a search - every location in a collection, every contributor to a format - most common first, with a count for each, 66 to a page. Get search facets only shows the top ten or so. Each value's 'filter' string goes straight into any search action's Filters field, so a workflow can run one narrowed search per value.

Inputs

Filter fieldfieldtextRequired
Which field to list the values of.One of: subject, location, contributor, partof (Part of (collection or division)), language, original-format (Original format), online-format (Online format).
Search queryquerytext
The search to list values for. A query, a filter, a collection or a format is required.
Collectioncollectiontext
List values within one collection instead of all of loc.gov. Cannot be combined with a format.
Formatformattext
List values within 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).
Filtersfilterslist
Facet filters, each written as 'field:value' - for example 'subject:maps' or 'location:ohio'. Put ! before the colon to leave a value out ('location!:ohio'), and write a date range as 'dates:1900/1999'. Run Get search facets first to see which values a field actually takes; the 'filter' it gives each value goes straight in here.
Pagepagenumber
Which page of values to return, starting at 1. Each page holds 66; 'has_more' says whether there is another.At least 1.

Outputs

fieldtext
field_labeltext
has_moretrue/false
pagenumber
value_countnumber
valueslist
Example output
{
  "field": "location",
  "field_label": "Location",
  "has_more": true,
  "page": 1,
  "value_count": 2,
  "values": [
    {
      "count": 2308,
      "filter": "location:united states",
      "title": "United States",
      "value": "united states"
    },
    {
      "count": 1084,
      "filter": "location:virginia",
      "title": "Virginia",
      "value": "virginia"
    }
  ]
}

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

CollectioncollectiontextRequired
The collection's URL slug. Run List digital collections to find it.
Search queryquerytext
What to search for inside the collection. Leave empty to browse all of it.
Results per pagepage_sizenumber
How many results to return, 1-100. Defaults to 25.From 1 to 100.
Pagepagenumber
Which page of results to return, starting at 1. Defaults to 1.At least 1.
Sort bysort_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).
Filtersfilterslist
Facet filters, each written as 'field:value' - for example 'subject:maps' or 'location:ohio'. Put ! before the colon to leave a value out ('location!:ohio'), and write a date range as 'dates:1900/1999'. Run Get search facets first to see which values a field actually takes; the 'filter' it gives each value goes straight in here.
From yearstart_datetext
Start of a date range, usually a year. Must be given together with the end year.
To yearend_datetext
End of a date range, usually a year. Must be given together with the start year.

Outputs

collectiontext
pagenumber
page_sizenumber
result_countnumber
resultslist
total_pagesnumber
total_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,
          "iiif_manifest_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

FormatformattextRequired
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 queryquerytext
What to search for within that format. Leave empty to browse everything in it.
Results per pagepage_sizenumber
How many results to return, 1-100. Defaults to 25.From 1 to 100.
Pagepagenumber
Which page of results to return, starting at 1. Defaults to 1.At least 1.
Sort bysort_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).
Filtersfilterslist
Facet filters, each written as 'field:value' - for example 'subject:maps' or 'location:ohio'. Put ! before the colon to leave a value out ('location!:ohio'), and write a date range as 'dates:1900/1999'. Run Get search facets first to see which values a field actually takes; the 'filter' it gives each value goes straight in here.
From yearstart_datetext
Start of a date range, usually a year. Must be given together with the end year.
To yearend_datetext
End of a date range, usually a year. Must be given together with the start year.

Outputs

formattext
format_labeltext
pagenumber
page_sizenumber
result_countnumber
resultslist
total_pagesnumber
total_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,
          "iiif_manifest_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 inside a resource

Find the pages of one digitized book, newspaper issue or manuscript whose text mentions a word or phrase. Each match is one page, with its page number, a passage of its text and a link that opens the page with the words highlighted. Get an item lists the resources an item has.

Inputs

Resource IDresource_idtextRequired
The resource to search inside: its loc.gov id, or the resource URL Get an item returns for it.
Search queryquerytextRequired
The words to look for in the resource's pages.
Results per pagepage_sizenumber
How many results to return, 1-100. Defaults to 25.From 1 to 100.
Pagepagenumber
Which page of results to return, starting at 1. Defaults to 1.At least 1.

Outputs

pagenumber
page_sizenumber
resource_idtext
result_countnumber
resultslist
total_pagesnumber
total_resultsnumber
Example output
{
  "page": 1,
  "page_size": 25,
  "resource_id": "gdcmassbookdig.scientificbaseba00mcgr",
  "result_count": 1,
  "results": [
    {
      "access_restricted": false,
      "call_number": "105",
      "contributors": [
        "mcgraw, john joseph"
      ],
      "date": "1910",
      "dates": [
        "1910"
      ],
      "description": "SCIENCE OF BASEBALL 95 Sec 6 Holding of the ball by the pitcher so long as in the opinion of the umpire",
      "digitized": true,
      "id": "https://www.loc.gov/resource/gdcmassbookdig.scientificbaseba00mcgr/?sp=105",
      "image_url": "https://tile.loc.gov/image-services/iiif/public:gdcmassbookdig:scientificbaseba00mcgr:scientificbaseba00mcgr_0105/full/pct:100.0/0/default.jpg",
      "image_urls": [
        "https://tile.loc.gov/image-services/iiif/public:gdcmassbookdig:scientificbaseba00mcgr:scientificbaseba00mcgr_0105/full/pct:12.5/0/default.jpg",
        "https://tile.loc.gov/image-services/iiif/public:gdcmassbookdig:scientificbaseba00mcgr:scientificbaseba00mcgr_0105/full/pct:100.0/0/default.jpg"
      ],
      "languages": [
        "english"
      ],
      "locations": [],
      "online_formats": [
        "online text",
        "image"
      ],
      "original_formats": [
        "book"
      ],
      "page_number": 105,
      "part_of": [
        "general collections",
        "early baseball publications"
      ],
      "resources": [],
      "subjects": [
        "baseball"
      ],
      "thumbnail_url": "https://tile.loc.gov/image-services/iiif/public:gdcmassbookdig:scientificbaseba00mcgr:scientificbaseba00mcgr_0105/full/pct:12.5/0/default.jpg",
      "title": "Image 105 of Scientific baseball,",
      "url": "https://www.loc.gov/resource/gdcmassbookdig.scientificbaseba00mcgr/?sp=105&q=pitcher"
    }
  ],
  "total_pages": 2,
  "total_results": 39
}

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 queryquerytextRequired
What to search for. Plain words search titles, descriptions, subjects and any available full text.
Results per pagepage_sizenumber
How many results to return, 1-100. Defaults to 25.From 1 to 100.
Pagepagenumber
Which page of results to return, starting at 1. Defaults to 1.At least 1.
Sort bysort_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).
Filtersfilterslist
Facet filters, each written as 'field:value' - for example 'subject:maps' or 'location:ohio'. Put ! before the colon to leave a value out ('location!:ohio'), and write a date range as 'dates:1900/1999'. Run Get search facets first to see which values a field actually takes; the 'filter' it gives each value goes straight in here.
From yearstart_datetext
Start of a date range, usually a year. Must be given together with the end year.
To yearend_datetext
End of a date range, usually a year. Must be given together with the start year.

Outputs

pagenumber
page_sizenumber
result_countnumber
resultslist
total_pagesnumber
total_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,
          "iiif_manifest_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
}

On this page