SRU (Search / Retrieve via URL) is a standardised web service protocol used for searching databases in the Internet. The results of the search are issued in a defined XML format.
The SRU protocol permits targeted searches using search indices and keys, displaying any hits in its own environment. Searches are formulated in the CQL (Contextual Query Language) retrieval language.
The SRU standard was published by the Library of Congress and is a further development of the Z39.50 protocol.
Following login and authorisation, the German National Library allows its data to be searched using the HTTP or HTTPS protokoll and the SRU-protocol.
SRU interface standards
SRU incorporates the basic functions:
Explain: Self-description in XML standard format, including information on
- Data formats
Sort: Sorting the result set
- The sort parameter is not supportet in SRU version 1.1 but as part of CQL Context Set version 1.2. For which indexes the sorting parameter is supported is available in the catalogue-specific SRU-Explain.
Search query structure: ... index%3Dsearch term%20sortby%20index-sort/sort.ascending or descending
For free access to the SRU interface you need a personalized customer account. To do so, please use the registration form and then send an e-mail to the Schnittstellen-Service including your contact details, the required catalogue (bibliographic and/or authority data), the data format and, if applicable, details of the fixed IP address or IP address range. Alternatively it is also possible to obtain access using an individual access code (access token). You will receive a message from us as soon as access is activated for you.
German National Library catalogues accessible via SRU
|Catalogue selection||Description in XML standard format|
|Catalogue of German National Library (DNB) except Integrated Authority File (GND) ||https://services.dnb.de/sru/dnb?operation=explain&version=1.1|
|Catalogue of Deutsches Musikarchiv (DMA) ||https://services.dnb.de/sru/dnb.dma?operation=explain&version=1.1|
|Authorities: Catalogue of Integrated Authority File (GND) |
option of entities
The following formats are offered in UTF-8 decomposed:
|MARC 21-XML||XML variant of MARC 21||http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd|
|DNB Casual (oai_dc)||Selection of Dublin Core elements|
only for bibliographic data
|RDF (RDF/XML)||Linked Data Service||http://www.w3.org/2000/07/rdf.xsd|
From 1 July 2015 all bibliographic data of the German National Library and the authority data of the Integrated Authority File (GND) will be provided free of charge and can be freely re-used under "Creative Commons Zero" (CC0 1.0 Universal) terms.
The metadata and online interfaces are provided with no guarantee of their being continuous, punctual, error-free or complete, or of their not infringing the rights of third parties (e.g. personal rights and copyright).
|Schnittstellen-Service||Monday - Friday from 9:00 to 15:00|
|Nicole von der Hude||Tel.: +49 69 1525-1632|
|Heike Eichenauer||Tel.: +49 69 1525-1074|
|Query to DNB's SRU server|
|/dnb||Identification of catalogue (e.g. DNB, authorities ...)|
|?version=1.1||SRU version, standard|
|&operation=searchRetrieve||Command to server|
|WOE%3DGoethe||WOE is the name of the index, %3D is the URL encoding for =, search term here: Goethe|
|%20sortby%20tit/sort.ascending||Sort result set by title ascending from A-Z|
|&recordSchema=MARC21-xml||Desired format for SRU response|
Qualified by entity in "authorities" catalogue
The following qualifications are possible:
The Asterisk *is a placeholder fo any number of characters and must be placed directly behind the value.
Examples of SRU requests:
Ts* (subject term):
Subject headings can be obtained by qualifiying the search with „COD=s“:
In URL Encoding umlauts are coded using UTF-8 and with a prefixed % sign (percent encoding).
Example: Lower case ö in UTF-8 = C3 B6. With prefixed % sign = %C3%B6.
|" (quotation marks)||=||%22|
|List of other characters|
In order to use "=" in a query (... query=dc.title=musik ...) the guidelines recommend replacing the second "=" by "%3D" (... query=dc.title%3Dmusik ...) and replacing special characters (e.g. diakritical marks with UTF-8 hexadecimal) in the search key (Standard).
Spaces e.g. before and after Boolean operators should be replaced by %20 (... KRAFTWERK%20not%20ROBOTER ...), depending on client.
Number of data records returned per request
Standard (default): 10 data records per response
Maximum: 100 data records per reply if ...&maximumRecords=100 specified (possible values 1 to 100)
Call of further data records: ...&startRecord=101 (possible values 1 to 99,000)
SRU / Z39.50
SRU offers the following benefits in comparison to Z39.50:
- Retrieval language CQL
- Extensive catalogue selection
- Large selection of formats
- No record length limitation in MARC 21
Last update: 08.06.2018