Search LC Subject Headings
libofcongress_search_subjectsSearch Library of Congress Subject Headings (LCSH) by keyword. Returns controlled-vocabulary subject labels and their URIs. Use the returned label as the subject filter in libofcongress_search — LCSH uses precise, standardized terms that differ from natural language (e.g., "World War, 1939-1945" not "World War II"; "Photography, Aerial" not "Aerial photography"). Running this tool before a subject-filtered libofcongress_search dramatically improves result quality.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of subject headings to return. Default 10, max 50. | |
| query | Yes | Keyword or partial subject heading to search for (e.g., "civil war", "immigration", "jazz"). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The limit applied to this response — maximum headings the API will return. | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Number of subject headings returned in this response. | |
| total | No | Number of subject headings returned. | |
| notice | No | Recovery hint when results are empty, or when the upstream candidate cap under-filled the request. Distinguishes "exhausted by ranking" (retry with a more specific query) from "no LCSH coverage", and suggests inverted-form strategies. Absent when the full requested set was returned. | |
| subjects | No | LCSH subject headings matching the query, ordered by relevance. | |
| truncated | No | True when results were capped at the requested limit. Increase limit or refine the query to surface additional headings. | |
| effectiveQuery | No | The keyword query as submitted to the id.loc.gov suggest endpoint, after trimming. |