Search LOC Items
libofcongress_search_itemsSearch the Library of Congress digital collections by keyword. Optionally filter by material format (photos, maps, newspapers, audio, etc.), date range, subject heading, geographic location, or contributor (a creator, photographer, author, or other credited name), or scope the search to a single curated collection with collection_slug. Returns item summaries with titles, dates, descriptions, LOC IDs, format tags, and the contributors LOC credits. Each result carries is_item: pass the id of a result where is_item is true to libofcongress_get_item for full metadata. Non-item resources include collections, exhibit and research-guide pages, newspaper pages, catalog.loc.gov records, and hdl.loc.gov finding aids. When page_url is present, pass it to libofcongress_get_newspaper_page, optionally using the search query as match; its item_id identifies the issue. A link_notice warns that a retired catalog URL no longer opens its record; otherwise follow a non-item url. Use libofcongress_search_subjects to find an LCSH heading for the subject filter. To discover the subject, location, and contributor values the filters accept for a search, set include_facets to get its top subject_facets, location_facets, and contributor_facets.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "libofcongress_search_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-indexed page number for paginating results. | |
| sort | No | Result order: relevance (default), date (oldest first), or date_desc (newest first). Uses LOC catalog dates and upstream ordering. | relevance |
| limit | No | Results per page. Default 25. A page holds at most 100 results: a larger limit (up to 1000) is served as a 100-result page, and page then counts 100-result pages. | |
| query | Yes | Full-text search across metadata and available descriptive text. Use "*" to match all records within the applied filters; relevance order can differ from a queryless LOC browse. | |
| format | No | Material type filter. Options: photo, map, newspaper, manuscript, audio, film, book, notated-music. Omit to search all formats. | |
| subject | No | Subject filter: an LCSH heading from libofcongress_search_subjects (e.g., "World War, 1939-1945", "United States--History--Civil War, 1861-1865") or a subject term from subject_facets (include_facets) or libofcongress_get_item subject_terms (e.g., "world war"). LOC indexes headings by their parts, so the value is split at "--" into lowercase terms with dates dropped, and an item must carry every term. | |
| date_end | No | End year for date filter, inclusive (e.g., 1930). Omit to run through the current year. | |
| location | No | Geographic location filter (e.g., "oklahoma", "washington d.c."). Lowercase, matches LOC location facets; location_facets (include_facets) lists values for a search. | |
| date_start | No | Start year for date filter, inclusive (e.g., 1920). Omit for no lower bound. | |
| contributor | No | Contributor filter: a creator, photographer, author, or other name LOC credits, in the form LOC indexes it, without dates or roles (e.g., "lange, dorothea", "united states. farm security administration"). Take values from contributor_facets (include_facets), a result's contributor_terms, or libofcongress_get_item contributor_terms; libofcongress_get_item contributors, which carry dates and roles, match nothing. Case is ignored; every other character must match, accents included. With format "newspaper", a page's contributor is the institution that digitized it, not an author. | |
| include_facets | No | Also return subject_facets, location_facets, and contributor_facets: LOC's top subject, location, and contributor terms across every match, with counts — the values the subject, location, and contributor filters accept. Default false: facets add time to each search, so request them when you need filter values to narrow by. | |
| collection_slug | No | Scope the search to one curated collection. Pass a slug exactly as returned by libofcongress_browse_collections to libofcongress_search_items.collection_slug (e.g., "aaron-copland") — slugs are not derivable from the collection title. Combine with format to filter material type; use query "*" to browse every matching record. Omit to search all of LOC. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Current 1-indexed page number. | |
| error | No | Present when the call failed. Absent on success. | |
| items | No | Item summaries matching the search query and filters. | |
| pages | No | Total retrievable pages. For result sets larger than LOC will page through (~100,000 items) this is capped, and a notice discloses how to reach the rest (partition by date/subject/location). | |
| total | No | Total number of matching items across all pages. | |
| notice | No | Recovery hint when results are empty or a page is out of range — echoes applied filters, subject terms, location, and contributor included, and suggests how to broaden — plus disclosure of a capped limit or of the retrieval ceiling. Absent on ordinary result pages. | |
| has_next | No | True when a retrievable next page follows this one. Never promises a page past LOC's ~100,000-item retrieval ceiling. | |
| totalCount | No | Total matching items across all pages — mirrors output.total for agent reasoning. | |
| effectiveSort | No | Applied LOC result order, including empty and out-of-range pages. | |
| effectiveLimit | No | The page size actually served when limit exceeded the per-call cap of 100. Absent when limit was within the cap. | |
| effectiveQuery | No | The query as submitted to the LOC API, after trimming. | |
| subject_facets | No | LOC's top subject terms across every item matching this search (up to 10), most frequent first. Pass a value as the subject filter to narrow the search. Present only when include_facets is true; empty when LOC reports none. | |
| location_facets | No | LOC's top location terms across every item matching this search (up to 10), most frequent first. Pass a value as the location filter to narrow the search. Present only when include_facets is true; empty when LOC reports none. | |
| contributor_facets | No | LOC's top contributor terms across every item matching this search (up to 10), most frequent first. Pass a value as the contributor filter to narrow the search. Present only when include_facets is true; empty when LOC reports none. On newspaper pages the contributor is the institution that digitized the page, so institutions can appear here beside creators. | |
| effectiveSubjectTerms | No | The subject terms the subject filter was sent as, all required to match. Absent when no subject filter was given. | |
| effectiveCollectionSlug | No | The collection the search was scoped to, after trimming. Absent when the search covered all of LOC. |