Div | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
...
Note: You can include set metadata in an item API query to get back full metadata records for items in that set. For example, the following item queries use set metadata to return items in the English the English Crime and Execution Broadsides set:
- Retrieve items by collectionID:
https://api.lib.harvard.edu/v2/items?collectionId=57203 - Retrieve items by collectionTitle:
https://api.lib.harvard.edu/v2/items?collectionTitle=English Crime and Execution Broadsides - Retrieve items by setName:
https://api.lib.harvard.edu/v2/items?setName=English Crime and Execution Broadsides - Retrieve items by setSpec:
https://api.lib.harvard.edu/v2/items?setSpec=crimes
About the Items API
The base URI for the items endpoint is https://api.lib.harvard.edu/v2/items.
...
Case-sensitive exact-match queries can be done on specific fields by appending _exact to the field name:
https://api.lib.harvard.edu/v2/items?title_exact=Peanuts
This query returns all items with a title of exactly “Peanuts”. In the Field Reference list, the "Exact Match Search" column indicates if a field supports an exact match query.
...
Parameter | Description |
---|---|
sort.asc OR sort | The field to use for sorting, in ascending order |
sort.desc | The field to use for sorting, in descending order |
Facets
Facets are attributes of an item (name, genre, type of resource, language, date, etc.) that can be used to power a faceted search or browse option in a discovery system. The items API supports a facets parameter that will return a list of facet values present in the query results. Many item API fields are available for faceting (see – see the Field Reference "Can Facet" column for details)an indication of which fields can be faceted.
This For example, this query will return items Facet search results by that contain "peanuts" in a title followed by a list of facet values (and counts) for the “name” and “resourceType” fields that are present in the query result.
https://api.lib.harvard.edu/v2/items.json?title=peanuts&facets=name,resourceType
...
API Versioning
The version number of the API is specified in the base URL (e.g. “v2”). A version number is always required when accessing the API. The version number will be incremented whenever breaking (non backwards-compatible) changes are made to the API.
Anchor | ||||
---|---|---|---|---|
|
This section describes the fields available for searching through the API. In some cases, fields available through the API aggregate multiple fields within the MODS records. When applicable, this is identified in the MODS field mapping column.
NameKeyword Search | Exact Match Search | Can Sort | Can Facet | MODS Field Mapping | Notes | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
abstractTOC Yes | No | No | No | abstract | This query returns items with the keyword "justinian" in an abstract or table of contents field: https://api.lib.harvard.edu/v2/items?abstractTOC=Justinian | |||||||
classification | Yes | No | Yes | classification Physical organization code. Includes bibliographic-level classification but not holdings. See shelfLocator for holdings-level classification. | https://api.lib.harvard.edu/v2/items?classification=F1435.3 Case-sensitive exact match: | |||||||
collectionId | NoYes | No | Yes | extension.sets.systemId Query by the set/collection ID assigned to items that have been grouped together for delivery via Harvard Digital Collections. | This query returns items associated with a specific set by its identifier: Case-sensitive exact match: | |||||||
collectionTitle
| YesYes | No | Yes | extension.sets.setName Query by the set/collection title assigned to items that have been grouped together for delivery via Harvard Digital Collections. | This query returns items associated with a specific set by set title: Case-sensitive exact match:https://api.lib.harvard.edu/v2/items?collectionTitle_exact=Chinese Rare Books | |||||||
copyrightDate Yes | Yes | No | Yes | originInfo.copyrightDate Use YYYY format to search. | ||||||||
dateCaptured Yes | Yes | No | Yes | originInfo.dateCaptured | https://api.lib.harvard.edu/v2/items?dateCaptured=2016&genre=performed+music Case-sensitive exact match: | |||||||
dateCreated Yes | Yes | No | Yes | originInfo.dateCreated | https://api.lib.harvard.edu/v2/items?q=daguerreotypes&dateCreated=1806 Case-sensitive exact match: | |||||||
dateIssued Yes | Yes | No | Yes | originInfo.dateIssued | https://api.lib.harvard.edu/v2/items?name=asimov isaac&dateIssued=1961 Case-sensitive exact match: | |||||||
dateRange (future) | ||||||||||||
dates.start | YesNo | No | No | originInfo.dateIssued Use YYYY format to search. | This query returns all works by Molière published from 1990 forward: This query returns all works by Molière published from 1990 backward: This query returns all works by Molière published from 1990 to 2000: | |||||||
dates.end | ||||||||||||
edition Yes | Yes | No | Yes | originInfo.edition | https://api.lib.harvard.edu/v2/items?name=Molière&edition=7th. ed. Case-sensitive exact match: | |||||||
genre Yes | Yes | No | Yes | genre | https://api.lib.harvard.edu/v2/items?q=fish+watercolor&genre=Drawings Case-sensitive exact match: | |||||||
identifier No | Yes | No | No | identifier (Identifier of an item in another system) | This query returns an item by it's ISBN: | |||||||
isCollection No | Yes | No | Yes | typeOfResource (where collection="yes") Values are “true” or “false”. Indicates whether or not a record describes a collection of items. | https://api.lib.harvard.edu/v2/items?q=colonial+north+america&isCollection=true | |||||||
isManuscript No | Yes | No | Yes | typeOfResource (where manuscript="yes") Values are “true” or “false”. Indicates whether or not a record describes manuscript or archival material. | https://api.lib.harvard.edu/v2/items?q=colonial+north+america&isManuscript=true | |||||||
isOnline No | No | Yes† | Yes | "true" if location.url[@access = 'raw object'] exists, "false" otherwise Indicates whether or not an item is available in digital form; values are "true" or "false". See also inDRS. | https://api.lib.harvard.edu/v2/items?q=earhart amelia&isOnline=true †Will sort all @access=raw object items together in a result set. | |||||||
issuance Yes | Yes | No | Yes | originInfo.issuance | This query returns items with subject "astronomy" issued as a serial: https://api.lib.harvard.edu/v2/items?subject=astronomy&issuance=serial | |||||||
languageCode | Yes | No | Yes | language.languageTerm (where languageTerm type="code") | This query returns items of Shakespeare in Chinese: https://api.lib.harvard.edu/v2/items?name=shakespeare&languageCode=chi | |||||||
languageText | Yes | No | Yes | language.languageTerm (where languageTerm type="text") Facet as "language" rather than "languageText". | This query returns items by or about Laozi in Chinese: https://api.lib.harvard.edu/v2/items?title=laozi&language=Chinese | |||||||
name Yes | Not available | No | Yes | name.namePart e.g. "Greenblatt, Stephen" | Will find term in any name field: | |||||||
originDate Yes | Yes | No | Yes | originInfo.dateIssued | https://api.lib.harvard.edu/v2/items?name=asimov+isaac&originDate=1961 Case-sensitive exact match: | |||||||
originPlace Yes | Yes | No | Yes | originInfo.place.placeTerm | https://api.lib.harvard.edu/v2/items?q=colonial+north+america&originPlace=Boston Case-sensitive exact match: | |||||||
physicalDescription
| No | No | physicalDescription.form | This query returns items in print form with "peanut" in the title: https://api.lib.harvard.edu/v2/items?title=peanut&physicalDescription=print | ||||||||
physicalLocation Yes | No | No | Yes | location.physicalLocation Includes Harvard repository names but also non-Harvard locations, especially for artworks. | https://api.lib.harvard.edu/v2/items?physicalLocation=tozzer&subject=cylinder seals | |||||||
publisher Yes | Yes | No | Yes | originInfo.publisher | https://api.lib.harvard.edu/v2/items?q=shakespeare&publisher=Arden Case-sensitive exact match: | |||||||
recordIdentifier No | Yes | No | No | recordInfo.recordIdentifier at the top level only priorrecordids.recordIdentifier e.g. recordIdentifier=sch00443c00007 (for finding aids), recordIdentifier=S26791_olvsurrogate827653 (for images), recordIdentifier=012956251 (for Aleph) (Internal recordInfo.recordIdentifier elements in finding aid components and image records can be searched as keywords.) | https://api.lib.harvard.edu/v2/items?recordIdentifier=990148733450203941 (for Alma) https://api.lib.harvard.edu/v2/items?recordIdentifier=014873345 (for Aleph) https://api.lib.harvard.edu/v2/items?recordIdentifier=sch00227c00197 (for finding aids) https://api.lib.harvard.edu/v2/items?recordIdentifier=W42143_urn-3:FHCL:1176307 (for images) Use a keyword query to retrieve items based on record ID in finding aid components and image records: | |||||||
repository
| YesYes | No | Yes | Search: location.physicalLocation (where @type="repository") Facet: extension.librarycloud.HarvardRepositories.HarvardRepository Includes Harvard repositories only. A search will query the long form repository name (e.g.Eda Kuhn Loeb Music Library); faceting will return the short form repository name (e.g. Loeb Music). | https://api.lib.harvard.edu/v2/items?q=peanuts&repository=Oakes Ames | |||||||
resourceType (4/11/19: not working correctly) Yes | Yes | No | Yes | typeOfResource | https://api.lib.harvard.edu/v2/items?name=shakespeare&resourceType=three dimensional object | |||||||
role Yes | Yes | No | Yes | name.namePart.role.roleTerm | https://api.lib.harvard.edu/v2/items?name=shakespeare&role=publisher | |||||||
seriesTitle | YesYes | No | Yes | In relatedItem[@type='series']: titleInfo.title facet as "relatedItem" rather than "seriesTitle" | https://api.lib.harvard.edu/v2/items?seriesTitle=Harvard-Yenching Institute Monograph Series | |||||||
| Yes | No | Yes | location.shelfLocator | https://api.lib.harvard.edu/v2/items?q=peanuts&shelfLocator=Film Mas Case-sensitive exact match: | |||||||
source No | No | Yes | Yes | recordInfo.recordIdentifier source attribute Sources are currently MH:ALMA (from Alma), MH:VIA (image items from JSTOR forum), or MH:OASIS (finding aid components from ArchivesSpace). Attribute occurs only on top-level recordInfo.recordIdentifier elements | https://api.lib.harvard.edu/v2/items?q=earhart amelia&source=MH:ALMA | |||||||
subject Yes | Yes | No | Yes | subject.topic | https://api.lib.harvard.edu/v2/items?subject=perseus Case-sensitive exact match: Note: An exact query can match on contents of a single field only. In LibraryCloud MODS, a subject heading and its subdivision(s) are split into separate fields, e.g. the subject heading "Older people -- Services for" appears in the LibCloud MODS record as these fields: <mods:topic>Older people</mods:topic>
| |||||||
subject.genre Yes | Yes | No | Yes | subject.genre | https://api.lib.harvard.edu/v2/items?subject.genre=folklore Case-sensitive exact match: | |||||||
subject.geographic Yes | Yes | No | Yes | subject.geographic | https://api.lib.harvard.edu/v2/items?subject.geographic=giza Case-sensitive exact match: | |||||||
subject.hierarchicalGeographic Yes | Yes | No | No | subject.hierarchicalGeographic.continent | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic=Boston | |||||||
subject.hierarchicalGeographic.area Yes | Yes | No | Yes | subject.hierarchicalGeographic.area | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.area=galicia | |||||||
subject.hierarchicalGeographic.city Yes | Yes | No | Yes | subject.hierarchicalGeographic.city | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.city=Cochituate&q=maps | |||||||
subject.hierarchicalGeographic.citySection Yes | Yes | No | Yes | subject.hierarchicalGeographic.citySection | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.citySection=charlestown | |||||||
subject.hierarchicalGeographic.continent Yes | Yes | No | Yes | subject.hierarchicalGeographic.continent | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.continent=africa | |||||||
subject.hierarchicalGeographic.country Yes | Yes | No | Yes | subject.hierarchicalGeographic.country | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.country=canada | |||||||
subject.hierarchicalGeographic.county Yes | Yes | No | Yes | subject.hierarchicalGeographic.county | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.county=middlesex | |||||||
subject.hierarchicalGeographic.extraterrestrialArea Yes | Yes | No | Yes | subject.hierarchicalGeographic.extraterrestrialArea | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.extraterrestrialArea=* | |||||||
subject.hierarchicalGeographic.island Yes | Yes | No | Yes | subject.hierarchicalGeographic.island | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.island=* | |||||||
subject.hierarchicalGeographic.province Yes | Yes | No | Yes | subject.hierarchicalGeographic.province | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.province=quebec | |||||||
subject.hierarchicalGeographic.region Yes | Yes | No | Yes | subject.hierarchicalGeographic.region | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.region=nile | |||||||
subject.hierarchicalGeographic.state Yes | Yes | No | Yes | subject.hierarchicalGeographic.state | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.state=massachusetts&q=maps | |||||||
subject.hierarchicalGeographic.territory Yes | Yes | No | Yes | subject.hierarchicalGeographic.territory | https://api.lib.harvard.edu/v2/items?subject.hierarchicalGeographic.territory=* | |||||||
subject.name Yes | Yes | No | Yes | subject.name | https://api.lib.harvard.edu/v2/items?subject.name=kubrick stanley Case-sensitive exact match: | |||||||
subject.name.role Yes | Yes | No | Yes | subject.name.role.roleTerm Terms may be expressed as a word (photographer.) or abbreviation ("cmp" for composer). | https://api.lib.harvard.edu/v2/items?subject.name.role=cmp Case-sensitive exact match: | |||||||
subject.temporal Yes | Yes | No | Yes | subject.temporal | https://api.lib.harvard.edu/v2/items?q=samurai&subject.temporal=edo Case-sensitive exact match: | |||||||
subject.titleInfo Yes | Yes | No | Yes | subject.titleInfo.title | https://api.lib.harvard.edu/v2/items?subject.titleInfo=Middlemarch Case-sensitive exact match: | |||||||
subject.topic Yes | Yes | No | Yes | subject.topic | https://api.lib.harvard.edu/v2/items?subject.topic=mochica pottery Case-sensitive exact match: | |||||||
title Yes | Yes | No | No | titleInfo.title | https://api.lib.harvard.edu/v2/items?title=complete motown singles Case-sensitive exact match: | |||||||
url No | Yes | No | No | location.url Can be URLs or URNs; includes links to digital content and catalog records. | https://api.lib.harvard.edu/v2/items?q=earhart amelia&url=*RAD.SCHL* Case-sensitive exact match: | |||||||
url.access No | Yes | No | Yes | location.url.access (range = <preview, raw object>) facet as url.access.preview or url.access.raw_object Query for records containing a url field with a specific @access attribute. Values are: "preview"= indicates link to image thumbnail
| This query returns items containing a url with the attribute access="preview" (i.e., an image thumbnail link is present): **At this time, only url.access=preview works. | |||||||
urn
| YesNo | No | No | location.url Queries an item by its NRS URN (the URN only e.g., " urn-3:FHCL:1155043" minus the actionable URL components). | https://api.lib.harvard.edu/v2/items?urn=urn-3:FHCL:1155043 | |||||||
DRS Extensions | ||||||||||||
| NoYes | No | Yes | extension.HarvardDRS.accessFlag (range = <P, R, N, B>) P (publicly accessible), R (restricted to Harvard), N (not available for delivery), B (bypass, access handled differently) See also: availableTo to query human-readable version of DRS accessFlags. | https://api.lib.harvard.edu/v2/items?genre=daguerreotype&accessFlag=P | |||||||
| YesYes | No | Yes | extension.HarvardDRS.contentModel (range = <AUDIO, DOCUMENT, PDS DOCUMENT, PDS DOCUMENT LIST, STILL IMAGE, TEXT, VIDEO>) Use _exact query to find "DOCUMENT". See also: digitalFormat to query by human-readable value derived from the contentModel for an object in Harvard's Digital Repository Service (DRS). | https://api.lib.harvard.edu/v2/items?title=biodiversity&limit=100&contentModel=PDS DOCUMENT Use the case-sensitive exact match query to find "DOCUMENT": | |||||||
fileDeliveryURL (valid if inDRS=true)
| NoYes | No | No | extension.HarvardDRS.fileDeliveryURL, eg. "http://nrs.harvard.edu/urn-3:FHCL.HOUGH:1090399" Query an item by its full delivery URL. | https://api.lib.harvard.edu/v2/items?title=annual+report&fileDeliveryURL=https://nrs.harvard.edu/urn-3:HMS.COUNT:22923642 | |||||||
| NoYes | No | Yes | extension.HarvardDRS.inDRS (range = <"true", "false">) Query for items in Harvard Library's digital repository service. See also isOnline. | https://api.lib.harvard.edu/v2/items?genre=daguerreotype&inDRS=true | |||||||
maxImageDeliveryDimension (future) | NoFuture | No | Future | extension.HarvardDRS.maxImageDeliveryDimension - e.g., "600". Value is in pixels. | ||||||||
metsLabel (valid if inDRS=true)
| YesYes | No | No | extension.HarvardDRS.metsLabel eg. Any text string Query for items by keywords in the descriptive METS label - if defined in DRS metadata. | https://api.lib.harvard.edu/v2/items?metsLabel=seward Case-sensitive exact match: | |||||||
modified.after (valid if inDRS=true)
| NoYes | No | No | extension.HarvardDRS.lastModifiedDate - eg. "2016-05-03 Query items by the "last modified" date of a linked digital object in DRS (in YYYY-MM-DD format). | This query returns items in DRS last modified after 2016-01-05: This query returns items in DRS last modified before a specific date: This query returns items in DRS last modified on 2016-01-05: https://api.lib.harvard.edu/v2/items?q=*&modified.after=2016-01-04&modified.before=2016-01-06 | |||||||
modified.before (valid if inDRS=true) | NoNo | No | ||||||||||
ownerCode (valid if inDRS=true) | NoYes | No | Yes | extension.HarvardDRS.ownerCode, eg. "FHCL.HOUGH" | https://api.lib.harvard.edu/v2/items?q=cookbook*&ownerCode=RAD.SCHL | |||||||
ownerCodeDisplayName (valid if inDRS=true) | NoYes | No | Yes | extension.HarvardDRS.ownerCodeDisplayName, eg. "Houghton Library" | https://api.lib.harvard.edu/v2/items?q=daguerreotype&ownerCodeDisplayName=Schlesinger | |||||||
uriType (valid if inDRS=true)
| NoYes | No | Yes | extension.HarvardDRS.uriType (range = <FDS, IDS, PDS, PDS_LIST, SDS, SDS_VIDEO>) Query for items by type of delivery urn, which is a proxy for type of delivery service. Delivery service types: FDS (text documents), IDS (images), PDS (page-turned objects), PDS_LIST (list of page-turned objects), SDS (streaming audio), (SDS_VIDEO (streaming video) | https://api.lib.harvard.edu/v2/items?subject=jazz&uriType=SDS | |||||||
LibraryCloud Extensions | ||||||||||||
No | Yes | No | Yes | extension.librarycloud.availableTo Human-readable values for access to digital content in Harvard's Digital Repository Service (DRS). Values are "Everyone" (corresponds to accessFlag=P) and "Harvard only" (corresponds to accessFlag=R). See also: availableTo to query by DRS accessFlag. | https://api.lib.harvard.edu/v2/items?q=colonialism&availableTo=Everyone | |||||||
Yes | No | Yes | extension.librarycloud.digitalFormats.digitalFormat Human readable values derived from the contentModel for an object in Harvard's Digital Repository Service (DRS). Values are audio, books and documents, images, and video. See also: contentModel to query by the DRS content model of an object in Harvard's Digital Repository Service (DRS). | https://api.lib.harvard.edu/v2/items?subject=poetry&digitalFormat=audio | ||||||||
processed.after | NoYes | No | No | extension.librarycloud.processingDate Use YYYY-MM-DD format to search. This processing date indicates the most recent re-ingest of a metadata record (an "item") into LibraryCloud from its source catalog. | This query returns items processed after the date specified: This query returns items processed before the date specified: This query returns items processed between the specified dates: | |||||||
processed.before | ||||||||||||
Sets Extensions | ||||||||||||
setNameYes | No | Yes | extension.sets.set.setName Human-readable names that identify a set of materials selected by, for example, a curator for administrative or discovery purposes or for harvesting via OAI-PMH. | https://api.lib.harvard.edu/v2/items?setName=chinese rare books | ||||||||
setSpecYes | No | Yes | extension.sets.set.setSpec Codes used to identify a set of materials selected by, for example, a curator for administrative or discovery purposes or for harvesting via OAI-PMH. | https://api.lib.harvard.edu/v2/items?setSpec=crb |
More Examples
#Search all of LibraryCloud for “peanuts” in the title
https://api.lib.harvard.edu/v2/items?title=peanuts
#Search oasis components for “peanuts” in the title
https://api.lib.harvard.edu/v2/items?title=peanuts&source=MH:OASIS (can use MH:OASIS, MH:VIA, or MH:ALEPH)
#Search for a specific component identifier in OASIS
https://api.lib.harvard.edu/v2/items?source=MH:OASIS&recordIdentifier=sch00443c00072
#Search for a specific image component identifier in JSTOR Forum (the identifier actually has the form "<viaRecordId>_<URN>", but the wildcard matches the URN portion if not known.
https://api.lib.harvard.edu/v2/items?recordIdentifier=W188002*
#Search for all components in an OASIS record
https://api.lib.harvard.edu/v2/items?recordIdentifier=sch00443*
#Look up the MODS for a PDS object given its URN
https://api.lib.harvard.edu/v2/items?urn=urn-3:FHCL.HOUGH:25620083
#Search all of library cloud for VIA records that are public and have “peanuts” in the title
https://api.lib.harvard.edu/v2/items?title=peanuts&source=MH:VIA&accessFlag=P
#Get the facet counts for collections with various collection titles
https://api.lib.harvard.edu/v2/items?facets=collectionTitle
#Get all manuscripts from Schlesinger Library that contain either the string "electronic finding aid available" OR "electronic container list available"
https://api.lib.harvard.edu/v2/items?physicalLocation=sch&isManuscript=true&q=(https://api.lib.harvard.edu/v2/items?physicalLocation=sch&isManuscript=true&q=(electronic%20finding%20aid%20available)%20OR%20(electronic%20container%20list%20available))
...