Search the catalogue
search_itemsSearch the Library of Congress catalog across books, photos, maps, recordings, and more. Filter by subject, language, year, or location to find digitized items.
Instructions
Search the Library of Congress catalogue: books, photographs, maps, recordings, films, manuscripts, sheet music and newspaper titles. 'media_type' is required, because the Library keeps a separate catalogue for each kind of thing. This matches titles, creators and catalogue descriptions. It does not read the text inside a scan; use search_newspapers for a phrase printed on a newspaper page. Filters take the words the Library itself uses: 'subject' and 'location' as the rows here spell them, 'language' written in English, 'collection' as list_collections reports it under 'collection_filter'. A filter matching nothing is set aside and the search asked again without it; the answer names what was dropped, and the count it reports is then the unfiltered search's. By default only material with a digitised copy is returned; set 'online_only' to false to take in records the Library holds on a shelf alone. A row carries an 'identifier' get_item takes when it names a record. A row that is a collection the Library gathered names no record: 'is_collection' is true there, 'identifier' is null, and 'source_url' opens the collection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | ||
| sort | No | Order of the results. | relevance |
| limit | No | ||
| query | Yes | Words to look for in titles, creators and catalogue descriptions. The catalogue index holds no word of a single letter, so at least one word has to run to two letters or more, unless it is written in a script where one character is a word. | |
| subject | No | A subject heading, such as 'crime'. | |
| year_to | No | Latest year, inclusive. | |
| language | No | A language, written in English: 'english'. | |
| location | No | A place, such as 'oklahoma'. | |
| year_from | No | Earliest year, inclusive. | |
| collection | No | A collection, named exactly as list_collections reports it under 'collection_filter'. | |
| media_type | Yes | Which catalogue to search: books, photos, maps, audio, film-and-videos, manuscripts, notated-music or newspapers. 'newspapers' holds the papers themselves; a phrase printed on a page belongs in search_newspapers. | |
| online_only | No | Keep to material with a digitised copy. Set false to include shelf-only records. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | ||
| items | Yes | ||
| notes | Yes | ||
| query | Yes | ||
| total | Yes | Records matching across this catalogue for the search the rows come from, not the number returned. A filter that matched nothing is set aside, and this then counts the search without it, which the notes name. |