-
Notifications
You must be signed in to change notification settings - Fork 3
Google Books and HathiTrust Integration Links
When a record does not have a link to access ONLINE materials, we will check to see whether there are scanned copies in HathiTrust or in Google Books. This link will only show on the record page, not on the search results page.
Logic should be (note, waiting on this: https://github.com/psu-libraries/psulib_blacklight/issues/1298):
- If an item is ONLINE then we don't display HathiTrust or Google Books links.
- If we get a full copy from HathiTrust, generate link and don't link to Google Books
- If we don't get a full copy from HathiTrust, then IF there's a full or preview copy from Google Books we generate that link.
- If we don't have either a full HathiTrust copy or a full or preview copy from Google books, don't display any special links.
First, we'll query HathiTrust to see whether a public domain copy is available. We only link to works which have at least one copy/item in the public domain because the search inside experience is not of use to almost any of our patrons. The API uses only one identifier parameter. Choose the first one which exists in the following order:
- oclc
- lccn
- issn (first)
Syntax is: https://catalog.hathitrust.org/api/volumes/brief/oclc/424023.json
with appropriate param in place of oclc
if needed
We are looking for at least ONE item which has: "usRightsString":"Full view"
Sample with several items in Limited View only: https://catalog.hathitrust.org/api/volumes/brief/oclc/424023.json
Sample with only one item, Full View: https://catalog.hathitrust.org/api/volumes/brief/oclc/433.json
These two pages have more documentation:
- https://www.hathitrust.org/member-libraries/resources-for-librarians/improve-discovery/integrate-records/
- https://www.hathitrust.org/member-libraries/resources-for-librarians/data-resources/bibliographic-api/
We'll then display the link using HathiTrust branding.
If we cannot get a US Rights: full view copy from HathiTrust, we query the Google Books API to see if there's a copy that we can search inside. Just as we only want to generate HathiTrust links if there's a full copy, for Google Books we want a preview at minimum, otherwise it's of no use to the patron.
For this, we send all keys as a comma-separated list, using the following order and prefixing for each key. All qualifiers and prefixes should've been removed.
- OCLC
- ISBN
- LCCN
e.g. https://books.google.com/books?jscmd=viewapi&bibkeys=OCLC:1226074058,ISBN:9780226794617,ISBN:022679461X,ISBN:9780226794754,ISBN:022679475X,LCCN:2020053633&[callback with jquery and key, but the URL as is will allow you to download data]
If there's a "preview_url" AND "preview" is not "noview" (so NOT "preview":"noview"
) then we should generate the preview URL.
From late 2020 until 2024, we indexed HathiTrust identifiers using our Emergency Temporary Access Service reports through July 2022. Past versions of this page contain details about how we handled display for HathiTrust.
- Home
- Testing Documentation for Product Owner
- Components, Features, and Functions
- Library Faceting and Locations Management
- Advanced Search
- Browse Items By Library of Congress Call Number
- Browse by Subject, Author, and Title
- Availability Display
- Summary Holdings Display
- Holdings and Availability for Bound-Withs
- Holds and ILL
- Requesting Items with Aeon
- Course Reserves
- Google Books and HathiTrust Integration
- Bento Integration
- Indexing and Display
- Sources of Catalog Data
- Display Fields
- Title Fields
- Author and Creator Fields
- Thesis Department
- ISSNs and ISBNs
- URL Fields
- Publication and Edition Fields
- Material Characteristics Fields
- Language Fields
- Subject Fields
- Genre Fields
- Note Fields
- Serials
- Bound-Withs
- Formats
- Media Types
- Access Facet
- Open Access Facet
- Call Numbers
- OCLC Number
- LCCN
- Report Numbers
- Endowment Codes and Names
- Adding Linked to Request Scanning
- Summary Holdings Indexing
- My Account
- Tests
- Development Setup and Notes
- Deployment Notes