Custom URLs can include either a single database or a group of databases.
A Search Box Generator is available in OCLC Service Configuration. This tool enables your library to configure and create advanced search box HTML code to copy and paste into your library homepage and LibGuides. For more information, see Search Box Generator.
Note: OCLC Support does not troubleshoot customized HTML code for search boxes.
To create an Advanced Search URL:
https://my-library.on.worldcat.org/advancedsearch?databaseList=
=
) in the base template. If you are including multiple Target IDs, separate each Target ID with %2C
.Example URL with Target IDs for Academic OneFile, Gale Virtual Reference Library, and ProQuest Newsstand:
https://my-library.on.worldcat.org/advancedsearch?databaseList=2229%2C1461%2C2622
When a patron clicks on the URL you constructed, they will be taken to your library's Advanced Search screen, and they will be able to search through the databases you selected to include. For more information on Target IDs, see Parameters and Target IDs, below.
You can embed a search box on your library's website and have options to tailor it to your patrons' needs. A basic search box will mimic the behavior of the search box on the homepage of your Discovery interface:
Note that you will always need to encode parameter values. For example, "databaseList=2198%2C3561" is encoded and "databaseList=2198,3561" needs encoding.
When using multiple format parameters, enter each format individually instead of as a list. For example, "format=Book,Music,Video" should be three separate parameters: "format=book&format=music&format=video".
You do not need to add parameters to your search box if you want the search box to use the defaults selected in Service Configuration. If you need to create a custom search box with additional filters, the search box code should be updated.
You can use your WorldCat Discovery search URL to determine parameter values.
The example below searches for articles held by your library published in the last 5 years. Use the values provided in the URL to customize your search box code.
https://my-library.on.worldcat.org/search?sortKey=LIBRARY&databaseList=638&queryString=code&changedFacet=year&scope=sz%3A35935&format=Artchap&database=all&author=all&year=2012..2017&yearFrom=&yearTo=&language=al
When a library user searches your library's local catalog and no results are found, you can provide a link to your instance of WorldCat Discovery to search further. Embed the link to WorldCat Discovery on your local catalog and pass the search query parameters on so that when a user clicks on the URL, it performs the same search that was conducted in the local catalog.
To embed your Discovery URL:
For many libraries, the default settings configured in the Relevancy and Scoping section of OCLC Service Configuration provide the desired parameters for an embedded search box. To configure a search box with parameters different from your selected defaults, follow the instructions below.
You can configure your search box to query a particular database or group of databases (that differ from your default database selections). Limiting searches to particular databases requires database Target IDs. Find Target IDs in the WorldCat Discovery content list (.xlsx).
The Target ID is a number assigned to each collection. You can use the Target ID as a reference number when you configure access to the databases you subscribe to, when you are configuring your WorldCat Discovery search box, and when you read Google Analytics or custom reports.
Users can also modify the databases used for a search by editing the database Target ID(s) in the URL. This option is especially useful if you perform a search and then wish to quickly modify the database(s) you are searching. Target IDs are included in the content list.
Note that if you add or change a database via adding or changing a target ID in the URL, your new database selection(s) will display as a selected database in search results and in Advanced Search.
Example Target IDs and associated collections:
1271 Business Source Complete; 1708 Academic Search Complete; 1953 ERIC
URL after searching Business Source Complete:
https://my-library.on.worldcat.org/search?queryString=dog&databaseList=1271
The URL can be modified to add a second and a third database to the search. The Target IDs are separated by %2C as shown:
…databaseList=1708%2C1271…
…databaseList=1708%2C1271%2C1953…
By default, the sort preference configured in Service configuration for Default sort will appear in your search string. To specify a different sort option for your advanced search box, replace the default value for sortKey= with the selected value below:
Sort option | Sort value |
---|---|
Best Match | BEST_MATCH |
Recency | RECENCY |
Library | BIBLIOTECA |
Author (A-Z) | AUTHOR |
Date (Oldest First) | DATE_A |
Date (Newest First) | DATE_D |
Most Widely Held | LIBRARYCOUNT |
Title (A-Z) | TITLE |
By default, the scope preference configured in Service configuration for Relevancy and Scoping will appear in your search string. To identify a different scope for your advanced search box:
Scope option | Scope value |
---|---|
Branch |
changedFacet=scope &subscope=wz%3VALUE and sz%3VALUE Note: If multiple branches are selected, additional subscopes will appear. |
Level 1 (your library) | changedFacet=scope&scope=wz%3VALUE |
Level 2 (consortium or group) | changedFacet=scope&scope=zs%3VALUE |
Level 3 (second consortium or group) | changedFacet=scope&scope=zs%3VALUE |
Libraries Worldwide | changedFacet=scope |
To create a search box using specific filters:
Filter option | Filter value |
---|---|
Content | changedFacet=content&scope=&content= |
Format |
changedFacet=format&scope=&format= |
Databases |
changedFacet=database&scope=&database= |
Author | changedFacet=author&scope=& &author= |
Year | changedFacet=year&scope=&year= |
Language | changedFacet=language&scope=&language= |
Tema |
changedFacet=topic&scope=&topic= Note: Subtopics can be added to the search using the filter value &subtopic= |