# Alma SRU

## Infos zu SRU-Schnittstelle

SRU ist die offene Alma-Schnittstelle für Forschende, um an bibliographische Daten der Zentralbibliothek Zürich zu kommen. Sie hat keinen API Threshold. SRU ist in Alma nicht für Massen-Exporte konzipiert. Maximal werden 10'000 Ergebnisse pro Suche zurückgegeben.

### Basis-URL

Alma allgemein:

    https://<Alma domain>/view/sru/<institution code>?

ZB / UB Zürich<br/>
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?</a>

SLSP Network Zone<br/>
<a href="https://slsp-network.alma.exlibrisgroup.com/view/sru/41SLSP_NETWORK?" target="_blank">https://slsp-network.alma.exlibrisgroup.com/view/sru/41SLSP_NETWORK?</a>

Explain-Operation<br/>
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=explain" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=explain</a>

Ex Libris Dokumentation<br/>
<a href="https://developers.exlibrisgroup.com/alma/integrations/sru/" target="_blank">https://developers.exlibrisgroup.com/alma/integrations/sru/</a>

Such Index <-> MARC<br />
<a href="https://developers.exlibrisgroup.com/alma/integrations/indexdoc/">https://developers.exlibrisgroup.com/alma/integrations/indexdoc/</a>

## Verfügbare Such-Indices

Die verfügbaren Such-Indices können mit Hilfe der Explain-Operation ermittelt werden.

Als <a href="https://knowledge.exlibrisgroup.com/Alma/Product_Documentation/010Alma_Online_Help_(English)/Metadata_Management/180Search_Indexes/050MARC_21_Search_Indexes" target="_blank">Suchparameter</a> stehen dieselben Alma-Indices zur Verfügung wie in der erweiterten Alma-Suche.<br/>

In der Query muss dem Index-Namen das Set ("alma") vorangestellt werden, also z.B. "alma.mms_id" oder "alma.title".

## JupyterLite Notebook
Über ein JupyterLite Notebook können Python-erfahrene Nutzende grössere Mengen von Suchergebnissen exportieren: <a href="https://zentralbibliothek-zuerich.pages.uzh.ch/zb-suche-katalog">https://zentralbibliothek-zuerich.pages.uzh.ch/zb-suche-katalog</a>.

Der Quellcode für das Notebook ist via Gitlab abrufbar: <a href="https://gitlab.uzh.ch/zentralbibliothek-zuerich/zb-suche-katalog">https://gitlab.uzh.ch/zentralbibliothek-zuerich/zb-suche-katalog</a>


## Beispiel-Queries 

Nachfolgend einige Beispiele für Suchabfragen in verschiedenen Indices.

- Suche nach einer bestimmten MMS ID, Format Marc-XML <br/>
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=marcxml&query=alma.mms_id=990104431070205508" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=marcxml&query=alma.mms_id=990104431070205508</a>

- Stichwortsuche im Title-Index (Word), Format Dublin Core: "python"<br/>
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.title=python" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.title=python</a>

- Stichwortsuche im Title-Index (Phrase): "neues lehrgebäude der diplomatik"<br/>
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=marcxml&query=alma.title=%22neues%20lehrgeb%C3%A4ude%20der%20diplomatik%22" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=marcxml&query=alma.title=%22neues%20lehrgeb%C3%A4ude%20der%20diplomatik%22</a>

- Erscheinungsdatum zwischen 1500 und 1600<br/>
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.main_pub_date%3E=1500%20and%20alma.main_pub_date%3C=1600" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.main_pub_date%3E=1500%20and%20alma.main_pub_date%3C=1600</a>

- Nur Bilder, die in den Metadaten Gottfried Keller erwähnen als DublinCore<br />
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.mms_material_type=VM%20AND%20alma.all=%22gottfried%20keller%22&maximumRecords=10&startRecord=1">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.mms_material_type=VM%20AND%20alma.all=%22gottfried%20keller%22&maximumRecords=10&startRecord=1</a>
<br />
siehe auch Dokumentation: <a href="https://knowledge.exlibrisgroup.com/Alma/Knowledge_Articles/How_to_query_SRU_server_by_material_type">https://knowledge.exlibrisgroup.com/Alma/Knowledge_Articles/How_to_query_SRU_server_by_material_type</a>

