Search/Browse Help - Constructing Canned Search Links
Canned Search Recommendations
- Use Keyword Search for relevance-based keyword search results and Advanced Search or Browse searches for results generally sorted by author-title-date. We suggest limiting use of the command-driven Keyword (EXPERT) searches if better options are available (Expert search can make it more difficult for many searchers to understand and revise the canned search).
- Make sure diacritics, special characters, and truncation symbols (such as %) are URL-encoded in your search query. If you use a single character wildcard (%) for truncation, you need to encode the percent sign as %25 in your URL; a multiple character wildcard (?) must be encoded as %3F. If possible, remove diacritics from your canned search string.
- Use a plus sign (+) to replace spaces between search words. When appropriate, use quotation marks around phrases. Note that quotation marks must be encoded using hexadecimal or decimal values in URLs (for example: %22your+text%22).
- Consider adding limits to your canned search query. Limits are available for Keyword Search and Advanced Search, as well as the Titles beginning with, Title (main) beginning with, LCCN, and Standard Numbers (LCCN-ISBN-ISSN) options of Browse.
- When linking to a specific bibliographic record, use LCCN Permalink when the record has an assigned LCCN. If no LCCN is present in the record, use the LC Catalog system identifier (BibID).
- The SearchType parameter in canned queries refers to the search page selected. Use searchType=1 for Keyword Search and Browse and searchType=2 for Advanced Search.
Keyword Search: Single Index Code
One Index Code: Keyword Search (ALL, NAME, SUBJECT, TITLE)
Keyword Search (ALL, NAME, SUBJECT, and TITLE) retrieves terms in multiple fields and subfields of bibliographic records. Keyword Search finds search terms across subfields and sorts result sets by relevance.
To create a canned Keyword Search query, use one of the following index four codes (which map to the Keyword Search drop-down menu options):
Search Syntax: Keyword Search requires one index code (searchCode) along with your search terms (searchArg). Include the caret-asterisk symbol combination (^*) at the end of the index code and encode the caret as %5E. Limits may be added:
https://catalog.loc.gov/vwebv/search?searchCode=code%5E*&searchArg=your+terms&searchType=1&recCount=25
Examples:
- Keyword (ALL) search using GKEY^* for the quoted phrase "technology transfer" (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=GKEY%5E*&searchArg=%22technology+transfer%22&searchType=1&recCount=25
- Keyword (SUBJECT) search using SKEY^* for the quoted phrase "African American businesspeople" (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=SKEY%5E*&searchArg=%22African+American+businesspeople%22&searchType=1&recCount=25
- Keyword (AUTHOR/CREATOR) search using NKEY^* for the truncated word Shakespear? (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=NKEY%5E*&searchArg=Shakespear?&searchType=1&recCount=25
- Keyword (TITLE) search using TKEY^* for privatization and the quoted phrase "Latin America" in title subfields (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=TKEY%5E*&searchArg=privatization+%22Latin+America%22&searchType=1&recCount=25
- Keyword (ALL) search using GKEY^* for the word trading limited by publication date (2010), location (Business Reference Collection), and form of material (all text) (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=GKEY%5E*&searchArg=trading&yearOption=defined&limitTo=DATE=2010-&fromYear=2010&toYear=&limitTo=LOCA=Business+Reference+Collection&limitTo=TYPE=a?&searchType=1&recCount=25
One Index Code: Advanced Search
Advanced Search finds terms in multiple fields and subfields of both bibliographic and holdings records. These queries also search terms across subfields, with results returned by the sort associated with the first index code (usually author/creator, full title, descending date of publication).
To create an Advanced Search canned query, select from the following index codes (which map to the Advanced Search drop-down menu options):
- GKEY Keyword Anywhere
- KTIL Title: All
- KNUM LCCN-ISBN-ISSN
- KPNC Name: Personal
- K010 LC Control No/LCCN
- KSUB Subject: ALL
- KISN Intl Standard No
- KNAM Name: All
- KPUB Publication Info
- SKEY Subject: Authorized
- KSER Series
- KCNC Name: Corp/Meeting
- KTUT Title Uniform
- KNOT Notes
- KSGE Subject Geographic
- KCON Contents Notes
- KPRF Credits/Performers
- KURL Electronic Access
- HKEY Holdings Keyword
Search Syntax: Advanced Search requires the searchCode, searchArg, argType, and Boolean combine. Values for argType are: all, any, phrase. Boolean combine values are: and, or, not. Limits may be added:
https://catalog.loc.gov/vwebv/search?searchCode1=code&searchArg1=your+first+terms&argType1=type&combine2=Boolean option&searchCode2=code&searchArg2=&argType2=type&searchType=2&recCount=25
Note that in the LC Catalog, Advanced Search queries are viewed as Boolean searches. Therefore, even if your canned search contains only one index code (e.g., the first set of "boxes"), you still need to include a second search statement that contains blank metadata.
Examples:
- Advanced Search using one SKEY index code for Balance of payments as a phrase (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode1=SKEY&searchArg1=balance+of+payments&argType1=phrase&combine2=and&searchCode2=GKEY&searchArg2=&argType2=all&searchType=2&recCount=25
- Advanced Search using one KSUB index code for Country name--Commerce--Directories (e.g., Argentina--Commerce--Directories) for all words across subfields in a single search box (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode1=KSUB&searchArg1=Argentina+Commerce+Directories&argType1=all&combine2=and&searchCode2=GKEY&searchArg2=&argType2=all&searchType=2&recCount=25
One Keyword Index Code: Keyword (EXPERT) Search
Both keyword and left-match index codes can be used in the command-driven Keyword (EXPERT) search. To build keyword queries in Keyword (EXPERT) search, you can combine keyword index codes for bibliographic and holdings records. Your query can include phrases, truncation, and limits. Keyword searches in Keyword (EXPERT) search, however, cannot retrieve data across subfields; if your terms are split between one or more subfields, you need to search each subfield separately using multiple codes. Similarly, multiple codes are required when you use Boolean operators in your keyword queries. (See also Keyword (EXPERT) search with left-match index codes).
Search Syntax: While Keyword (EXPERT) search syntaxes vary, all Keyword (EXPERT) canned queries contain searchCode=CMD and embed the index code in the searchArg. If you use a single wildcard (%) for truncation, you need to encode the percent sign as %25 in your URL. Quoted phrases begin and end with %22 (the encoded value for quotation marks). Limits may be added. The following example shows one possible Keyword (EXPERT) search syntax using a quoted phrase:
https://catalog.loc.gov/vwebv/search?searchCode=CMD&searchArg=code+%22your+phrase+terms%22&searchType=1&recCount=25
While Keyword (EXPERT) canned searches are generally straightforward to construct, these searches can leave non-expert searchers with a more difficult OPAC environment when revising their search results. We therefore recommend using Keyword (EXPERT) canned searches only when you need an index code that is not available in Keyword Search or Advanced Search - or when you believe this is the best option for patrons.
Examples:
- Keyword (EXPERT) search using SKEY index code for the quoted phrase "solar energy" (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=CMD&searchArg=SKEY+%22solar+energy%22&searchType=1&recCount=25
- Keyword (EXPERT) search using KCLA index code for the partial call number pg3326? (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=CMD&searchArg=KCLA+pg3326?&searchType=1&recCount=25
Keyword Search: Multiple Index Codes
Multiple Keyword Index Codes: Advanced Search
Advanced Search finds terms in multiple fields and subfields of both bibliographic and holdings records. Search terms may cross subfields, and results are usually sorted by author/creator, full title, and descending date of publication (the sort associated with the first Advanced Search index code). Select from the Advanced Search index codes listed above.
Search Syntax: Advanced Search involving two or three sets of "boxes," requires the following syntax. Limits may be added:
https://catalog.loc.gov/vwebv/search?searchCode1=code&searchArg1=your+first+terms&argType1=type
&combine2=Boolean option&searchCode2=code&searchArg2=&argType2=type&combine3=Boolean option&searchCode3=code&searchArg3=&argType3=type&searchType=2&recCount=25
Examples:
- Advanced Search using three SKEY index codes for the subject Investments, Foreign--Law and legislation--Russia (Federation), which has metadata in three subject subfields (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode1=SKEY&searchArg1=investments+foreign&argType1=phrase&combine2=and&searchCode2=SKEY&searchArg2=law+and+legislation&argType2=phrase&combine3=and&searchCode3=SKEY&searchArg3=Russia+Federation&argType3=all&searchType=2&recCount=25
- Advanced Search using SKEY and KURL index codes for the controlled subject Canada and the term catdir in a URL linking field (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode1=SKEY&searchArg1=Canada&argType1=all&combine2=and&searchCode2=KURL&searchArg2=catdir&argType2=all&searchType=2&recCount=25
- Advanced Search using the KTIL, KSUB, and HKEY index codes for the title phrase American journal and the controlled subject Periodicals (in a bibliographic record) combined with the word Hathitrust (in any field of a holdings record) (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode1=KTIL&searchArg1=American journal&argType1=phrase&combine2=and&searchCode2=KSUB&searchArg2=Periodicals&argType2=all&combine3=and&searchCode3=HKEY&searchArg3=Hathitrust&argType3=all&searchType=2&recCount=25
Multiple Keyword Index Codes: Keyword (EXPERT) Search
Keyword queries in Keyword (EXPERT) search enable you to combine multiple bibliographic and holdings record keyword index codes, using Boolean strings, phrase searches, truncation, and limits. (See also Keyword (EXPERT) search using left-match index codes.) Because keyword searches in Keyword (EXPERT) search cannot retrieve data across subfields, you must search each subfield separately when your terms are split between multiple subfields. When using a single wildcard (%) for truncation, encode the percent sign as %25 in the URL. Quoted phrases begin and end with %22 (the encoded value for quotation marks).
Multiple index codes are required when you use Boolean operators in your queries. Note that no matter what sequence you use for Boolean expressions, the LC Catalog processes Boolean OR expressions before AND/NOT expressions.
Search Syntax: While Keyword (EXPERT) search syntaxes vary, Keyword (EXPERT) queries contain searchCode=CMD and embed the index code in the searchArg. Limits may be added. The following example shows one possible EXPERT search syntax for a keyword query of a controlled subject with multiple subfields. The query - which can only be constructed using Keyword (EXPERT) search - uses repeated SKEY statements, some with single words and others with quoted phrases, and combines the subject heading with KURL web links and K955 processing data truncated with a single character wildcard (? encoded as %25):
https://catalog.loc.gov/vwebv/search?searchCode=CMD&searchArg=SKEY+%22your+terms%22+and+SKEY+term2+and+KURL+term3+and+K955+term4%25&searchType=1&recCount=25
Examples:
- Keyword (EXPERT) keyword SKEY search of each subfield in the controlled subject heading for Investments, Foreign--Law and legislation--Russia (Federation) and K955 search for processing dates with a single wildcard (? encoded as %25) (Catalog search opens in a new window). As shown in this example, searching multiple dates using keyword index codes requires either repeating your index code with each date or using a single character wildcard (%, encoded as %25). A multiple character wildcard (?) in the date is too broad, retrieving not only dates but also LCCNs and other numbers; your search may time out:
https://catalog.loc.gov/vwebv/search?searchCode=CMD&searchArg=SKEY+%22investments+foreign%22+and+SKEY+%22law+and+legislation%22+and+SKEY+%22russia+federation&%22+and+(K955+200%25+or+K955+201%25)&searchType=1&recCount=25
- Keyword (EXPERT) keyword NKEY search against individual subfields of a controlled corporate name for Japan. Gaimusho. and the 066C value 1 to identify the presence of Japanese characters (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=CMD&searchArg=NKEY+Japan+and+NKEY+Gaimusho+and+066C+1&searchType=1&recCount=25
Left-Match Search
Left-Match Index Code: Browse Titles beginning with (TALL), Title (main) beginning with (2450), LCCN (LC Control No.) (LCCN), and Standard Number (LCCN-ISBN-ISSN) (STNO)
Four left-match searches are available from Browse:
- TALL: for titles beginning with. TALL indexes titles in multiple places in the record. Initial articles are omitted when the indexed title field can identify non-filing articles. Queries automatically begin with the left-most word in the title field.
- 2450: for the main title beginning with. 2450 indexes the main title only in the record. Queries automatically begin with the left-most word in the title field; remove initial articles from titles in your canned searches.
- LCCN: for Library of Congress control numbers (LCCNs). LCCN indexes valid and cancelled LC control numbers. Beginning with the left-most character, enter LCCNs in direct order, and retain spaces between LCCN prefixes and year/serial numbers.
- STNO: for three standard numbers: LCCNs, ISBNs, ISSNs. STNO searches for valid, incorrect, and cancelled numbers. Queries automatically begin with the left-most number field.
Search Syntax: TALL, 2450, LCCN, and STNO searches require the index code (searchCode) along with your search terms (searchArg). Truncation is automatic and limits may be added:
https://catalog.loc.gov/vwebv/search?searchCode=code&searchArg=your+terms&searchType=1&recCount=25
Examples:
- Browse TALL search for titles beginning with New York times book review, limited to periodicals (type: ?s) (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=TALL&searchArg=New+York+times+book+reviewlimitTo=TYPE=?s&searchType=1&recCount=25
- Browse 2450 search for the main title beginning with New York times book review, limited to periodicals (type: ?s) (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=2450&searchArg=New+York+times+book+reviewlimitTo=TYPE=?s&searchType=1&recCount=25
- Browse LCCN search for LCCN mm 78044693 (George Washington papers, 1592-1943) (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=LCCN&searchArg=mm+78044693&searchType=1&recCount=25
- Browse STNO search for ISSN 0252-2942 (World Bank annual report) in multiple ISSN fields and/or subfields (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=STNO&searchArg=0252-2942&searchType=1&recCount=25
Left-Match Index Code: Keyword (EXPERT) Search
You can use any keyword or left-match index code for bibliographic records with Keyword (EXPERT) search. (See also Keyword (EXPERT) search using one keyword index code and multiple keyword index codes). However, unlike keyword searches in Keyword (EXPERT) search, you can use only one left-match index code in each query; left-match index codes cannot be combined with other index codes.
The LC Catalog contains three types of left-match index codes that:
- Search a single subfield in a field (if the subfield is repeated, all instances are searched)
- Search a predetermined string of subfields in a field
- Search multiple fields (called a "composite" search)
Left-match searches generally invoke normalization rules (for example, hyphens are removed from ISBN searches). Quotation marks (%22) must be used when you have more than one search term. Truncation is not automatic (consider including a question mark (?) at the end of your search term(s) as a multi-character wildcard). Limits may be added.
Search Syntax: Keyword (EXPERT) left-match queries contain searchCode=CMD and embed the index code in the searchArg. The following example shows a Keyword (EXPERT) search using NALL, with quoted phrases beginning and ending with %22 and a question mark invoking right truncation:
https://catalog.loc.gov/vwebv/search?searchCode=CMD&searchArg=NALL+%22your+terms?%22&searchType=1&recCount=25
Examples:
- Keyword (EXPERT) left-match search using NALL to search names (across subfields), beginning with the left-most word, for United States Census Office 12th? (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=CMD&searchArg=NALL+%22United+States+Census+Office+12th?%22&searchType=1&recCount=25
- Keyword (EXPERT) left-match using SALL to search subjects (across subfields) beginning with the left-most word, for Vietnam War? (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=CMD&searchArg=SALL+%22Vietnam+War?%22&searchType=1&recCount=25
Headings and Call Numbers Browse Search
Heading Browse
Heading Browse searches link you to lists of controlled authors/creators, subjects, names/titles, and series/uniform titles ordered alphabetically or numerically.
To create a canned Heading Browse query, use one of the following index codes (which map to the Browse drop-down menu options for controlled headings):
- NAME+ AUTHORS/CREATORS beginning with
- [email protected] AUTHORS/CREATORS containing
- SUBJ+ SUBJECTS beginning with
- [email protected] SUBJECTS containing
- AUTH+ NAMES/TITLES beginning with
- [email protected] NAMES/TITLES containing
- [email protected] SERIES/UNIFORM TITLES containing
Search Syntax: Heading Browse beginning with and containing searches require the index code (searchCode) along with your search terms (searchArg). Right truncation is automatic for beginning with searches only, and limits are not available. Make sure punctuation is keyed accurately; substitute spaces with a plus sign (+). For Headings Browse containing searches, add an at sign (@) after the code; for beginning with searches, add a plus sign (+) after the index code and encode the plus sign as %2B:
Beginning with search:
https://catalog.loc.gov/vwebv/search?searchCode=code%2B&searchArg=your+terms&searchType=1&recCount=25
Containing search:
https://catalog.loc.gov/vwebv/search?searchCode=[email protected]&searchArg=your+terms&searchType=1&recCount=25
Examples:
- Browse using NAME for controlled author/creator headings beginning with the terms Canada. Women's Bureau (encode the apostrophe in Women's as %27) (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=NAME%2B&searchArg=Canada.+Women%27s+Bureau&searchType=1&recCount=25
- Browse using SUBJ for controlled subject headings containing the terms Don Quixote (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?[email protected]&searchArg=Don+Quixote&searchType=1&recCount=25
- Browse using AUTH for controlled names/titles headings containing the terms Mozart and sonata (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?[email protected]&searchArg=Mozart+sonata&searchType=1&recCount=25
Call Numbers Browse
Call Number Browse indexes both LC class numbers opens in a new window and other shelving numbers used at the Library for materials such as microforms, newspapers, images, and archival manuscripts). Note that call numbers are retrieved from the holdings record associated with the item (using holdings record 852 fields), not from bibliographic record 050/051 fields.
To create a canned Call Numbers Browse query, use one of the following two index codes (which map to the Browse drop-down menu options for call numbers). Enter either a complete call number (p85.m23+r6) or the first part of the number (f128.4) and leave off location information:
Search Syntax: Call Numbers Browse searches require the index code (searchCode) along with your search terms (searchArg). Right truncation is automatic and limits are not available. Make sure punctuation is keyed accurately; substitute spaces with a plus sign (+), and encode the plus sign after the index code as %2B:
https://catalog.loc.gov/vwebv/search?searchCode=code%2B&searchArg=your+terms&searchType=1&recCount=25
Examples:
- Browse using CALL for the classified call number PN1968.U5 T86 1898 (leaving off the Rare Book and Special Collections Division collection location: "Houdini Coll") (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=CALL%2B&searchArg=PN1968.U5+T86+1898&searchType=1&recCount=25
- Browse using MOTH for the LC shelving number VBU 4222 (viewing copy). If you want "viewing copy" to be part of your search, the parentheses in the call number must be included (with URL-encoding: %28viewing+copy%29); however, since right truncation is automatic, this qualifier is not required (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/search?searchCode=MOTH%2B&searchArg=VBU+4222&searchType=1&recCount=25
Search for Specific Catalog Record
LCCN Permalink
LCCN Permalinks are persistent identifiers for bibliographic and authority records in the LC Catalog. These links are constructed from the record's LCCN using a syntax that normalizes LCCNs by removing any spaces between a prefix and serial portion of the number. For records assigned LCCNs, the Full Record display includes the LCCN Permalink.
Search Syntax: LCCN Permalinks are constructed as follows:
https://lccn.loc.gov/[normalized LCCN]
Examples:
- For LCCN 2003556443 (Catalog search opens in a new window):
https://lccn.loc.gov/2003556443
- For LCCN gm 71002450 (Catalog search opens in a new window):
https://lccn.loc.gov/gm71002450
BibID
A small number of records in the LC Catalog do not have assigned LCCNs. To reference these records, use a permalink based on the the Catalog system number. This identifier is located on the Full Record display.
Search Syntax: The BibID URL references holdingsInfo (instead of search), followed by the record BibID:
https://catalog.loc.gov/vwebv/holdingsInfo?bibId=bibID number
Example:
- For LC Catalog BibID 14111083 (Rootz Africa) (Catalog search opens in a new window):
https://catalog.loc.gov/vwebv/holdingsInfo?bibId=14111083