# loc.gov API: Search Library of Congress collections

> Searches Library of Congress digital collections by keywords, material format and date range, in Library search relevance order. Rights notes may be unavailable for some records.

Unofficial. Not affiliated with or endorsed by loc.gov.

- Page: https://fous.com/methods/loc.gov/search-collections
- Method: `loc.gov/search_collections`, version 1
- Website: loc.gov
- Returns: title, date, format, creators or contributors, summary, rights and usage, thumbnail, item link
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 2, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `page` | integer | no | `1` | Page of search results, for example 2. Default 1. |
| `query` | string | yes | `"Civil War photographs"` | Keywords to search, for example Civil War photographs. |
| `format` | string | no | `"photos"` | Material format, for example maps; any searches all formats. One of "any", "photos", "maps", "manuscripts", "newspapers", "audio", "films", "books". Default "any". |
| `end_year` | integer | no | `1865` | Latest year, for example 1865. |
| `start_year` | integer | no | `1861` | Earliest year, for example 1861. |
| `max_results` | integer | no | `3` | Results per page, for example 20. Default 20. |

## Output

From a run on Oct 31, 2026, shortened. Its input:

```json
{
  "page": 1,
  "query": "Civil War photographs",
  "format": "photos",
  "end_year": 1865,
  "start_year": 1861,
  "max_results": 3
}
```

Its output:

```json
{
  "results": [
    {
      "date": "1860",
      "title": "Civil War",
      "format": "Collection; Photo, Print, Drawing",
      "summary": "Explore the faces, places and events of the U.S. Civil War through photographs, prints and drawings. The Prints & Photographs Division holds thousands of images relating to the Civil War, found in many different collections. This category allows research across those collections.",
      "item_link": "https://www.loc.gov/collections/civil-war/about-this-collection/",
      "rights_and_usage": null,
      "thumbnail_image_link": "https://www.loc.gov/static/collections/civil-war/500_500.jpg",
      "creators_or_contributors": "gibson, james f.; brady, mathew b.; o'sullivan, timothy h.; barnard, george n.; smith, william morris; gardner, alexander"
    },
    {
      "date": "1850",
      "title": "Liljenquist Family Collection of Civil War Photographs",
      "format": "Collection; Photo, Print, Drawing",
      "summary": "New Photos Added! View the most recent additions",
      "item_link": "https://www.loc.gov/collections/liljenquist-civil-war-photographs/about-this-collection/",
      "rights_and_usage": null,
      "thumbnail_image_link": "https://www.loc.gov/static/collections/liljenquist-civil-war-photographs/500_500.jpg",
      "creators_or_contributors": "liljenquist, thomas richard; liljenquist, christian blaine; liljenquist, brandon paul; liljenquist, jason george"
    },
    {
      "date": "1824",
      "title": "The Alfred Whital Stern Collection of Lincolniana",
      "format": "Collection; Book; Photo, Print, Drawing; Notated Music",
      "summary": "The collection contains more than 11,100 items. This online release presents more than 1,300 items with more than 4,000 images and a date range of 1824-1931. It includes the complete collection of Stern's contemporary newspapers, Lincoln's law papers, sheet music, broadsides, prints, cartoons, maps,…",
      "item_link": "https://www.loc.gov/collections/alfred-whital-stern-lincolniana/about-this-collection/",
      "rights_and_usage": null,
      "thumbnail_image_link": "https://www.loc.gov/static/collections/alfred-whital-stern-lincolniana/500_500.jpg",
      "creators_or_contributors": "alfred whital stern collection of lincolniana (library of congress); stern, alfred whital; library of congress"
    }
  ]
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"loc.gov/search_collections","input":{"page":1,"query":"Civil War photographs","format":"photos","end_year":1865,"start_year":1861,"max_results":3}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- Find Library of Congress photographs of Dust Bowl farm families taken between 1934 and 1940
- Search loc.gov for maps of San Francisco from 1850 to 1906, and give me 50 results per page
- I need digitized manuscripts related to Frederick Douglass — show me titles, dates, creators, and whether they're free to reuse
- Any old audio recordings of Appalachian fiddle music from the 1920s or 1930s? Include thumbnails and links to the items.
- Show me page 3 of newspaper results about the 1918 influenza pandemic, covering 1918 to 1919

## Input schema

```json
{
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "page": {
      "type": "integer",
      "default": 1,
      "minimum": 1,
      "description": "Page of search results, for example 2."
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "Keywords to search, for example Civil War photographs."
    },
    "format": {
      "enum": [
        "any",
        "photos",
        "maps",
        "manuscripts",
        "newspapers",
        "audio",
        "films",
        "books"
      ],
      "type": "string",
      "default": "any",
      "description": "Material format, for example maps; any searches all formats."
    },
    "end_year": {
      "type": "integer",
      "maximum": 9999,
      "minimum": 1,
      "description": "Latest year, for example 1865."
    },
    "start_year": {
      "type": "integer",
      "maximum": 9999,
      "minimum": 1,
      "description": "Earliest year, for example 1861."
    },
    "max_results": {
      "type": "integer",
      "default": 20,
      "maximum": 100,
      "minimum": 1,
      "description": "Results per page, for example 20."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "date",
          "format",
          "creators_or_contributors",
          "summary",
          "rights_and_usage",
          "thumbnail_image_link",
          "item_link"
        ],
        "properties": {
          "date": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "format": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "item_link": {
            "type": "string"
          },
          "rights_and_usage": {
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnail_image_link": {
            "type": [
              "string",
              "null"
            ]
          },
          "creators_or_contributors": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "additionalProperties": false
      },
      "description": "Matching collections and digital items, in Library search order."
    }
  },
  "additionalProperties": false
}
```

## See more

- [loc.gov API: Search historic newspapers](https://fous.com/methods/loc.gov/search-historic-newspapers.md): Searches historic U.S. newspaper pages (Chronicling America) by text, with optional state and issue-year filters. Returns relevance-ranked page records with snippets and image links; newspaper OCR may contain transcription errors.
- [Open Library API: Search books](https://fous.com/methods/openlibrary.org/search-books.md): Finds Open Library books by search words, optionally narrowed by author and subject, sorted by relevance or publication age. Returns work-level results; free_online means at least one edition is marked public or borrowable, not that a loan is available now.
- [National Archives API: Search records](https://fous.com/methods/catalog.archives.gov/search-records.md): Searches public National Archives Catalog records by keywords, year range, material type and online availability, in catalog relevance order.
- [The New York Times API: Search articles](https://fous.com/methods/nytimes.com/search-news.md): Searches New York Times article headlines and summaries by keyword, optionally within a date range, and returns matching articles with dates, authors, sections and links, newest or most relevant first.
- [Poetry Foundation API: Search poems](https://fous.com/methods/poetryfoundation.org/search-poems.md): Finds poems matching a topic or occasion, or poems by a named poet, in Poetry Foundation search order. Older magazine poems without public text have no first two lines; untagged poems have no themes or occasions.
- [NASA API: Search media](https://fous.com/methods/nasa.gov/search-images.md): Searches NASA public photos, videos or audio by words and creation year, returning matches in relevance order with thumbnails and full-size file links.
- [NPR API: Search news](https://fous.com/methods/npr.org/search-news.md): Searches NPR-published articles by keyword, newest first or by best match, with optional publication dates, and returns each article's date, authors, section and summary.
- [Open Library API: List books by author](https://fous.com/methods/openlibrary.org/list-author-books.md): Finds an Open Library author by name, link or key and lists their works with first publication year, edition count, cover and an author profile.
- [All loc.gov methods](https://fous.com/methods/loc.gov.md)