- Nur Daten der Graphischen Sammlung der ZB (LibraryID = 112070030005508) als DublinCore<br />
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.itemLibrary=112070030005508&maximumRecords=10&startRecord=1">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.itemLibrary=112070030005508&maximumRecords=10&startRecord=1</a>


### DDC / subject

- Suche nach subject "Digital Humanities" (Marc-Feld 650) oder Dewey Decimal Code (DDC) für Digital Humanities 001.30285<br/>
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.dewey_decimal_class_number=001.30285%20or%20alma.subjects=%22digital%20humanities%22" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.dewey_decimal_class_number=001.30285%20or%20alma.subjects=%22digital%20humanities%22</a>

- Suche nach subject "Digital Humanities" (Marc-Feld 650) oder Dewey Decimal Code (DDC) für Digital Humanities 001.30285 und Erscheinungsjahr 2016<br/>
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=(alma.dewey_decimal_class_number=001.30285%20or%20alma.subjects=%22digital%20humanities%22)%20&%20alma.main_pub_date=2016" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=(alma.dewey_decimal_class_number=001.30285%20or%20alma.subjects="digital%20humanities")%20&%20alma.main_pub_date=2016</a>

- Zürcher Bibliographie<br/>
<a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=marcxml&query=alma.local_field_900%20all%20IDSZ1Tur*%20or%20alma.local_field_900%20all%20Tur*Z01" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=marcxml&query=alma.local_field_900%20all%20IDSZ1Tur*%20or%20alma.local_field_900%20all%20Tur*Z01</a>

### Bibliotheksinterne Use Cases

- Titelaufnahmen von Bildressourcen mit einer Digitalen Repräsentation im Alma, aber ohne Link auf e-Plattform in Marc-Feld 856: <br/><br/>

  alma.representation_pid>0 --> Es gibt eine ID für eine Digitale Repräsentation in Alma <br/>
  alma.type_of_record=k --> Marc: LDR/06 codiert als "Two-dimensional nonprojectable graphic" <br/>
  alma.elocation="" --> Es gibt keinen Link in Marc-Feld 856<br/> <br/>

  <a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=marcxml&query=alma.representation_pid%3E0%20and%20alma.type_of_record=k%20and%20alma.elocation=%22%22" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=marcxml&query=alma.representation_pid%3E0%20and%20alma.type_of_record=k%20and%20alma.elocation=%22%22</a><br/><br/>

- Alle Datensätze aus dem DigiTur-Projekt, die kein Feld 856 / 024 (DOI) haben --> Upload auf e-Plattformen wurde vergessen. Leider gibt es kein Local Field mit Inhalt "DigiTur" o.ä., man muss anhand des Statistikfelds suchen (bestimmte Kürzel, Zeitraum 2013-2018). <br/><br/>

  Bsp. Statistikfeld (nicht DigiTur):

      900	__ |a IDSZ2zbzmix201904e |c IDSZ2robi |d IDSZ2zbzswk201904p |e IDSZ2robi

  Einfaches Beispiel:<br/>
  <a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.local_field_900=robi%20and%20alma.elocation==%22%22" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.local_field_900=robi%20and%20alma.elocation==%22%22</a><br/><br/>

  Komplexeres Beispiel - mehrere Kürzel, mehrere Jahreszahlen - der Suchindex muss jedes Mal wiederholt werden:<br/>
  <a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=(alma.local_field_900%20all%202013%20OR%20alma.local_field_900%20all%202014)%20AND%20(alma.local_field_900%20all%20robi%20OR%20alma.local_field_900%20all%20aliv)%20AND%20(alma.elocation==%22%22)" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=(alma.local_field_900%20all%202013%20OR%20alma.local_field_900%20all%202014)%20AND%20(alma.local_field_900%20all%20robi%20OR%20alma.local_field_900%20all%20aliv)%20AND%20(alma.elocation==%22%22)</a><br/><br/>

- Datensätze ohne Titel:

  alma.title="" --> kein Wert für Marc-Feld 245 $a<br/>
  <a href="https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.title=%22%22" target="_blank">https://uzb.swisscovery.ch/view/sru/41SLSP_UZB?version=1.2&operation=searchRetrieve&recordSchema=dc&query=alma.title=%22%22</a>