> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Library of Congress loc.gov API

> Search and metadata for the Library of Congress's digitized collections (audio recordings, photos, maps, manuscripts, newspapers, books, films...) from the keyless loc.gov JSON API.

![](https://mintcdn.com/webrouter/JBFYvcRI1PVnd4YX/logo/data-apis/loc-gov.webp?fit=max\&auto=format\&n=JBFYvcRI1PVnd4YX\&q=85\&s=a31c76c80883b6636588a08b373ede42)

[Web Catalog · Search](https://docs.webrouter.net/data-apis.md?category=search)

No key needed

Endpoints

6

Auth

None

[Vendor docs](https://www.loc.gov/apis/json-and-yaml/) · Serves `loc.gov`

## Notes

* Keyless. Every call here carries fo=json for a JSON answer.
* Strict rate limit: 20 requests per minute for this API; going over blocks you for an hour. Under heavy traffic you may get 429 or a CAPTCHA page below that rate; pause when you do.
* Paging (c per page, sp page number) stops at the 100,000th result, and some searches fail earlier; narrow with fa filters instead of paging deep.
* Facet values in fa are not controlled vocabularies, so an exact value may miss variants.
* Catalog (MARC) records are not served here, only digitized items, collections and their metadata.

## Endpoints

GET

Search the digitized collections

Items, collections and web pages matching keywords, with facets and paging.

[Open](#loc-gov-search)

GET

Browse or search one format

Items of one original format (audio, photos, maps...), optionally matching keywords.

[Open](#loc-gov-format-search)

GET

List collections

Every digital collection, with paging.

[Open](#loc-gov-collections-list)

GET

Browse or search one collection

Items of one collection, optionally matching keywords.

[Open](#loc-gov-collection-search)

GET

Get an item

One item's metadata and its resources (files, images, audio).

[Open](#loc-gov-item-get)

GET

Get a resource

One resource of an item (its files and pages).

[Open](#loc-gov-resource-get)

### Search the digitized collections

GET

`/search/`

`loc-gov.search`

Items, collections and web pages matching keywords, with facets and paging.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`q` required</td><td>string</td><td>query</td><td>Keywords across metadata and available full text (including video transcripts). Example `jazz`</td></tr>

    <tr>
      <td>
        `fa`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filters as name:value joined with '|': access-restricted, digitized, contributor, language, location, subject, online-format, original-format, partof.
      </td>
    </tr>

    <tr><td>`c`</td><td>integer</td><td>query</td><td>Results per page; 25 by default, keep it at 1,000 or less. Example `50`</td></tr>
    <tr><td>`sp`</td><td>integer</td><td>query</td><td>Page, from 1. Example `1`</td></tr>
    <tr><td>`sb`</td><td>string</td><td>query</td><td>Sort. One of `date`, `date_desc`, `title_s`, `title_s_desc`, `shelf_id`, `shelf_id_desc`</td></tr>

    <tr>
      <td>
        `at`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only these attributes, comma-separated, dot notation for sub-attributes (e.g. item,resources or item.data).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.loc.gov/apis/json-and-yaml/requests/endpoints/) · Same job: [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-search), [Apify](https://docs.webrouter.net/data-apis/apify.md#apify-store-search), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-search), [Brave Search](https://docs.webrouter.net/data-apis/bravesearch.md#bravesearch-videos-search), [BytePlus Searchinfinity](https://docs.webrouter.net/data-apis/byteplus-search.md#byteplus-search-web-search), [Crawl4AI Cloud](https://docs.webrouter.net/data-apis/crawl4ai.md#crawl4ai-search)

```python Python theme={null}
router.call_data_api("loc-gov.search", {'q': 'jazz', 'c': 50, 'sp': 1})
```

```text MCP theme={null}
call_data_api(endpoint="loc-gov.search", params={"q": "jazz", "c": 50, "sp": 1})
```

### Browse or search one format

GET

`/{format}/`

`loc-gov.format.search`

Items of one original format (audio, photos, maps...), optionally matching keywords.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`format` required</td><td>string</td><td>path</td><td>Format slug. One of `audio`, `books`, `film-and-videos`, `legislation`, `manuscripts`, `maps`, `newspapers`, `photos`, `notated-music`, `web-archives` Example `audio`</td></tr>
    <tr><td>`q`</td><td>string</td><td>query</td><td>Keywords across metadata and available full text (including video transcripts). Example `jazz`</td></tr>

    <tr>
      <td>
        `fa`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filters as name:value joined with '|': access-restricted, digitized, contributor, language, location, subject, online-format, original-format, partof.
      </td>
    </tr>

    <tr><td>`c`</td><td>integer</td><td>query</td><td>Results per page; 25 by default, keep it at 1,000 or less. Example `50`</td></tr>
    <tr><td>`sp`</td><td>integer</td><td>query</td><td>Page, from 1. Example `1`</td></tr>
    <tr><td>`sb`</td><td>string</td><td>query</td><td>Sort. One of `date`, `date_desc`, `title_s`, `title_s_desc`, `shelf_id`, `shelf_id_desc`</td></tr>

    <tr>
      <td>
        `at`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only these attributes, comma-separated, dot notation for sub-attributes (e.g. item,resources or item.data).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.loc.gov/apis/json-and-yaml/requests/endpoints/) · Same job: [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-search), [Apify](https://docs.webrouter.net/data-apis/apify.md#apify-store-search), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-search), [Brave Search](https://docs.webrouter.net/data-apis/bravesearch.md#bravesearch-videos-search), [BytePlus Searchinfinity](https://docs.webrouter.net/data-apis/byteplus-search.md#byteplus-search-web-search), [Crawl4AI Cloud](https://docs.webrouter.net/data-apis/crawl4ai.md#crawl4ai-search)

```python Python theme={null}
router.call_data_api("loc-gov.format.search", {'format': 'audio', 'q': 'jazz', 'c': 50, 'sp': 1})
```

```text MCP theme={null}
call_data_api(endpoint="loc-gov.format.search", params={"format": "audio", "q": "jazz", "c": 50, "sp": 1})
```

### List collections

GET

`/collections/`

`loc-gov.collections.list`

Every digital collection, with paging.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`c`</td><td>integer</td><td>query</td><td>Results per page; 25 by default, keep it at 1,000 or less. Example `50`</td></tr>
    <tr><td>`sp`</td><td>integer</td><td>query</td><td>Page, from 1. Example `1`</td></tr>

    <tr>
      <td>
        `at`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only these attributes, comma-separated, dot notation for sub-attributes (e.g. item,resources or item.data).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.loc.gov/apis/json-and-yaml/requests/endpoints/) · Same job: [ArcGIS Online](https://docs.webrouter.net/data-apis/arcgis.md#arcgis-groups-search), [Attio](https://docs.webrouter.net/data-apis/attio.md#attio-objects-list), [Bank of Canada](https://docs.webrouter.net/data-apis/bankofcanada.md#bankofcanada-lists), [US Bureau of Economic Analysis](https://docs.webrouter.net/data-apis/bea.md#bea-datasets-list), [Bright Data](https://docs.webrouter.net/data-apis/brightdata.md#brightdata-datasets-list), [Clay](https://docs.webrouter.net/data-apis/clay.md#clay-tables-query)

```python Python theme={null}
router.call_data_api("loc-gov.collections.list", {'c': 50, 'sp': 1})
```

```text MCP theme={null}
call_data_api(endpoint="loc-gov.collections.list", params={"c": 50, "sp": 1})
```

### Browse or search one collection

GET

`/collections/{collection}/`

`loc-gov.collection.search`

Items of one collection, optionally matching keywords.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`collection` required</td><td>string</td><td>path</td><td>Collection slug in kebab case. Example `civil-war-maps`</td></tr>
    <tr><td>`q`</td><td>string</td><td>query</td><td>Keywords across metadata and available full text (including video transcripts). Example `jazz`</td></tr>

    <tr>
      <td>
        `fa`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filters as name:value joined with '|': access-restricted, digitized, contributor, language, location, subject, online-format, original-format, partof.
      </td>
    </tr>

    <tr><td>`c`</td><td>integer</td><td>query</td><td>Results per page; 25 by default, keep it at 1,000 or less. Example `50`</td></tr>
    <tr><td>`sp`</td><td>integer</td><td>query</td><td>Page, from 1. Example `1`</td></tr>
    <tr><td>`sb`</td><td>string</td><td>query</td><td>Sort. One of `date`, `date_desc`, `title_s`, `title_s_desc`, `shelf_id`, `shelf_id_desc`</td></tr>

    <tr>
      <td>
        `at`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only these attributes, comma-separated, dot notation for sub-attributes (e.g. item,resources or item.data).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.loc.gov/apis/json-and-yaml/requests/endpoints/) · Same job: [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-search), [Apify](https://docs.webrouter.net/data-apis/apify.md#apify-store-search), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-web-search), [Brave Search](https://docs.webrouter.net/data-apis/bravesearch.md#bravesearch-videos-search), [BytePlus Searchinfinity](https://docs.webrouter.net/data-apis/byteplus-search.md#byteplus-search-web-search), [Crawl4AI Cloud](https://docs.webrouter.net/data-apis/crawl4ai.md#crawl4ai-search)

```python Python theme={null}
router.call_data_api("loc-gov.collection.search", {'collection': 'civil-war-maps', 'q': 'jazz', 'c': 50, 'sp': 1})
```

```text MCP theme={null}
call_data_api(endpoint="loc-gov.collection.search", params={"collection": "civil-war-maps", "q": "jazz", "c": 50, "sp": 1})
```

### Get an item

GET

`/item/{item_id}/`

`loc-gov.item.get`

One item's metadata and its resources (files, images, audio).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `item_id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        Item id, as in https\://www\.loc.gov/item/\{id}/.
      </td>
    </tr>

    <tr>
      <td>
        `at`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only these attributes, comma-separated, dot notation for sub-attributes (e.g. item,resources or item.data).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.loc.gov/apis/json-and-yaml/requests/endpoints/) · Same job: [Bing Webmaster Tools](https://docs.webrouter.net/data-apis/bing-webmaster.md#bing-webmaster-urls-info), [ChEMBL](https://docs.webrouter.net/data-apis/chembl.md#chembl-status), [HGNC (HUGO Gene Nomenclature Committee)](https://docs.webrouter.net/data-apis/hgnc.md#hgnc-info), [Internet Archive](https://docs.webrouter.net/data-apis/internet-archive.md#internet-archive-metadata-get), [Moz](https://docs.webrouter.net/data-apis/moz.md#moz-links-index-metadata), [STRING](https://docs.webrouter.net/data-apis/string-db.md#string-db-version-get)

### Get a resource

GET

`/resource/{resource_id}/`

`loc-gov.resource.get`

One resource of an item (its files and pages).

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `resource_id`

        required
      </td>

      <td>
        string
      </td>

      <td>
        path
      </td>

      <td>
        Resource id, as in https\://www\.loc.gov/resource/\{id}/.
      </td>
    </tr>

    <tr>
      <td>
        `at`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Only these attributes, comma-separated, dot notation for sub-attributes (e.g. item,resources or item.data).
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://www.loc.gov/apis/json-and-yaml/requests/endpoints/) · Same job: [Bing Webmaster Tools](https://docs.webrouter.net/data-apis/bing-webmaster.md#bing-webmaster-urls-info), [ChEMBL](https://docs.webrouter.net/data-apis/chembl.md#chembl-status), [HGNC (HUGO Gene Nomenclature Committee)](https://docs.webrouter.net/data-apis/hgnc.md#hgnc-info), [Internet Archive](https://docs.webrouter.net/data-apis/internet-archive.md#internet-archive-metadata-get), [Moz](https://docs.webrouter.net/data-apis/moz.md#moz-links-index-metadata), [STRING](https://docs.webrouter.net/data-apis/string-db.md#string-db-version-get)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.